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=996&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 12051 results for "api"(2309ms)

isSupportedmain.tsx1 match

@spurushottam13•Updated 1 year ago
1export async function isSupported(jsInterface) {
2 const caniuse = await import("npm:caniuse-api");
3 return caniuse.getSupport("border-radius");
4}

unsplashFmain.tsx1 match

@byrneml•Updated 1 year ago
4export let unsplashF = (token) =>
5 fetchJSON(
6 `https://api.unsplash.com/photos`,
7 {
8 headers: {

modelInvokemain.tsx1 match

@stevekrouse•Updated 1 year ago
4const model = new ChatOpenAI({
5 temperature: 0.9,
6 openAIApiKey: process.env.openai,
7});
8

animemain.tsx2 matches

@yieldray•Updated 1 year ago
38 if (!name) throw new Error("Cannot get cat");
39 const result: any[] = [];
40 for (const re of html.matchAll(/data-apireq="(.[^"]+)"/g)) {
41 const encoded = re[1];
42 const decoded: {
63 const ep = cat.find((c) => c.episode.startsWith(String(episode)));
64 if (!ep) throw new Error("Episode not exists");
65 const res = await fetch("https://v.anime1.me/api", {
66 method: "POST",
67 headers: {

crux_addREADME.md1 match

@yieldray•Updated 1 year ago
1Migrated from folder: api/crux_add

extractReceiptEndpointmain.tsx2 matches

@clayway•Updated 1 year ago
1import { callGoogleSheetsAPI } from "https://esm.town/v/clayway/callGoogleSheetsAPI";
2import { extractReceiptInfo } from "https://esm.town/v/clayway/extractReceiptInfo";
3import process from "node:process";
37 } = result;
38 try {
39 await callGoogleSheetsAPI({
40 sheetId: process.env.BUDGET_SHEET_ID,
41 serviceAccount: process.env.GOOGLE_SERVICE_ACCOUNT,

getRedditAccessTokenmain.tsx1 match

@tambre•Updated 1 year ago
13 `${process.env.reddit_client_id}:${process.env.reddit_client_secret}`,
14 ).toString("base64");
15 const response = await fetch("https://www.reddit.com/api/v1/access_token", {
16 method: "POST",
17 body: formData,

authenticateRedditmain.tsx1 match

@mschleske•Updated 1 year ago
24
25 try {
26 response = await fetch("https://www.reddit.com/api/v1/access_token", {
27 headers: headers,
28 method: "POST",

valSignmain.tsx1 match

@easrng•Updated 1 year ago
11}) {
12 const topUser = whoami().at(-1).slice(1).split(".")[0];
13 const verifyPublicKey = await __utils__.api(topUser + ".vsPublicKey");
14 if (verifyPublicKey !== keys.publicKey)
15 throw new Error("keypair doesn't match @" + topUser + ".vsPublicKey()");

valSignVerifymain.tsx1 match

@easrng•Updated 1 year ago
7 const [handle, encodedSignedMessage] = matches.slice(1);
8 const publicKey = Buffer.from(
9 await __utils__.api(handle + ".vsPublicKey"),
10 "base64",
11 );

social_data_api_project3 file matches

@tsuchi_ya•Updated 1 day ago

simple-scrabble-api1 file match

@bry•Updated 4 days ago
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com
mux
Your friendly, neighborhood video API.