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=fetch&page=746&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 8150 results for "fetch"(3049ms)

pingReplitmain.tsx2 matches

@dr0•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function pingReplit() {
4 fetch("https://lookup.icxk.top/imgs/36x36.png");
5}

redirectmain.tsx2 matches

@thomasatflexos•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
19 const token = process.env.OAUTH_CLIENT_ID + ":" +
20 process.env.OAUTH_CLIENT_SECRET;
21 const response = await fetch("https://api.notion.com/v1/oauth/token", {
22 method: "POST",
23 headers: {

githubReposmain.tsx2 matches

@enzonotario•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub repos
4export let githubRepos = fetchJSON(
5 "https://api.github.com/users/stevekrouse/repos"
6);

aqimain.tsx2 matches

@lavallee•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let aqi = async () => {
4 let pm25 = (
5 await fetchJSON(
6 "https://api.openaq.org/v2/latest?" +
7 new URLSearchParams({

FigmaFileObjectAsyncmain.tsx2 matches

@rodrigotello•Updated 1 year ago
1import { fetchFigmaFile } from "https://esm.town/v/rodrigotello/fetchFigmaFile";
2import { FigmaURLJSONexample } from "https://esm.town/v/rodrigotello/FigmaURLJSONexample";
3import process from "node:process";
6 const apiToken = process.env.myFigmaAPIToken;
7 const fileKey = FigmaURLJSONexample.key;
8 return fetchFigmaFile(apiToken, fileKey);
9})();

imBoredmain.tsx2 matches

@valbee•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2let { boredActivities } = await import("https://esm.town/v/valbee/boredActivities");
3
4export const imBored = async () => {
5 return (boredActivities = fetchJSON(
6 "https://www.boredapi.com/api/activity"
7 ));

githubFollowersmain.tsx2 matches

@aviddabbler•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub followers
4export let githubFollowers = fetchJSON(
5 "https://api.github.com/users/stevekrouse/followers"
6);

homePagemain.tsx2 matches

@theverything•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let homePage = async (req: express.Request, res: express.Response) => {
4 const p = await fetch("https://www.jeffreyhorn.com");
5 const html = await p.text();
6 res.type("html");

satsNameApimain.tsx1 match

@ryanwaits•Updated 1 year ago
55 return c.json({ events });
56 });
57 return app.fetch(req);
58};

nasaAPODmain.tsx2 matches

@gerard•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Returns NASA's Astronomy Picture of the Day (APOD)
4export const nasaAPOD = fetchJSON("cutt.ly/T7ksirK");
5// Forked from @iBrokeit.nasaAPOD

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago