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/$%7Bsuccess?q=api&page=1633&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 18222 results for "api"(5407ms)

myApimain.tsx1 match

@flavorjones•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

convertTodoItemsToGamePlansmain.tsx5 matches

@thomasatflexos•Updated 1 year ago
33 "model": "gpt-3.5-turbo",
34 });
35 let openApiKey = process.env.OPEN_API_KEY;
36 var requestOptions = {
37 method: "POST",
38 headers: {
39 "Content-Type": "application/json",
40 "Authorization": `Bearer ${openApiKey}`,
41 },
42 body: rawBody,
43 redirect: "follow",
44 };
45 let openApiResponse = await fetch(
46 "https://api.openai.com/v1/chat/completions",
47 requestOptions,
48 );
49 let jsonResponse = await openApiResponse.json();
50 let choice = jsonResponse?.choices[0]?.message.content;
51 if (!choice) {

myApimain.tsx1 match

@bhelx•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

myApimain.tsx1 match

@rodrigotello•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

myApimain.tsx1 match

@ethanniser•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

githubFollowingmain.tsx1 match

@alexmcroberts•Updated 1 year ago
3// Github following
4export let githubFollowing = fetchJSON(
5 "https://api.github.com/users/stevekrouse/following"
6);

myApimain.tsx1 match

@agibralter•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

telegramSetWebhookmain.tsx1 match

@vtdocs•Updated 1 year ago
10}) =>
11 fetchJSON(
12 `https://api.telegram.org/bot${botToken}/setWebhook`,
13 {
14 method: "POST",

exampleExpressPOSTmain.tsx1 match

@vtdocs•Updated 1 year ago
2
3export const exampleExpressPOST = fetchText(
4 "https://api.val.town/v1/express/stevekrouse.expressHTMLExample",
5 { method: "POST", body: JSON.stringify({ name: "Docs" }) },
6);

customStatusCodemain.tsx1 match

@vtdocs•Updated 1 year ago
1// Visit: https://api.val.town/v1/express/vtdocs.customStatusCode
2export const customStatusCode = (req: express.Request, res: express.Response) => {
3 // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418

github-api1 file match

@cricks_unmixed4u•Updated 4 hours ago

beeminder-api4 file matches

@cricks_unmixed4u•Updated 4 hours ago
Kapil01
apiv1