You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Bsuccess?q=fetch&page=7&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=fetch
Returns an array of strings in format "username" or "username/projectName"
Found 14500 results for "fetch"(1271ms)
16console.log("⏰ Polymarket cron at", new Date(interval.lastRunAt).toISOString());
1718// 1) Fetch markets from Polymarket API
19const params = new URLSearchParams({
20closed: "false",
2627const url = `https://gamma-api.polymarket.com/markets?${params}`;
28const raw = await fetch(url).then(r => r.json());
29const rawJson = JSON.stringify(raw);
30
11console.log("⏰ Cron at", new Date(interval.lastRunAt).toISOString());
1213// 1) Fetch & cache raw dump
14const raw = await fetch(RAW_URL).then(r => r.json());
15const rawJson = JSON.stringify(raw);
16const prev = await sqlite.execute({
29.slice(0, 50);
3031// 3) Fetch full details for those 50
32const details = await Promise.all(
33candidates.map(m => fetch(DETAIL_URL(m.id)).then(r => r.json())),
34);
35const detailsMap = new Map(details.map(m => [m.id, m]));