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=473&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 5096 results for "api"(516ms)

githubUsermain.tsx1 match

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

eval_main.tsx1 match

@stevekrouse•Updated 1 year ago
2
3export let eval_ = (code, args?) =>
4 fetchJSON("https://api.val.town/v1/eval", {
5 method: "POST",
6 body: JSON.stringify({

rimeAPIExmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { runVal } from "https://esm.town/v/std/runVal";
2
3export const rimeAPIEx = await runVal("stevekrouse.rime", {
4 text: "hello friend",
5 speaker: "young_female_latina-4",

measureValTownE2emain.tsx2 matches

@stevekrouse•Updated 1 year ago
7 for (let i = 0; i < count; i++) {
8 let start = Date.now();
9 await fetch("https://api.val.town/eval/(()=%3E1+1)()");
10 evalTimes.push(Date.now() - start);
11 }
22 for (let i = 0; i < count; i++) {
23 let start = Date.now();
24 await fetch("https://api.val.town/eval/@healeycodes.addOnes()");
25 userFuncTimes.push(Date.now() - start);
26 }

bskySocialExmain.tsx2 matches

@stevekrouse•Updated 1 year ago
2
3export let bskySocialEx = (async () => {
4 const { default: api } = await import("npm:@atproto/api");
5 const service = "https://bsky.social";
6 const agent = await new api.BskyAgent({ service });
7 await agent.login({
8 identifier: process.env.blueskyEmail,

dmmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=9";
2import { dms } from "https://esm.town/v/stevekrouse/dms";
3import { verifyAPIAuth } from "https://esm.town/v/stevekrouse/verifyAPIAuth";
4
5export async function dm(message, auth) {
6 let { handle, error } = await verifyAPIAuth(auth);
7 if (!handle)
8 return error;

weatherGovGridmain.tsx1 match

@stevekrouse•Updated 1 year ago
3export function weatherGovGrid({ lat, lon }): Promise<WeatherData> {
4 return fetchJSON(
5 `https://api.weather.gov/points/${lat},${lon}`,
6 );
7}

fetchHeadersmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let fetchHeaders = (await fetch("https://swapi.dev/api/people/1/")).headers;

r2main.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { runValAPIAuth } from "https://esm.town/v/stevekrouse/runValAPIAuth";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { whoami } from "https://esm.town/v/stevekrouse/whoami";
14 }
15 // SET
16 return runValAPIAuth({
17 val: "@stevekrouse.r2Proxy",
18 args: [key, JSON.stringify(value)],

untitled_B7XzWEHMmain.tsx1 match

@stevekrouse•Updated 1 year ago
3export const untitled_B7XzWEHM = (
4 await fetch(
5 "https://api.val.town/v1/run/paulsun.parkingSpots" +
6 `?args=${JSON.stringify([lat, lng, radius])}`
7 )

runValAPIEx2 file matches

@charmaine•Updated 19 hours ago

PassphraseAPI2 file matches

@wolf•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)