You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Burl%7D?q=fetch&page=13&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 8145 results for "fetch"(893ms)
12const basic = Buffer.from(`${client_id}:${client_secret}`).toString("base64");
1314const response = await fetch(TOKEN_ENDPOINT, {
15method: "POST",
16headers: {
31const { access_token } = await getAccessToken(client_id, client_secret, refresh_token);
3233const response = await fetch(NOW_PLAYING_ENDPOINT, {
34headers: {
35Authorization: `Bearer ${access_token}`,
19: Math.floor((Date.now() - 2 * 24 * 60 * 60 * 1000) / 1000);
2021// Fetch and log tweets
22const response = await socialDataSearch(`${query} since_time:${timeFrame}`);
23console.log("Response from socialDataSearch:", response);