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=2&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 11633 results for "api"(686ms)

replicate
Run AI with an API
rapilot330
YoungPapi
codingpapi

EEPMOnitoringApp.tsx4 matches

@solomonferede•Updated 50 mins ago
264==========================*/
265// The server function remains the same as in the previous single-file solution,
266// as it handles API requests and serves the main HTML.
267// Its logic is independent of how the client-side components are structured into files.
268export default async function server(
316 const method = request.method;
317
318 // API Routes (same logic as before)
319 if (path === "/login" && method === "POST") {
320 const body = await request.json();
433 }
434
435 // API endpoint to handle editing a news article
436 if (path === "/edit-news" && method === "PUT") {
437 try {
558 }
559
560 // --- End Media Monitoring Specific API Routes ---
561 // --- NEW ENDPOINT: Generate Weekly Summary ---
562 if (path === "/generate-weekly-summary" && method === "GET") {

stevensDemosendDailyBrief.ts8 matches

@lm3m•Updated 51 mins ago
97
98export async function sendDailyBriefing(chatId?: string, today?: DateTime) {
99 // Get API keys from environment
100 const apiKey = Deno.env.get("ANTHROPIC_API_KEY");
101 const telegramToken = Deno.env.get("TELEGRAM_TOKEN");
102
106 }
107
108 if (!apiKey) {
109 console.error("Anthropic API key is not configured.");
110 return;
111 }
122
123 // Initialize Anthropic client
124 const anthropic = new Anthropic({ apiKey });
125
126 // Initialize Telegram bot
162
163 // disabled title for now, it seemes unnecessary...
164 // await bot.api.sendMessage(chatId, `*${title}*`, { parse_mode: "Markdown" });
165
166 // Then send the main content
169
170 if (content.length <= MAX_LENGTH) {
171 await bot.api.sendMessage(chatId, content, { parse_mode: "Markdown" });
172 // Store the briefing in chat history
173 await storeChatMessage(
198 // Send each chunk as a separate message and store in chat history
199 for (const chunk of chunks) {
200 await bot.api.sendMessage(chatId, chunk, { parse_mode: "Markdown" });
201 // Store each chunk in chat history
202 await storeChatMessage(

new-val-api-21 file match

@shouser•Updated 17 hours ago
This is an example of using the API to create a val.

gptApiTemplate2 file matches

@charmaine•Updated 2 days ago