You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Bart_info.art.src%7D?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 11482 results for "api"(349ms)
42</h2>
43<ol>
44<li>Login with your Val Town API token (with val:read, val:write, user:read permissions)</li>
45<li>Add your Anthropic API key</li>
46<li>Select a project to work on</li>
47<li>Chat with Claude about your code</li>
80</div>
81<h3>Cost Tracking</h3>
82<p>See estimated API usage costs for each interaction</p>
83</div>
84</section>
93<ul>
94<li>React frontend with TypeScript</li>
95<li>Hono API server backend</li>
96<li>Web Audio API for sound notifications</li>
97<li>AI SDK for Claude integration</li>
98</ul>
99<p>
100The application proxies requests to the Anthropic API and Val Town API, allowing Claude to view and edit your
101project files directly.
102</p>
87});
8889// API endpoint to get all posts
90app.get('/api/posts', async (c) => {
91const posts = await getAllPosts();
92return c.json(posts);
93});
9495// API endpoint to get a single post
96app.get('/api/posts/:slug', async (c) => {
97const slug = c.req.param('slug');
98const post = await getPost(slug);