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%22Optional%20title%22?q=api&page=50&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 11824 results for "api"(612ms)

myApi1 file match

@SlugeRUpdated 1 year ago

myApi1 file match

@lionadUpdated 1 year ago

myApi1 file match

@smetzdevUpdated 1 year ago

myApi1 file match

@hovavoUpdated 1 year ago

generateValCodeAPI2 file matches

@andreterronUpdated 1 year ago

myApi1 file match

@broenUpdated 1 year ago

myApi1 file match

@aleUpdated 1 year ago

myApi1 file match

@enyoUpdated 1 year ago

myApi1 file match

@ooo_ooo_ooooohUpdated 1 year ago

myApi1 file match

@mik639Updated 1 year ago

pollinaterpblindex.tsx2 matches

@armadillomikeUpdated 40 mins ago
273 <title>The S.M.A.R.T Hive</title>
274 <meta name="viewport" content="width=device-width, initial-scale=1">
275 <link rel="preconnect" href="https://fonts.googleapis.com">
276 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
277 <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap" rel="stylesheet">
278 <script src="https://esm.town/v/std/catch"></script>
279 </head>

untitled-3323new-file-8432.tsx5 matches

@AP123Updated 1 hour ago
17 }
18
19 // single-post regex handles www, old, api, or naked reddit.com
20 if (/^https?:\/\/(?:[^/]+\.)?reddit\.com\/.*\/comments\/[a-z0-9]+/i.test(feedUrl)) {
21 try {
65 const pathname = new URL(postUrl).pathname.replace(/\/$/, "");
66 const headers = {
67 // UA beginning with “Reddit/” is whitelisted for api.reddit.com JSON
68 "User-Agent": "Reddit/20230522 (Android 14; Pixel 8 Pro)",
69 "Accept": "application/json",
70 };
71
72 // 1️⃣ try api.reddit.com (no Cloudflare)
73 let txt = await fetch(`https://api.reddit.com${pathname}?limit=${limit}&raw_json=1`, { headers })
74 .then(r => r.text());
75 if (txt.trim().startsWith("<")) { // got HTML ➜ fallback
79 }).then(r => r.text());
80 if (txt.trim().startsWith("<"))
81 throw new Error("Both api.reddit.com and old.reddit.com returned HTML (likely blocked)");
82 }
83
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com
mux
Your friendly, neighborhood video API.