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/?q=api&page=925&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 10968 results for "api"(933ms)

checkPollingStatusmain.tsx8 matches

@cescyang•Updated 1 year ago
4 const { default: axios } = await import("npm:axios");
5 const tasUrl =
6 "https://default.exp-tas.com/exptas9/a5766fee-9478-488b-9fc0-64d1ad72c290-IcePrime_MSNApp/api/v1/tas";
7 const urls = [
8 "https://sapphire-assignment-api-westus2-01-01.azurewebsites.net/api/VariantAssignment/checkPollingStatus",
9 "https://sapphire-assignment-api-eastus2-02-01.azurewebsites.net/api/VariantAssignment/checkPollingStatus",
10 "https://sapphire-assignment-api-japaneast-01-01.azurewebsites.net/api/VariantAssignment/checkPollingStatus",
11 "https://sapphire-assignment-api-koreacenter-01-01.azurewebsites.net/api/VariantAssignment/checkPollingStatus",
12 "https://sapphire-assignment-api-northeurope-01-01.azurewebsites.net/api/VariantAssignment/checkPollingStatus",
13 "https://sapphire-assignment-api-westeurope-01-01.azurewebsites.net/api/VariantAssignment/checkPollingStatus",
14 "https://sapphire-assignment-api-westus2-02-01.azurewebsites.net/api/VariantAssignment/checkPollingStatus",
15 ];
16 const results = [];

figmaAPIURLmain.tsx1 match

@rodrigotello•Updated 1 year ago
1export let figmaAPIURL = "https://api.figma.com";

welcomeEmailmain.tsx1 match

@rodrigotello•Updated 1 year ago
36 </li>
37 <li >
38 <a href="https://val.town/examples/apis" style="font-weight: 800; color:${valTownCSSLink}; display:inline">APIs</a>
39 </li>
40 <li>

myApimain.tsx1 match

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

getIpInfomain.tsx1 match

@redking00•Updated 1 year ago
3export const getIpInfo = async (req: express.Request) => {
4 const ip = (req as any).options.headers["true-client-ip"];
5 return await (await fetch(`http://ip-api.com/json/${ip}`)).json();
6};

sendFoodEmailmain.tsx3 matches

@subguy•Updated 1 year ago
10 let videoLink = "";
11 const url =
12 "https://tasty.p.rapidapi.com/recipes/list?from=0&size=80&tags=under_30_minutes";
13 const options = {
14 method: "GET",
15 headers: {
16 "X-RapidAPI-Key": process.env.tastyAPIKey,
17 "X-RapidAPI-Host": "tasty.p.rapidapi.com",
18 },
19 };

setWebhookExamplemain.tsx1 match

@vtdocs•Updated 1 year ago
6 {
7 // Replace this with _your_ express endpoint
8 url: "https://api.val.town/v1/express/vtdocs.telegramWebhookEchoMessage",
9 // Optionally, filter what kind of updates you want to receive here
10 allowed_updates: ["message"],

octokitExamplemain.tsx1 match

@vtdocs•Updated 1 year ago
5 username: "stevekrouse",
6 headers: {
7 "X-GitHub-Api-Version": "2022-11-28",
8 },
9 });

appendToCommentsmain.tsx1 match

@vtdocs•Updated 1 year ago
2
3export const appendToComments = (
4 // the Run API accepts any number of JSON-encoded args
5 // here we accept a single arg
6 data: any,

myApimain.tsx1 match

@wesbos•Updated 1 year ago
1import { guestCount } from "https://esm.town/v/wesbos/guestCount";
2
3export function myApi(name) {
4 return "hi" + guestCount;
5}

daily-advice-app1 file match

@dcm31•Updated 1 day ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaine•Updated 3 days ago
apiv1
papimark21