You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Burl%7D?q=fetch&page=10&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 8146 results for "fetch"(1035ms)
60try {
61await cleanupDebugHtmlBlobs(gameName);
62const html = await fetchSteamDiscussionsPage(steamUrl);
63await saveDebugHtml(gameName, html);
64115}
116117async function fetchSteamDiscussionsPage(url: string): Promise<string> {
118const response = await fetch(url, {
119headers: {
120"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
333console.log("Discord Webhook Payload:", JSON.stringify(payload, null, 2));
334335const response = await fetch(webhookUrl, {
336method: "POST",
337headers: { "Content-Type": "application/json" },
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}`,