Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=api&page=411&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 4206 results for "api"(509ms)

APITemplateWithSwaggerUIREADME.md1 match

@dcm31•Updated 2 months ago
1# APITemplateWithSwaggerUI

blueskyBotTutorialREADME.md1 match

@charmaine•Updated 2 months ago
1# Bluesky Bot Tutorial
2
3*_This template shows you how to use the Bluesky API to make a bot. This starter template was ported from [this one on Docs](https://docs.bsky.app/docs/starter-templates/bots)._*
4
5## To run it:

BraintrustSDKtutorial1 match

@stevekrouse•Updated 2 months ago
5export default async function handler() {
6 const result = {
7 apiKeyStatus: null,
8 evalStarted: false,
9 evalComplete: false,

BraintrustSDKREADME.md2 matches

@stevekrouse•Updated 2 months ago
12
13- Click `Fork` on this val
14- Get your Braintrust API key at https://www.braintrust.dev/app/settings?subroute=api-keys
15- Add it to your project `Environment Variables` (on the left side bar of this project) as `BRAINTRUST_API_KEY`
16- Click `Run` on the `tutorial` val

BraintrustSDKREADME.md2 matches

@charmaine•Updated 2 months ago
12
13- Click `Fork` on this val
14- Get your Braintrust API key at https://www.braintrust.dev/app/settings?subroute=api-keys
15- Add it to your project `Environment Variables` (on the left side bar of this project) as `BRAINTRUST_API_KEY`
16- Click `Run` on the `tutorial` val

Windsurfprojectcontext5 matches

@toowired•Updated 2 months ago
3import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
4
5// API Documentation
6/**
7 * @typedef {Object} ProjectState
61 setError(null);
62 try {
63 const response = await fetch("/api/state");
64 if (!response.ok) throw new Error("Failed to fetch state");
65 const data = await response.json();
80 setError(null);
81 try {
82 const response = await fetch("/api/state", {
83 method: "POST",
84 headers: { "Content-Type": "application/json" },
579 await authenticate(req);
580
581 if (req.method === "GET" && req.url.endsWith("/api/state")) {
582 const state = await getState();
583 return Response.json(state || {});
584 } else if (req.method === "POST" && req.url.endsWith("/api/state")) {
585 const update = await req.json();
586 validateInput(update);

blueskyBotTutorialblueskyPost1 match

@charmaine•Updated 2 months ago
1import { BskyAgent } from "npm:@atproto/api";
2
3export async function postToBluesky() {

BraintrustSDKtutorial7 matches

@charmaine•Updated 2 months ago
5export default async function handler() {
6 const result = {
7 apiKeyStatus: null,
8 evalStarted: false,
9 evalComplete: false,
13
14 try {
15 // Check API key
16 const apiKey = Deno.env.get("BRAINTRUST_API_KEY");
17 if (!apiKey) {
18 throw new Error("Add BRAINTRUST_API_KEY to your environment variables");
19 }
20 result.apiKeyStatus = "found";
21 console.log("API Key status:", result.apiKeyStatus);
22
23 // Start evaluation

APIBuilderTemplateblissfulSapphireFly1 match

@dcm31•Updated 2 months ago
1export default function handler(req: Request) {
2 return new Response("Hello, Val Town API!", {
3 headers: {
4 "Content-Type": "text/plain"

APIBuilderTemplatehumblePeachCobra1 match

@dcm31•Updated 2 months ago
2
3http.get("/hello", (req, res) => {
4 res.send("Hello, Val Town API!");
5});

PassphraseAPI2 file matches

@wolf•Updated 15 hours ago

openapi2 file matches

@stevekrouse•Updated 3 days ago
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com
fiberplane
Purveyors of Hono tooling, API Playground enthusiasts, and creators of 🪿 HONC 🪿 (https://honc.dev)