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/$%7Bart_info.art.src%7D?q=api&page=1635&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 18289 results for "api"(3269ms)

myApimain.tsx1 match

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

currencymain.tsx2 matches

@ernest•Updated 1 year ago
3export let currency = async (base = "eur", desired, amount = 1) => {
4 let { rates } = await fetchJSON(
5 "https://open.er-api.com/v6/latest/eur"
6 );
7 if (rates && rates[desired.toUpperCase()])
9 else {
10 let { rates } = await fetchJSON(
11 "https://api.coingecko.com/api/v3/exchange_rates"
12 );
13 return (

myApimain.tsx1 match

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

myApiDeleteAllmain.tsx1 match

@acmu•Updated 1 year ago
2let { nameList } = await import("https://esm.town/v/acmu/nameList");
3
4export async function myApiDeleteAll() {
5 nameList = [];
6 await set("nameList", nameList);

aqimain.tsx1 match

@freyrva•Updated 1 year ago
4 let pm25 = (
5 await fetchJSON(
6 "https://api.openaq.org/v2/latest?" +
7 new URLSearchParams({
8 limit: "10",

getFatCatListingsmain.tsx1 match

@Ryan•Updated 1 year ago
3export const getFatCatListings = async () => {
4 const meResult = await fetch(
5 "https://api-mainnet.magiceden.dev/v2/collections/degenfatcats/listings?offset=0&limit=20",
6 {
7 headers: { Accept: "application/json" },

myApimain.tsx1 match

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

myApimain.tsx1 match

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

githubFollowingmain.tsx1 match

@dharmatech•Updated 1 year ago
3// Github following
4export let githubFollowing = fetchJSON(
5 "https://api.github.com/users/stevekrouse/following"
6);

untitled_cS5pGEaVmain.tsx1 match

@baj•Updated 1 year ago
1export const untitled_cS5pGEaV = (async () => {
2 let count = 0;
3 function myApi() {
4 return count++;
5 }

github-api1 file match

@cricks_unmixed4u•Updated 21 hours ago

beeminder-api4 file matches

@cricks_unmixed4u•Updated 22 hours ago
apiry
Kapil01