You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/...?q=api&page=54&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 19081 results for "api"(1358ms)
34const anthropic = new Anthropic({
5apiKey: Deno.env.get("ANTHROPIC_API_KEY"),
6});
7
2import { blob } from "https://esm.town/v/std/blob";
34const KEY = Deno.env.get("NEWSDATA")!; // API key
5const KEEP = 20; // store up to 20
6const WINDOW_MIN = 1440; // last 24 h
9/* 1 ─ build query (size 10, English) */
10const q = encodeURIComponent("bitcoin OR btc OR ethereum OR eth OR solana OR sol");
11const url = `https://newsdata.io/api/1/latest?apikey=${KEY}&q=${q}&language=en&size=10`;
1213/* 2 ─ fetch & peek */