You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/...?q=api&page=14&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 19823 results for "api"(3342ms)
27<title>me/irl</title>
28<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.9.3/dist/confetti.browser.min.js" defer></script>
29<link rel="preconnect" href="https://fonts.googleapis.com">
30<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
31<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
32<link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;500&display=swap" rel="stylesheet">
33<style>
34@import url('https://fonts.googleapis.com/css2?family=Lobster+Two:ital,wght@1,700&display=swap');
3536:root {
343}
344
345const API_URL = '${sourceUrl}';
346const STORE_KEY = 'habit_forge_v5';
347let habits = [];
603resultsContainer.innerHTML = '<div class="palette-item"><span class="name">Generating icon ideas...</span></div>';
604try {
605const res = await fetch(\`\${API_URL}?action=suggestIcons\`, {
606method: 'POST', headers: {'Content-Type': 'application/json'},
607body: JSON.stringify({ habitName: name })
710711async function confirmAndSuggestHabit(){
712showConfirmation('Ask AI for a new habit suggestion?',async()=>{try{$('#command-palette-results').innerHTML='<div class="palette-item"><span class="name">Asking AI...</span></div>';const res=await fetch(\`\${API_URL}?action=suggestHabit\`,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({habits:habits.map(h=>h.name)})});const suggestion=await res.json();if(!res.ok)throw new Error(suggestion.error||'Failed');showConfirmation(\`AI suggests: <b>\${suggestion.name} \${suggestion.icon}</b>. Add it?\`,()=>{createHabit(suggestion.name, suggestion.icon);})}catch(err){togglePalette(false)}})
713}
714
727try {
728$('#command-palette-results').innerHTML = '<div class="palette-item"><span class="name">Asking AI...</span></div>';
729const res = await fetch(\`\${API_URL}?action=suggestHabitSet\`, {
730method: 'POST',
731headers: { 'Content-Type': 'application/json' },
10const message = `Прошло ${diff} дней из 3650`;
1112const url = `https://api.telegram.org/bot${BOT_TOKEN}/sendMessage`;
13const response = await fetch(url, {
14method: "POST",