You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$1?q=api&page=37&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 19784 results for "api"(1516ms)
385<div class="card">
386<h3>Error Loading Suggestions</h3>
387<p>We couldn't get AI-powered task suggestions. This can happen due to network issues or API errors.</p>
388<div class="status-entry error">\${esc(suggestionsError)}</div>
389<button id="retry-suggestions-btn" class="button button-primary" style="margin-top:10px;">Retry Suggestions</button>
928}
929} catch (error) {
930const errMsg = `AI API Error: ${error.message}`;
931log.push({ agent: agentName, type: "error", message: errMsg });
932console.error(`${agentName} Error:`, error);
933return { error: "AI_API_ERROR", message: errMsg, details: error.toString() };
934}
935}
4344try {
45const response = await fetch("/api/user/username", {
46method: "POST",
47headers: {