You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/image-url.jpg%20%22Image%20title%22?q=api&page=60&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 11659 results for "api"(1287ms)
1011// Look up the user's location from their IP
12const geoResponse = await fetch(`http://ip-api.com/json/${ip}`);
13const geoData = await geoResponse.json();
1426<style>
27{`
28@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');
29body { font-family: 'Share Tech Mono', monospace; background: #0a0a0a; color: #00ff00; }
30.glow { text-shadow: 0 0 10px #00ff00; }
382383// ============================================================
384// TELEGRAM API INTERACTION
385// ============================================================
386387/**
388* Send a message using the Telegram API
389*/
390async function sendTelegramMessage(chatId, text) {
392const botToken = process.env.TELEGRAM_BOT_TOKEN;
393394const response = await fetch(`https://api.telegram.org/bot${botToken}/sendMessage`, {
395method: "POST",
396headers: { "Content-Type": "application/json" },
422const botToken = process.env.TELEGRAM_BOT_TOKEN;
423424const response = await fetch(`https://api.telegram.org/bot${botToken}/setWebhook`, {
425method: "POST",
426headers: { "Content-Type": "application/json" },
446const botToken = process.env.TELEGRAM_BOT_TOKEN;
447448const response = await fetch(`https://api.telegram.org/bot${botToken}/getWebhookInfo`);
449const result = await response.json();
450return result;