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=481&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 5056 results for "api"(592ms)

3
4export let untitled_scarletHoverfly = fetchJSON(
5 "https://api.val.town/v1/eval",
6 {
7 method: "POST",

testSemanticsmain.tsx5 matches

@stevekrouseUpdated 1 year ago
3export async function testSemantics({
4 stateName,
5 api,
6}: {
7 stateName: string;
8 api: string;
9}) {
10 const { data: last } = await fetchJSON(
11 `${api}/eval/${stateName}`
12 );
13 const now = Date.now();
14 await fetchJSON(`${api}/eval/${stateName} = ${now}`);
15 const { data: next } = await fetchJSON(
16 `${api}/eval/${stateName}`
17 );
18 if (next === now) return "❌ Unauthenticated can mutate state";

rateLimitmain.tsx1 match

@stevekrouseUpdated 1 year ago
3import { msDay } from "https://esm.town/v/stevekrouse/msDay";
4
5// simple rate limiter to ensure you don't get a surprise api bill
6// supports multiple keys, so you can rate limit various things
7// the default limit is 1000 but you can supply your own

valtownApiTypesImportTestmain.tsx4 matches

@stevekrouseUpdated 1 year ago
1export let valtownApiTypesImportTest = (async () => {
2 const openapi = await import("https://esm.sh/valtown-api-types@0.1.1");
3 console.log(Object.keys(openapi));
4})();
5// Forked from @nbbaier.valtownApiTypesImportTest

untitled_blackBoamain.tsx2 matches

@stevekrouseUpdated 1 year ago
1import { exportedKeys } from "https://esm.town/v/stevekrouse/exportedKeys";
2import { valTownInspoList } from "https://esm.town/v/rodrigotello/valTownInspoList?v=99";
3import { runValAPIAuth } from "https://esm.town/v/stevekrouse/runValAPIAuth";
4
5export let untitled_blackBoa = runValAPIAuth({
6 val: "@rodrigotello.updateInspoList",
7 args: [

evalPost2main.tsx1 match

@stevekrouseUpdated 1 year ago
2
3export let evalPost2 = fetchJSON(
4 "https://api.val.town/v1/eval",
5 {
6 method: "POST",

spotifyTracksmain.tsx2 matches

@stevekrouseUpdated 1 year ago
1import { spotifyAPI } from "https://esm.town/v/stevekrouse/spotifyAPI";
2
3export let spotifyTracks = (token, playlistId) => spotifyAPI({
4 endpoint: `playlists/${playlistId}/tracks`,
5 token: token,

big_story_visualizationmain.tsx1 match

@tmcwUpdated 1 year ago
24 import * as Plot from "https://cdn.jsdelivr.net/npm/@observablehq/plot@0.6.9/+esm";
25 import {debounce} from "https://cdn.jsdelivr.net/npm/lodash-es@4.17.21/+esm";
26 const ranks = await (await fetch('https://api.val.town/v1/run/tmcw.big_stories_ranks')).json();
27
28 let allDates = new Set();

privateAPIAuthenticatedmain.tsx2 matches

@stevekrouseUpdated 1 year ago
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export const privateAPIAuthenticated = fetchJSON(
5 "https://api.val.town/v1/run/stevekrouse.example3",
6 {
7 method: "GET",

spotifyMemain.tsx2 matches

@stevekrouseUpdated 1 year ago
1import { spotifyAPI } from "https://esm.town/v/stevekrouse/spotifyAPI";
2
3export let spotifyMe = (token) => spotifyAPI({ token, endpoint: 'me' })

runValAPIEx2 file matches

@charmaineUpdated 11 hours ago

PassphraseAPI2 file matches

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