You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7BsvgDataUrl%7D?q=fetch&page=2&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 14084 results for "fetch"(2413ms)
27- Use Hono for API endpoints: `import { Hono } from "https://esm.sh/hono@3.11.7"`
28- **Never** use `serveStatic` middleware - use Val Town utilities instead
29- Entry point: `export default app.fetch`
30- Always include error unwrapping: `app.onError((err, c) => { throw err; })`
31138- **Federation**: AT Protocol compliant
139- **API Framework**: Hono with proper error unwrapping
140- **Entry Point**: `backend/index.ts` exports `app.fetch`
141- **Production URL**: https://anchorpds.val.run/
142171### Val Town Specifics
172173- Entry point: `backend/index.ts` exports `app.fetch`
174- No local development server - deploy to Val Town to test HTTP endpoints
175- Use Val Town dashboard for environment variables and secrets
26for (const pdsHost of commonPDSHosts) {
27try {
28const sessionResponse = await fetch(`${pdsHost}/xrpc/com.atproto.server.getSession`, {
29headers: {
30"Authorization": `Bearer ${token}`,