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=938&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 11922 results for "api"(1205ms)

mdx_readmeREADME.md2 matches

@pomdtr•Updated 1 year ago
5import msg from "https://esm.town/v/pomdtr/msg"
6
7import {capitalize} from "https://esm.sh/lodash-es"
8
9export const title = "mdx rendered from a val readme"
10
11# {capitalize(title)}
12
13> {msg}

cdnmain.tsx4 matches

@pomdtr•Updated 1 year ago
4
5async function createScreenshot(code: string) {
6 const apiUrl = "https://sourcecodeshots.com/api/image";
7 const resp = await fetch(apiUrl, {
8 method: "POST",
9 headers: {
39 }
40 }
41 const resp = await fetch(`https://api.val.town/v1/alias/${author}/${name}`, {
42 headers,
43 });
50 const version = url.searchParams.get("v");
51 const resp = await fetch(
52 `https://api.val.town/v1/vals/${val.id}/versions/${version}`,
53 { headers },
54 );

getValVersionmain.tsx1 match

@pomdtr•Updated 1 year ago
3console.log(
4 await fetchJSON(
5 `https://api.val.town/v1/vals/1f32d4c1-332e-4135-889f-8df408924a9d/versions/1`,
6 {
7 headers: {

coralLungfishREADME.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.

aliasValExamplemain.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/alias/stevekrouse/fetchJSON"));

aliasExamplemain.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/alias/stevekrouse"));

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"));

social_data_api_project3 file matches

@tsuchi_ya•Updated 2 hours ago

simple-scrabble-api1 file match

@bry•Updated 2 days ago
apiv1
papimark21