You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$1?q=api&page=17&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 18890 results for "api"(1956ms)
910useEffect(() => {
11fetch("/api/styles")
12.then(res => res.json())
13.then(data => {
21}, []);
22useEffect(() => {
23fetch("https://api.color.pizza/v1/palettes")
24.then((res) => res.json())
25.then((data) => {
13app.get("/frontend/**/*", c => serveFile(c.req.path, import.meta.url));
1415// Add your API routes here
16// app.get("/api/data", c => c.json({ hello: "world" }));
17app.get("/api/styles", c => c.json(styles));
1819// Unwrap and rethrow Hono errors as the original error