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/?q=api&page=936&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 11896 results for "api"(964ms)

getValVersionREADME.md1 match

@pomdtr•Updated 1 year ago
2Returns information about a specific version of a val.
3
4To access private vals this requires a secret called valtownToken, set to your API Token. See more about [authentication](https://docs.val.town/api/authentication) to understand how to generate a token.

getValVersionsmain.tsx1 match

@pomdtr•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=43";
2
3console.log(await fetchJSON("https://api.val.town/v1/vals/7f9019e4-dbf8-4ebe-b8cd-67730697624e/versions"));

getValVersionsREADME.md1 match

@pomdtr•Updated 1 year ago
2Returns information about each version of a specific val.
3
4To access private vals this requires a secret called valtownToken, set to your API Token. See more about [authentication](https://docs.val.town/api/authentication) to understand how to generate a token.

getValmain.tsx1 match

@pomdtr•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=43";
2
3console.log(await fetchJSON("https://api.val.town/v1/vals/7f9019e4-dbf8-4ebe-b8cd-67730697624e"));

getValREADME.md1 match

@pomdtr•Updated 1 year ago
2Gets information about a specific val.
3
4To access private vals, pass your API token as a secret to the function. Read more about [authentication](https://docs.val.town/api/authentication) to understand how to generate a token and save it as a secret.

userValsExamplemain.tsx1 match

@pomdtr•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=43";
2
3console.log(await fetchJSON("https://api.val.town/v1/users/a0bf3b31-15a5-4d5c-880e-4b1e22c9bc18/vals"));

evalPost2main.tsx1 match

@pomdtr•Updated 1 year ago
3console.log(
4 await fetchJSON(
5 "https://api.val.town/v1/eval",
6 {
7 method: "POST",

hnFollowAppmain.tsx1 match

@bentossell•Updated 1 year ago
9 search_by_date: true,
10 });
11 // for each post get the number of upvotes from the hackernews api using fetch
12 for (let post of posts) {
13 let res = await fetch(`https://hacker-news.firebaseio.com/v0/item/${post.objectID}.json`);

evalPost1main.tsx1 match

@pomdtr•Updated 1 year ago
3console.log(
4 await fetchJSON(
5 "https://api.val.town/v1/eval",
6 {
7 method: "POST",

gltf_torusmain.tsx1 match

@vladimyr•Updated 1 year ago
195 >
196 </meta>
197 <script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/3.4.0/model-viewer.min.js">
198 </script>
199 </head>

social_data_api_project3 file matches

@tsuchi_ya•Updated 1 day ago

simple-scrabble-api1 file match

@bry•Updated 1 day ago
apiv1
papimark21