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/$%7Bsuccess?q=api&page=1010&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 11852 results for "api"(1090ms)

myApimain.tsx1 match

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

testcase1main.tsx1 match

@marianoguerra•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/swyx/fetchJSON";
2
3export let testcase1 = fetchJSON('https://api.val.town/eval/@stevekrouse.messages')
4
5// export state = () => {

myApimain.tsx1 match

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

parseCommonElementsExamplemain.tsx1 match

@neverstew•Updated 1 year ago
1export const parseCommonElementsExample = (
2 $: import("npm:cheerio@1.0.0-rc.12").CheerioAPI,
3 element: import("npm:cheerio@1.0.0-rc.12").Element,
4) => ({

telegramWebhookEchoMessagemain.tsx1 match

@neverstew•Updated 1 year ago
5 // Verify this webhook came from our bot
6 if (
7 req.headers.get("x-telegram-bot-api-secret-token") !==
8 process.env.telegramWebhookSecret
9 ) {

likesmain.tsx1 match

@neverstew•Updated 1 year ago
26}> {
27 return fetchJSON(
28 "https://api.val.town/v1/me/likes?" + searchParams({
29 offset: offset?.toString(),
30 limit: limit?.toString(),

aliasValExamplemain.tsx1 match

@neverstew•Updated 1 year ago
4 username: "stevekrouse",
5 valName: "parentReference",
6 // for private vals, pass your val town api token
7 // token: @me.secrets.valtownToken,
8});

myApimain.tsx1 match

@moody•Updated 1 year ago
1export function myApi(name) {
2 console.email("Yo, " + name);
3 return "hi " + name;

myApimain.tsx1 match

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

aqimain.tsx1 match

@axelav•Updated 1 year ago
3export let aqi = async () => {
4 let res = await fetchJSON(
5 "https://api.openaq.org/v2/latest?" +
6 new URLSearchParams({
7 limit: "10",

social_data_api_project3 file matches

@tsuchi_ya•Updated 4 hours ago

simple-scrabble-api1 file match

@bry•Updated 21 hours ago
apiv1
papimark21