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/$%7Bart_info.art.src%7D?q=api&page=1004&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 11576 results for "api"(1850ms)

valTownApiExampleUsermain.tsx2 matches

@tmcwUpdated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let valTownApiExampleUser = (async () => {
4 const handle = "tmcw";
5 const response = await fetch(`https://api.val.town/v1/alias/${handle}`);
6 const json = await response.json();
7 return json;

githubStarredmain.tsx1 match

@stevekrouseUpdated 1 year ago
3// Cities named Brooklyn
4export let githubStarred = fetchJSON(
5 "https://api.github.com/users/stevekrouse/starred",
6);

openAqNowcastAQImain.tsx1 match

@stevekrouseUpdated 1 year ago
5export async function openAqNowcastAQI({ location_id }) {
6 const { results } = await fetchJSON(
7 "https://api.openaq.org/v2/measurements?" +
8 new URLSearchParams({
9 limit: "100",

importGistsmain.tsx1 match

@stevekrouseUpdated 1 year ago
7 const supportedLanguages = ["JavaScript", "TypeScript"];
8 let imported = [];
9 const headers = { "X-GitHub-Api-Version": "2022-11-28" };
10 const { Octokit } = await import("npm:@octokit/core");
11 const octokit = new Octokit({ auth: githubToken });

myApimain.tsx1 match

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

myApimain.tsx1 match

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

nasaAPODmain.tsx1 match

@iBrokeitUpdated 1 year ago
3// returns NASA's Astronomy Picture of the Day (APOD)
4export const nasaAPOD = fetchJSON(
5 "api.nasa.gov/planetary/apod?api_key=DEMO_KEY",
6);

myApimain.tsx1 match

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

TodayForAnnalisamain.tsx1 match

@mttlwsUpdated 1 year ago
3export async function TodayForAnnalisa(req: express.Request, res: express.Response) {
4 const { activity } = await fetchJSON(
5 "https://www.boredapi.com/api/activity",
6 );
7 return res.send(`

updateInspoListmain.tsx2 matches

@rodrigotelloUpdated 1 year ago
1let { valTownInspoList } = await import("https://esm.town/v/rodrigotello/valTownInspoList");
2import { isValTownTeam } from "https://esm.town/v/stevekrouse/isValTownTeam?v=3";
3import { verifyAPIAuth } from "https://esm.town/v/stevekrouse/verifyAPIAuth?v=13";
4
5export async function updateInspoList(newList, auth) {
6 let handle = await verifyAPIAuth(auth);
7 if (isValTownTeam(handle)) {
8 valTownInspoList = newList;

gptApiTemplate2 file matches

@charmaineUpdated 1 day ago

mod-interview-api1 file match

@twschillerUpdated 1 day ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration