You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$1?q=react&page=20&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=react
Returns an array of strings in format "username" or "username/projectName"
Found 13013 results for "react"(1717ms)
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { DemoData, isApiError, isNotionPage } from "../index.tsx";
4import { ChessEmbedIframe } from "./chess.tsx";
47// current hash for nav styling
48const currentHash = useCurrentHash();
49// a little light logging so we can see that React is connecting the /frontend and the /backend
50console.log("Current path:", location.pathname);
51console.log("Demo data:", demoData);
496};
497498// this last return puts the page elements from renderDemoData into a div, which React likes
499return (
500<div>
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { DemoData, isApiError, isNotionPage } from "../index.tsx";
4import { ChessEmbedIframe } from "./chess.tsx";
47// current hash for nav styling
48const currentHash = useCurrentHash();
49// a little light logging so we can see that React is connecting the /frontend and the /backend
50console.log("Current path:", location.pathname);
51console.log("Demo data:", demoData);
496};
497498// this last return puts the page elements from renderDemoData into a div, which React likes
499return (
500<div>