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=1383&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 15629 results for "api"(4776ms)

6 res: express.Response,
7) {
8 let response = await fetch("https://api.onepeloton.com/auth/login", {
9 method: "POST",
10 mode: "no-cors",
21 const session = await response.json();
22 let workoutResponse = await fetch(
23 `https://api.onepeloton.com/api/user/${session["user_id"]}/workouts`,
24 {
25 method: "GET",
38 );
39 const airtable = new Airtable({
40 apiKey: process.env.airTablePelo,
41 baseId: process.env.airTableBase,
42 tableName: "Table 1",

fetchCongressTradeReportsmain.tsx1 match

@claytn•Updated 1 year ago
11export async function fetchCongressTradeReports(callback) {
12 const res = await fetchJSON(
13 "https://bff.capitoltrades.com/trades?sortBy=-pubDate"
14 );
15 const trades = res.data;

getTrainsmain.tsx2 matches

@briscoe•Updated 1 year ago
3export const getTrains = (async () => {
4 const skerries = await fetch(
5 "https://irish-rail-rest-api.fly.dev/stations/SKRES/timetable",
6 ).then((res) => res.json());
7 const connolly = await fetch(
8 "https://irish-rail-rest-api.fly.dev/stations/CNLLY/timetable",
9 ).then((res) => res.json());
10 return {

getOpenMeteoForecastmain.tsx1 match

@wilt•Updated 1 year ago
93export async function getOpenMeteoForecast(params: OMParams) {
94 const data = await fetchJSON(
95 `https://api.open-meteo.com/v1/forecast?${new URLSearchParams(
96 params as {} // Typescript is stricter than Deno here
97 ).toString()}`
1import { testMutateSemantics } from "https://esm.town/v/stevekrouse/testMutateSemantics";
2
3export const unauthenticatedCanMutateViaObjectSneak = (api) =>
4 testMutateSemantics({
5 stateName: "@stevekrouse.testState",
6 api,
7 expected: (old, next) => next.n2 === next.n,
8 mutator: (now) => `(() => {

myApimain.tsx1 match

@irreal•Updated 1 year ago
1export function myApi(name) {
2 console.email("yay " + name);
3 return "hi :)" + name;

convertCurrencymain.tsx2 matches

@frankdilo•Updated 1 year ago
3export let convertCurrency = async (desired, base = "usd", amount = 1) => {
4 let { rates } = await fetchJSON(
5 `https://open.er-api.com/v6/latest/${base}`,
6 );
7 if (rates && rates[desired.toUpperCase()])
9 else {
10 let { rates } = await fetchJSON(
11 "https://api.coingecko.com/api/v3/exchange_rates",
12 );
13 return amount * rates[desired.toLowerCase()]?.value /

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

googleGeminiAPI2 file matches

@michaelwschultz•Updated 5 hours ago

HN-fetch-call2 file matches

@ImGqb•Updated 3 days ago
fetch HackerNews by API
Kapil01
apiv1