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=1046&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 11716 results for "api"(935ms)

testmain.tsx9 matches

@yawnxyzUpdated 1 year ago
2 res.json({
3 schema_version: "v1",
4 name_for_human: "APIs.guru Plugin",
5 name_for_model: "apis.guru",
6 description_for_human: "Plugin for accessing APIs.guru OpenAPI Directory.",
7 description_for_model:
8 "Plugin for accessing APIs.guru OpenAPI Directory. Use the list.json endpoint to find APIs. Use the metrics.json endpoint to find metadata about APIs such as counts, totals and charting data.",
9 auth: {
10 type: "none",
11 },
12 api: {
13 type: "openapi",
14 url: "https://api.apis.guru/v2/ai-openapi.yaml",
15 is_user_authenticated: false,
16 },
17 logo_url: "https://api.apis.guru/logo.svg",
18 contact_email: "mike.ralphson@gmail.com",
19 legal_info_url: "https://apis.guru",
20 });
21};

myApimain.tsx1 match

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

myApimain.tsx1 match

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

aqimain.tsx1 match

@herkuUpdated 1 year ago
4 let pm25 = (
5 await fetchJSON(
6 "https://api.openaq.org/v2/latest?" +
7 new URLSearchParams({
8 limit: "10",

editValmain.tsx1 match

@vezUpdated 1 year ago
7 isInterval?: boolean;
8}) =>
9 fetchJSON(`api.val.town/run/`, {
10 headers: {
11 accept: "*/*",

myApimain.tsx1 match

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

boredActivitiesmain.tsx1 match

@hetzelhouseUpdated 1 year ago
3// Activity suggestions for when you're bored
4export let boredActivities = fetchJSON(
5 "https://www.boredapi.com/api/activity"
6);

tidbytDeviceInstallationsmain.tsx4 matches

@andreterronUpdated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export function tidbytDeviceInstallations({ deviceId, apiKey }: {
4 deviceId: string;
5 apiKey: string;
6}) {
7 return fetchJSON(
8 `https://api.tidbyt.com/v0/devices/${deviceId}/installations`,
9 {
10 headers: {
11 Authorization: `Bearer ${apiKey}`,
12 },
13 },

referencesmain.tsx1 match

@andreterronUpdated 1 year ago
24}[]> {
25 const res = await fetchJSON(
26 "https://api.val.town/v1/me/references?" +
27 searchParams({
28 since: since?.toISOString(),

graffitiWebsitemain.tsx1 match

@andreterronUpdated 1 year ago
38 await new Promise<void>((resolve) => setTimeout(() => resolve(), 150));
39 }
40 const code = `await api(
41 @andreterron.paintGraffitiPixel,
42 ${Math.min(Math.floor(Math.random() * 64), 64)}, // x

gpt-image-test

@CaptainJackUpdated 5 hours ago
测试 gpt image 的不同 api 能否满足图片生成要求

new-val-api-21 file match

@shouserUpdated 1 day ago
This is an example of using the API to create a val.
apiv1
papimark21