You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Bsuccess?q=fetch&page=5&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 8124 results for "fetch"(781ms)
129130// This is the entry point for HTTP vals
131export default app.fetch;
116posts = window.INITIAL_DATA.posts;
117} else {
118const response = await fetch('/api/posts');
119posts = await response.json();
120}
156
157try {
158const response = await fetch(`/api/posts/${params.slug}`);
159
160if (!response.ok) {