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?q=api&page=1051&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 11837 results for "api"(1128ms)

myApimain.tsx1 match

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

myApimain.tsx1 match

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

telegramBotmain.tsx2 matches

@narthur•Updated 1 year ago
1export const telegramBot = async (req: express.Request, res: express.Response) => {
2 // if (
3 // req.get("x-telegram-bot-api-secret-token") !==
4 // @me.secrets.telegram_webhook_token
5 // ) {
12 // const text: string = await @me.gptChat(req.body.message.text);
13 // @vtdocs.telegramSendMessage(
14 // @me.secrets.telegram_api_token,
15 // { chat_id: chatId, text },
16 // );

myApimain.tsx1 match

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

aqimain.tsx1 match

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

telegramSendMessagemain.tsx1 match

@vtdocs•Updated 1 year ago
15}) =>
16 fetchJSON(
17 `https://api.telegram.org/bot${botToken}/sendMessage`,
18 {
19 method: "POST",

getGithubStarsmain.tsx2 matches

@vtdocs•Updated 1 year ago
3export const getGithubStars = async (username: string) => {
4 const user = await fetchJSON(
5 `https://api.github.com/users/${username}`,
6 );
7 let totalStars = 0;
11 for (
12 const repo of await fetchJSON(
13 `https://api.github.com/users/${username}/repos?per_page=100&page=${
14 pages + 1
15 }`,

polygonPriceOnDatemain.tsx2 matches

@rwev•Updated 1 year ago
1import { polygonDailyAPI } from "https://esm.town/v/rwev/polygonDailyAPI";
2
3export async function polygonPriceOnDate(ticker, isoDate) {
4 const response = await polygonDailyAPI(ticker, isoDate);
5 if (response.status != "OK")
6 throw new Error(

myApimain.tsx1 match

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

mathFactmain.tsx1 match

@steveruizok•Updated 1 year ago
3// Random math fact
4export let mathFact = fetchText(
5 "http://numbersapi.com/random/math"
6);

simple-scrabble-api1 file match

@bry•Updated 7 hours ago

social_data_api_project3 file matches

@tsuchi_ya•Updated 15 hours ago
apiv1
papimark21