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/image-url.jpg%20%22Image%20title%22?q=api&page=984&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 13019 results for "api"(1189ms)

ipqsScoreChangeAlertmain.tsx2 matches

@nickgoldenUpdated 9 months ago
2import { email } from "https://esm.town/v/std/email";
3
4const ipqsApiKey = Deno.env.get("IPQS_API_KEY");
5const ipAddress = "8.8.8.8";
6const ipDataName = "googleIpqsData";
18
19export async function checkIp() {
20 const result = await fetch(`https://ipqualityscore.com/api/json/ip/${ipqsApiKey}/${ipAddress}`);
21 const newData = await result.json();
22

surfboardDemoSchedule2main.tsx5 matches

@szymonatorUpdated 9 months ago
1// WELCOME TO THE API DEMO
2// Since val.town doesn't behave well, we cannot access the value of inputs after the page has been loaded once.
3// Therefore, the only way to let the user modify their values is to do it manually.
35
36 const data = await fetch(
37 `https://api.stage.teamsurfboard.com/api/v1/schedule?start=${start.toISOString()}&end=${end.toISOString()}`,
38 {
39 headers: {
40 // ADD YOUR API TOKEN INTO THE ENV VARIABLES
41 "Authorization": `Bearer ${Deno.env.get("TEAMSURFBOARD_API_TOKEN")}`,
42 },
43 },
138 <div style={styles.container}>
139 <h1>Employee hours and pay</h1>
140 <h3>(This is an API demo to showcase how the Teamsurfboard API can be used.)</h3>
141 <div style={styles.info}>
142 <p style={styles.info_text}>

blobCommentsReactmain.tsx3 matches

@keenanzuckerUpdated 9 months ago
63 tomorrow.setDate(tomorrow.getDate() + 1);
64 const data = await fetch(
65 `https://api.stage.teamsurfboard.com/api/v1/schedule?start=${today.toISOString()}&end=${tomorrow.toISOString()}`,
66 {
67 headers: {
68 // ADD YOUR API TOKEN INTO THE ENV VARIABLES
69 "Authorization": `Bearer ${Deno.env.get("TEAMSURFBOARD_API_TOKEN")}`,
70 },
71 },

surfboardDemoSchedule2main.tsx3 matches

@keenanzuckerUpdated 9 months ago
9 tomorrow.setDate(tomorrow.getDate() + 1);
10 const data = await fetch(
11 `https://api.stage.teamsurfboard.com/api/v1/schedule?start=${today.toISOString()}&end=${tomorrow.toISOString()}`,
12 {
13 headers: {
14 // ADD YOUR API TOKEN INTO THE ENV VARIABLES
15 "Authorization": `Bearer ${Deno.env.get("TEAMSURFBOARD_API_TOKEN")}`,
16 },
17 },

telegramWebhookEchoMessagemain.tsx2 matches

@ghsaboiasUpdated 9 months ago
3
4const BOT_TOKEN = Deno.env.get("TELEGRAM_TOKEN");
5const TELEGRAM_API_URL = `https://api.telegram.org/bot${BOT_TOKEN}`;
6
7useHTTP(async (req, res) => {
26async function sendMessage(chatId, text) {
27 try {
28 const url = `${TELEGRAM_API_URL}/sendMessage`;
29 const payload = {
30 chat_id: chatId,

illustratedPrimerREADME.md1 match

@nknjUpdated 9 months ago
1Generates a streaming illustrated primer on a subject. Enter a subject, click on titles to "delve".
2
3🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits

illustratedPrimermain.tsx3 matches

@nknjUpdated 9 months ago
8
9 // Substrate graph
10 const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY_R") });
11 const Topic = z
12 .object({
79
80 // UI
81 const capitalize = s => s.replace(/^\w/, c => c.toUpperCase());
82 return new Response(
83 new ReadableStream({
96 <div style="margin:0 10px;">${pair.image}</div>
97 <div style="margin:0 10px;font-size:1.2rem;">
98 <a href="/?input=${pair.title}"><b>${capitalize(pair.title)}</b></a><br/>${pair.caption}</div>
99</div>`,
100 ));

salmonMolemain.tsx3 matches

@nknjUpdated 9 months ago
4import { zodToJsonSchema } from "npm:zod-to-json-schema";
5
6const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
7
8// search for HN comments using https://hn.algolia.com/api
9const query = "langchain";
10const searchResults = await hnSearch({
31 new ComputeJSON({
32 prompt: `Summarize this comment and how it relates to the topic: ${query}
33 Use "negative" sentiment for posts about API, abstraction, documentation, tutorial, general quality, slowness, or performance issues.
34 COMMENT: ${JSON.stringify(hit)}`,
35 json_schema: zodToJsonSchema(commentInfo),

salmonMoleREADME.md2 matches

@nknjUpdated 9 months ago
1Find comments on HN (powered by [Algolia](https://hn.algolia.com/api)), extract content and return a streaming markdown summary (powered by [Substrate](https://substrate.run)).
2
3The RAG portion of this is 34 lines of Substrate code. Read the walkthrough: https://x.com/vprtwn/status/1812844236401762513
4
5🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits.
6
7See also:

openaiproxyREADME.md1 match

@mmrechUpdated 9 months ago
1# OpenAI Proxy
2
3This OpenAI API proxy injects Val Town's API keys. For usage documentation, check out https://www.val.town/v/std/openai

vapi-minutes-db1 file match

@henrywilliamsUpdated 2 days ago

vapi-minutes-db2 file matches

@henrywilliamsUpdated 2 days ago
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
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com