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=433&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 4574 results for "api"(492ms)

bandcampWrappedREADME.md2 matches

@tmcw•Updated 4 months ago
5wacky enough to buy their music instead of streaming it from some service.
6
7Because Bandcamp doesn't have an API, this hinges on you going to your purchases page, copying the purchases, and pasting it in. Thanks to
8the ability of [the system clipboard to contain HTML](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem), the same technology that makes
9copy-and-pasted text have unpredictable and annoying font and boldness choices also lets this parse and reformat that purchases page into something
10shareable.

visionaryPeachAspmain.tsx5 matches

@stevekrouse•Updated 4 months ago
169 }
170
171 // Existing API proxy logic
172 const { API_URL } = await import("https://esm.town/v/std/API_URL?v=5");
173 const { fetchJSON } = await import("https://esm.town/v/stevekrouse/fetchJSON");
174 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
175 const Authorization = req.headers.get("Authorization") as string;
176 const meRes = await fetch(`${API_URL}/v1/me`, { headers: { Authorization } });
177 if (!meRes.ok) {
178 return new Response("Unauthorized", { status: 401 });
232 );
233
234 const socialDataURL = new URL("https://api.socialdata.tools/twitter/search");
235 socialDataURL.searchParams.set("query", query);
236 const socialDataResults = await fetchJSON(socialDataURL.toString(), {
237 bearer: Deno.env.get("SOCIAL_DATA_API_KEY"),
238 });
239

spectacularAzureAngelfishmain.tsx4 matches

@stevekrouse•Updated 4 months ago
5Chart.register(...registerables);
6
7import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
8import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
9import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
132 // Existing social data proxy logic remains unchanged
133 const Authorization = req.headers.get("Authorization") as string;
134 const meRes = await fetch(`${API_URL}/v1/me`, { headers: { Authorization } });
135 if (!meRes.ok) {
136 return new Response("Unauthorized", { status: 401 });
190 );
191
192 const socialDataURL = new URL("https://api.socialdata.tools/twitter/search");
193 socialDataURL.searchParams.set("query", query);
194 const socialDataResults = await fetchJSON(socialDataURL.toString(), {
195 bearer: Deno.env.get("SOCIAL_DATA_API_KEY"),
196 });
197

LotecaV2main.tsx2 matches

@maxm•Updated 4 months ago
58 async function buscarDadosLoteria(numero = null) {
59 const url = numero
60 ? `https://servicebus2.caixa.gov.br/portaldeloterias/api/megasena/${numero}`
61 : "https://servicebus2.caixa.gov.br/portaldeloterias/api/megasena/";
62
63 try {

wideLibmain.tsx1 match

@maxm•Updated 5 months ago
396 ...queryParams,
397 limit,
398 // Best effort does not seem to work so we do this format dance, generally the api
399 // layer validates iso date formats so we are somewhat insulated.
400 start: formatDate(typeof start === "string" ? new Date(start) : start),

valSessionmain.tsx3 matches

@maxm•Updated 5 months ago
101 <pre><code class="language-typescript">import { ValSession } from "${rawUrl}";
102
103// Generate a token from your valtown api key.
104const token = await ValSession.new(Deno.env.get("valtown"));
105
127});
128
129type valSessionApi = typeof routes;
130
131const client = hc<valSessionApi>(httpEndpoint);
132
133export class ValSession {

blueskymain.tsx2 matches

@stevekrouse•Updated 5 months ago
1import { AtpAgent } from "https://esm.sh/@atproto/api@0.13.15";
2
3export const agent = new AtpAgent({ service: "https://public.api.bsky.app/" });

sapientLavenderHerringmain.tsx2 matches

@maxm•Updated 5 months ago
12 <script>hljs.highlightAll();</script>
13 <style>
14 @import url('https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@900&family=Roboto+Mono:wght@400;700&display=swap');
15
16 * {
119import { Wide } from 'http://esm.town/v/maxm/wide';
120
121// Use your Val Town API Token to create a session
122const wide = new Wide(await ValSession.new(Deno.env.get("valtown")))
123

sapientLavenderHerringREADME.md1 match

@maxm•Updated 5 months ago
8import { Wide } from 'http://esm.town/v/maxm/wide';
9
10// Use your Val Town API Token to create a session
11const wide = new Wide(await ValSession.new(Deno.env.get("valtown")))
12

wideREADME.md1 match

@maxm•Updated 5 months ago
8import { Wide } from 'https://esm.town/v/maxm/wide';
9
10// Use your Val Town API Token to create a session
11const wide = new Wide(await ValSession.new(Deno.env.get("valtown")))
12

PassphraseAPI2 file matches

@wolf•Updated 2 days ago

openapi2 file matches

@stevekrouse•Updated 4 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)