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=1011&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 12104 results for "api"(2337ms)

EmailNotifIfDidntCodemain.tsx1 match

@Davidkim•Updated 1 year ago
15 }
16 const githubEvents = await fetchJSON(
17 "https://api.github.com/users/daviddkkim/events",
18 ) as Data;
19 //early return if no github events

holidaysUSmain.tsx1 match

@testhandle•Updated 1 year ago
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v2/publicholidays/2023/US"
6);

myApimain.tsx1 match

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

githubFollowersmain.tsx1 match

@stungeye•Updated 1 year ago
3export async function githubFollowers() {
4 let followers = await fetchJSON(
5 "https://api.github.com/users/stungeye/followers",
6 );
7 return followers;

homemain.tsx1 match

@rym•Updated 1 year ago
2import { blocks as blocks2 } from "https://esm.town/v/rym/blocks";
3
4// Access via https://api.val.town/v1/express/rym.home
5export async function home(req: express.Request, res: express.Response) {
6 const blocks = await blocks2();

myApimain.tsx1 match

@sbeben•Updated 1 year ago
1export function myApi() {
2 return ` <!DOCTYPE html><html lang=";
3 en;

harryPotterDatamain.tsx1 match

@byzantine_emperor•Updated 1 year ago
5 try {
6 const responseData = await fetch(
7 "https://hp-api.onrender.com/api/characters",
8 );
9 const data = await responseData.json();

getHolidaysmain.tsx1 match

@ptr•Updated 1 year ago
4 try {
5 return fetchJSON(
6 `https://date.nager.at/api/v2/publicholidays/${year}/${country}`
7 );
8 } catch (err) {

myApimain.tsx1 match

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

posthogStatusTrackermain.tsx4 matches

@ianvph•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { set } from "https://esm.town/v/std/set?v=11";
3import { postHogAPICapture } from "https://esm.town/v/ianvph/postHogAPICapture";
4import { email } from "https://esm.town/v/ianvph/email";
5import { phProjectAPIKey } from "https://esm.town/v/ianvph/phProjectAPIKey";
6import { newestStatusGuid } from "https://esm.town/v/ianvph/newestStatusGuid";
7import { parseXML } from "https://esm.town/v/stevekrouse/parseXML?v=1";
26 };
27 const captureData = {
28 key: phProjectAPIKey,
29 event: "posthog status update",
30 properties: properties,
31 distinct_id: email,
32 };
33 postHogAPICapture(captureData);
34 await set("newestStatusGuid", newestEntry.guid);
35 return "posthog status update captured";

social_data_api_project3 file matches

@tsuchi_ya•Updated 1 day ago

simple-scrabble-api1 file match

@bry•Updated 4 days ago
mux
Your friendly, neighborhood video API.
api