You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$2?q=api&page=34&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 18265 results for "api"(769ms)
367}
368369// API endpoint to analyze PR messages with concurrency
370app.post("/api/analyze", async c => {
371try {
372const body: AnalysisRequest = await c.req.json();
397398// Step 2: Analyze chunks concurrently with batching to avoid rate limits
399const BATCH_SIZE = 3; // Process 3 chunks at a time to avoid overwhelming the API
400const chunkAnalyses: ChunkAnalysis[] = [];
401
410chunkAnalyses.push(...batchResults);
411
412// Small delay between batches to be respectful to the API
413if (i + BATCH_SIZE < chunks.length) {
414await new Promise(resolve => setTimeout(resolve, 100));
281282try {
283const response = await fetch("/api/analyze", {
284method: "POST",
285headers: {