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/$1?q=api&page=1437&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 17842 results for "api"(5951ms)

valcontributionchartmain.tsx1 match

@iamseeley•Updated 9 months ago
1// This approach will fetch data from the specified endpoint, process it to create a GitHub-style contribution chart,
2// and render it using React. We'll use the fetch API to get the data, process it to create a heatmap-like structure,
3// and then use CSS Grid to render the chart with varying shades of green based on the number of vals created each day.
4

valcontributionchartmain.tsx1 match

@ejfox•Updated 9 months ago
1// This approach will fetch data from the specified endpoint, process it to create a GitHub-style contribution chart,
2// and render it using React. We'll use the fetch API to get the data, process it to create a heatmap-like structure,
3// and then use CSS Grid to render the chart with varying shades of green based on the number of vals created each day.
4

pushmain.tsx6 matches

@yawnxyz•Updated 9 months ago
16const app = new Hono();
17
18const vapidDetails = {
19 url: thisWebURL(),
20 pubKey: Deno.env.get("qushVapidPublicKey"),
21 privKey: Deno.env.get("qushVapidPrivateKey"),
22};
23
57});
58
59app.get("/vapidPublicKey", (c) => c.text(vapidDetails.pubKey));
60
61app.get("/", async (c) => {
103 await storage.set(subscription);
104 if (subscription !== null) {
105 await pushSendNotification(vapidDetails, subscription, "👋");
106 return c.text("Subscribed!");
107 }
112 const subscription = await storage.get();
113 if (subscription === null) return false;
114 await pushSendNotification(vapidDetails, subscription, ...params);
115 return true;
116};

knowledgeExplorermain.tsx3 matches

@sharanbabu•Updated 9 months ago
1/**
2 * This val creates a modern, stylish knowledge explorer using the Cerebras LLM API.
3 * It allows users to enter a topic or select from suggestions, displays information in a centered card,
4 * and enables exploration of related topics or deeper dives using arrow keys or buttons.
148 const Cerebras = (await import("https://esm.sh/@cerebras/cerebras_cloud_sdk")).default;
149 const client = new Cerebras({
150 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
151 });
152
165 });
166 } catch (error) {
167 console.error("Error calling Cerebras API:", error);
168 return new Response(JSON.stringify({ error: "Failed to generate content" }), {
169 status: 500,

emperorOfJapanCrawlermain.tsx1 match

@jdan•Updated 9 months ago
1// This program crawls Wikipedia pages starting from an initial URL,
2// following links in the infobox and collecting page titles.
3// It uses the fetch API to make HTTP requests and cheerio for HTML parsing.
4
5import cheerio from "https://esm.sh/cheerio@1.0.0-rc.12";

animemain.tsx9 matches

@tempdev•Updated 9 months ago
11 const results = [];
12 const metaResponse = await fetch(
13 `https://cool-proxy.koyeb.app/hdiuhmalkmc9d0ck7UCFVGBJHN?destination=https://api.malsync.moe/mal/anime/${id}`,
14 );
15 const metaData = await metaResponse.json();
22 const episodeIdentifier = `${data.identifier}-episode-${ep}`;
23 return [
24 fetch(`https://animetize-api.vercel.app/servers/${episodeIdentifier}`),
25 fetch(`https://animetize-api.vercel.app/watch/${episodeIdentifier}`),
26 ];
27 }
67 <title>${metaData.title}</title>
68 <style>
69 @import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;700&display=swap');
70
71 html,
159 const results = [];
160 const metaResponse = await fetch(
161 `https://cool-proxy.koyeb.app/hdiuhmalkmc9d0ck7UCFVGBJHN?destination=https://api.malsync.moe/mal/anime/${id}`,
162 );
163 const metaData = await metaResponse.json();
169 const episodeIdentifier = `${data.identifier}-episode-${ep}`;
170 return [
171 fetch(`https://animetize-api.vercel.app/servers/${episodeIdentifier}`),
172 fetch(`https://animetize-api.vercel.app/watch/${episodeIdentifier}`),
173 ];
174 }
217 <body style="background:#111;color:#DDD;">
218 <h1>Tempguy-Anime</h1>
219 <pre>https://tempguy-anime.web.val.run/api/MAL_ID/EPISODE/(sub/dub)</pre>
220 <pre>https://tempguy-anime.web.val.run/api/21/1/dub</pre>
221 </body>,
222 );

textSummarizationComparisonToolmain.tsx4 matches

@sharanbabu•Updated 9 months ago
1/**
2 * This val creates a text summarization comparison tool using the Cerebras LLM API.
3 * It provides a text area with default text, a summarize button, and displays two different summarization results:
4 * 1. Direct summarization
5 * 2. Extractive summarization followed by cohesive rewriting
6 *
7 * The server handles API calls to Cerebras, while the client manages the UI and user interactions.
8 */
9
265
266 const Cerebras = (await import("https://esm.sh/@cerebras/cerebras_cloud_sdk")).default;
267 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
268
269 // Direct summarization
341
342const css = `
343@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');
344
345body {

typingTestSpectrogrammain.tsx1 match

@ejfox•Updated 9 months ago
1// This app creates a 10-second typing test with audio recording and spectrogram visualization.
2// It uses the Web Audio API for recording and analyzing audio, Canvas for drawing the spectrogram, and provides a typing interface.
3// TailwindCSS is used for styling.
4

blob_adminREADME.md1 match

@nicopreme•Updated 9 months ago
9[![](https://stevekrouse-button.express.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
12
13# TODO

aqiREADME.md1 match

@hamzaniau•Updated 9 months ago
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12

dailyQuoteAPI

@Souky•Updated 18 hours ago

HTTP

@Ncharity•Updated 20 hours ago
Daily Quote API
Kapil01
apiv1