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=760&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 8136 results for "fetch"(1936ms)

githubKeysmain.tsx2 matches

@kyle•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function githubKeys(username: string): Promise<string> {
4 const res = await fetch(`https://github.com/${username}.keys`);
5 return res.text();
6}

getmain.tsx2 matches

@dmuth0•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/dmuth/fetchJSON";
2
3export let get = () => {
4 retval = fetchJSON("https://httpbin.dmuth.org/get");
5 return retval;
6};

githubFollowersmain.tsx2 matches

@JanJakes•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);

githubFollowersmain.tsx2 matches

@rld•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/roskideluge/followers",
6);

getCNNNewsShortmain.tsx2 matches

@fab1an•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getCNNNewsShort() {
4 const response = await fetch(
5 "https://saurav.tech/NewsAPI/everything/cnn.json"
6 );

forbudmain.tsx4 matches

@antonnyman•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const forbud = async (req: Request) => {
1256 const app = new Hono();
1257 async function getURL() {
1258 const htmlResponse = await fetch("https://datawrapper.dwcdn.net/4iRku");
1259 const htmlData = await htmlResponse.text();
1260 const url = htmlData.split("0; url=")[1].split('">')[0];
1264 async function getDataset() {
1265 let url = await getURL();
1266 const response = await fetch(url, {
1267 headers: {
1268 "Content-Type": "text/csv",
1313 }
1314 app.get("/", async (c) => c.json(await csvToCounties()));
1315 return app.fetch(req);
1316};

boredActivitiesmain.tsx2 matches

@emcfarlane•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Activity suggestions for when you're bored
4export let boredActivities = fetchJSON(
5 "https://www.boredapi.com/api/activity"
6);

cityLookupmain.tsx2 matches

@potherca•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Cities named Brooklyn
4export let cityLookup = fetchJSON(
5 "https://nominatim.openstreetmap.org/search.php?city=brooklyn&format=jsonv2"
6);

webscrapeWikipediaIntromain.tsx2 matches

@vtdocs•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export const webscrapeWikipediaIntro = (async () => {
4 const cheerio = await import("npm:cheerio");
5 const html = await fetchText(
6 "https://en.wikipedia.org/wiki/OpenAI",
7 );

telegramGetMemain.tsx2 matches

@vtdocs•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const telegramGetMe = async (botToken: string) =>
4 fetchJSON(
5 `https://api.telegram.org/bot${botToken}/getMe`,
6 );

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago