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/$%7Burl%7D?q=api&page=1026&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 12013 results for "api"(1742ms)

expressHTMLExample2main.tsx1 match

@henrik•Updated 1 year ago
1import { mails } from "https://esm.town/v/henrik/mails";
2
3// View at https://api.val.town/express/@stevekrouse.expressHTMLExample?name=Steve
4export async function expressHTMLExample2(
5 req: express.Request,

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}

social_data_api_project3 file matches

@tsuchi_ya•Updated 3 hours ago

simple-scrabble-api1 file match

@bry•Updated 3 days ago
apiv1
papimark21