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/$%7Burl%7D?q=api&page=53&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 19733 results for "api"(1581ms)

api4001 file match

@matthamlin•Updated 1 year ago

myApi1 file match

@jfix•Updated 1 year ago

myApi1 file match

@sander•Updated 1 year ago

myApi1 file match

@pmenze•Updated 1 year ago

myApi1 file match

@sarincasm•Updated 1 year ago

myApi1 file match

@pjlamb12•Updated 1 year ago

myApi1 file match

@andycoupe•Updated 1 year ago

myApi1 file match

@SlugeR•Updated 1 year ago

myApi1 file match

@lionad•Updated 1 year ago

myApi1 file match

@smetzdev•Updated 1 year ago

galerry_01index.html2 matches

@fravarela•Updated 48 mins ago
7
8 <!-- Google Fonts: Poppins -->
9 <link rel="preconnect" href="https://fonts.googleapis.com">
10 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11 <link
12 href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap"
13 rel="stylesheet"
14 >

shitty-leaderboardindex.ts8 matches

@jonbo•Updated 49 mins ago
51 const timestamp = Date.now();
52 const [choresResponse, historyResponse] = await Promise.all([
53 fetch(`/api/${instanceId}/chores?_t=${timestamp}`),
54 fetch(`/api/${instanceId}/history?_t=${timestamp}`),
55 ]);
56
316 const pathParts = url.pathname.split("/").filter(p => p.trim() !== "");
317
318 // API endpoints - proxy to the main Shitty database
319 if (pathParts[0] === "api" && pathParts.length >= 2) {
320 const syncId = pathParts[1];
321 const apiResource = pathParts.length > 2 ? pathParts[2] : null;
322
323 // Helper to create demo data
412
413 // Chores endpoint
414 if (apiResource === "chores") {
415 return new Response(JSON.stringify(instanceData.chores), {
416 headers: { "Content-Type": "application/json" },
418 }
419 // History endpoint
420 else if (apiResource === "history") {
421 const sortedHistory = [...instanceData.tending_log].sort((a, b) => b.timestamp - a.timestamp);
422 return new Response(JSON.stringify(sortedHistory), {
425 }
426
427 return new Response(JSON.stringify({ error: "API endpoint not found" }), {
428 status: 404,
429 headers: { "Content-Type": "application/json" },
apiry
snartapi