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/$%7Burl%7D?q=api&page=1009&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 12118 results for "api"(1585ms)

rimeAPIExmain.tsx1 match

@stevekrouseUpdated 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

@stevekrouseUpdated 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

@stevekrouseUpdated 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

@stevekrouseUpdated 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

@stevekrouseUpdated 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

@stevekrouseUpdated 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

@stevekrouseUpdated 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

@stevekrouseUpdated 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 )

geoffreyFollowsmain.tsx1 match

@stevekrouseUpdated 1 year ago
3
4export let geoffreyFollows = twitterJSON({
5 url: `https://api.twitter.com/1.1/friends/ids.json?screen_name=geoffreylitt`,
6 bearerToken: twitterCredentials.bearerToken
7}).then(x => x.ids)

runAllTests2main.tsx2 matches

@stevekrouseUpdated 1 year ago
1import { TEST_API } from "https://esm.town/v/stevekrouse/TEST_API";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function runAllTests2({ names }: { names: string[] }) {
5 return names.map((name) =>
6 fetchJSON(`${TEST_API}/eval/@stevekrouse.${name}()`)
7 .then(({ data, error }) => (data ?? error?.message) + ` (${name})`)
8 );

social_data_api_project3 file matches

@tsuchi_yaUpdated 1 day ago

simple-scrabble-api1 file match

@bryUpdated 5 days ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration