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=753&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 8146 results for "fetch"(1153ms)

getmain.tsx2 matches

@cyx•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function get() {
15 let jobs = await Promise.all(
16 places.map(async (place) => {
17 await fetch(place.url, {
18 method: "GET",
19 })

aqimain.tsx2 matches

@sina•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({

scrapeWebsitemain.tsx2 matches

@oca99•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function scrapeWebsite(url) {
5 "https://deno.land/x/deno_dom@v0.1.38/deno-dom-wasm.ts"
6 );
7 const response = await fetch(url);
8 const html = await response.text();
9 var parser = new DOMParser();

notionWordCounterFetchDaysmain.tsx1 match

@andreterron•Updated 1 year ago
3import { notionWordCounterDaysLastCached } from "https://esm.town/v/andreterron/notionWordCounterDaysLastCached";
4
5export async function notionWordCounterFetchDays() {
6 if (
7 notionWordCounterDaysLastCached >

getLinkAggregatorUserCountsmain.tsx2 matches

@tao_oat•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const getLinkAggregatorUserCounts = (async () => {
4 const response = await fetch("https://api.fedidb.org/v1/software?limit=40");
5 const json = await response.json();
6 const lemmy = json.data.find((software) =>

untitled_jbL1ikZSmain.tsx2 matches

@pdubroy•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const untitled_jbL1ikZS = (async () => {
4 const untitled_9k2u9UCG = (async () => {
5 const resp = await fetch(
6 "https://termin.samedi.de/b/kardiologie-neuhausen-nymphenburg/1/dr-med-jung-philip/erstkontakt-im-quartal--24?insuranceId=public"
7 );

lichessPgnmain.tsx2 matches

@jdan•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const lichessPgn = async (gameId: string) => {
4 const game = await fetch(`https://lichess.org/game/export/${gameId}`, {
5 headers: {
6 // Doesn't seem to actually want to do JSON :(

fetchTweetmain.tsx3 matches

@dpetrouk•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { normalizeURL } from "https://esm.town/v/stevekrouse/normalizeURL?v=3";
3
4export async function fetchTweet(url) {
5 const tweetId = url.match(/(\d{19})/)[1];
6 const tweetUrl =
7 `https://cdn.syndication.twimg.com/tweet-result?id=${tweetId}&lang=en`;
8 const res = await fetch(normalizeURL(tweetUrl), {
9 redirect: "follow",
10 });

fetchHTMLmain.tsx3 matches

@beneskildsen•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const fetchHTML = (async () => {
4 let f = await fetch("https://api.val.town/express/@beneskildsen.serveHTML", {
5 method: "GET",
6 headers: {

subredditExamplemain.tsx2 matches

@tfiers•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Reddit recent posts from /r/aww (cute animals)
4export let subredditExample = fetchJSON(
5 "https://www.reddit.com/r/aww/.json"
6);

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago