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=53&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 11496 results for "api"(1229ms)
42</h2>
43<ol>
44<li>Login with your Val Town API token (with projects:read, projects:write, user:read permissions)</li>
45<li>Select a project to work on</li>
46<li>Chat with Claude about your code</li>
79</div>
80<h3>Cost Tracking</h3>
81<p>See estimated API usage costs for each interaction</p>
82</div>
83</section>
92<ul>
93<li>React frontend with TypeScript</li>
94<li>Hono API server backend</li>
95<li>Web Audio API for sound notifications</li>
96<li>AI SDK for Claude integration</li>
97</ul>
98<p>
99The application proxies requests to the Anthropic API and Val Town API, allowing Claude to view and edit your
100project files directly.
101</p>
8const { isAuthenticated, authenticate, error } = useAuth();
9const [tokenValue, setTokenValue] = useState("");
10const [apiKey, setApiKey] = useState("");
11// const [invalid, setInvalid] = useState(""); // TODO
1213const handleSubmit = (e) => {
14e.preventDefault();
15authenticate(tokenValue, apiKey);
16};
1736>
37<div>
38<label htmlFor="valtown-token" className="label">Val Town API Token</label>
39<div style={{ fontSize: "0.8em", color: "#666" }}>
40<p>
41<a href="https://www.val.town/settings/api/new" target="_blank" rel="noreferrer">
42Create a Val Town token here
43</a>
58</div>
59<div>
60<label htmlFor="anthropic-api-key" className="label">Anthropic API Key (optional)</label>
61<input
62type="password"
63id="anthropic-api-key"
64name="anthropic-key"
65value={apiKey}
66onChange={e => {
67setApiKey(e.target.value);
68}}
69/>