You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Burl%7D?q=fetch&page=16&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 14496 results for "fetch"(1298ms)
4445useEffect(() => {
46async function fetchQuote() {
47try {
48const known = await getKnownTexts();
54let waited = 0;
55while (value === undefined && waited <= 10) {
56const response = await fetch(`https://simplevalueapi.val.run/getValue?id=${uuid}`);
57const responseData = await response.json();
58if (responseData?.value?.cipher === undefined) {
95});
96}
97console.log("new uuid, fetching new quote");
98let keyword = "";
99let quote = "";
100let author = "";
101while (quote === "") {
102const response = await fetch(`/quote`);
103const responseData = await response.json();
104if ((responseData?.quote?.length ?? 0) >= 5) {
134}
135} catch (error) {
136console.error("Failed to fetch quote:", error);
137setLoadingError(`${error}`);
138setIsLoading(false);
140}
141142fetchQuote();
143}, []);
144