Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/image-url.jpg%20%22Optional%20title%22?q=fetch&page=1&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 8212 results for "fetch"(1004ms)

No matches found in users.

Try switching to another result type using the tabs above.

BasicExpressGolangapp.ts1 match

@tyler71•Updated 55 mins ago
36});
37
38export default app.fetch;

v2-vals-post-request-examplemain.tsx3 matches

@shouser•Updated 1 hour ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import ValTown from "npm:@valtown/sdk";
4
30// Example of using the API to create a new val with a single file
31// First create the val
32const valResponse = await fetch(
33 `${API_URL}/v2/vals`,
34 {
52// Then create the file
53const val = await valResponse.json();
54const fileResponse = await fetch(
55 `${API_URL}/v2/vals/${val.id}/files?path=main.tsx`,
56 {

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago