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=api&page=1042&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 12056 results for "api"(1645ms)

getPublicValsmain.tsx2 matches

@stevekrouse•Updated 1 year ago
3export const getPublicVals = async (username) => {
4 let { id } = await fetchJSON(
5 `https://api.val.town/v1/alias/${username}`,
6 );
7 return fetchJSON(
8 `https://api.val.town/v1/users/${id}/vals`,
9 );
10};

testMutateSemantics2main.tsx4 matches

@stevekrouse•Updated 1 year ago
1import { TEST_API } from "https://esm.town/v/stevekrouse/TEST_API";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
16}) {
17 const { data: last } = await fetchJSON(
18 `${TEST_API}/eval/${stateName}`
19 );
20 const now = Date.now();
21 await fetchJSON(
22 `${TEST_API}/eval/${mutator(now)}`
23 );
24 const { data: next } = await fetchJSON(
25 `${TEST_API}/eval/${stateName}`
26 );
27 const mutated = next === now;

untitled_oliveSwordtailmain.tsx1 match

@hankenstein•Updated 1 year ago
1export const untitled_oliveSwordtail = (async () => {
2 var name = "hank";
3 function myApi(name) {
4 return "hi " + name;
5 }

myApimain.tsx1 match

@lazydefi1•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

myApimain.tsx1 match

@M3RCYAJ•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

fetchGiphymain.tsx2 matches

@simply_say_m•Updated 1 year ago
2
3export const fetchGiphy = (async (searchTerm) => {
4 const { GiphyFetch } = await import("npm:@giphy/js-fetch-api");
5 const gf = new GiphyFetch(process.env.giphyApiKey);
6 const { data: gifs } = await gf.search(searchTerm, { limit: 10 });
7 return gifs;

myApimain.tsx1 match

@blackhaj•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

nameNationalitymain.tsx1 match

@feep•Updated 1 year ago
3// Predict the nationality of a name
4export let nameNationality = fetchJSON(
5 "https://api.nationalize.io/?name=michael"
6);

myApimain.tsx1 match

@cescyang•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

redirectmain.tsx1 match

@thomasatflexos•Updated 1 year ago
19 const token = process.env.OAUTH_CLIENT_ID + ":" +
20 process.env.OAUTH_CLIENT_SECRET;
21 const response = await fetch("https://api.notion.com/v1/oauth/token", {
22 method: "POST",
23 headers: {

social_data_api_project3 file matches

@tsuchi_ya•Updated 1 day ago

simple-scrabble-api1 file match

@bry•Updated 4 days ago
snartapi
papimark21