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/image-url.jpg?q=fetch&page=751&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 8438 results for "fetch"(1074ms)

adcFeedmain.tsx2 matches

@wilt•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3/*
11export async function adcFeed(req, res) {
12 const feedUrl = "http://adc.equalarea.com/feed/";
13 const feedXml = await fetchText(feedUrl);
14 const enclosureRegex = /<enclosure .* type="audio\/ogg" \/>/g;
15 res.set("Content-Type", "application/rss+xml; charset=UTF-8");

upscaleThisUrlmain.tsx3 matches

@andrew•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
27 },
28 };
29 const result = await fetch(url, {
30 method: "POST",
31 headers: {
39 }
40 if (jobId) {
41 const result = await fetch(url + "/" + jobId, {
42 method: "GET",
43 headers: {

chatWithPdfRetrievermain.tsx3 matches

@sdan•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function chatWithPdfRetriever(query: string, pdf_url: string) {
5 const queryUrl = "https://cardinal.tail8de85.ts.net/pdf/query";
6 // First POST request to load the PDF
7 const loadResponse = await fetch(loadUrl, {
8 method: "POST",
9 headers: {
18 }
19 // Second POST request to query the loaded PDF
20 const queryResponse = await fetch(queryUrl, {
21 method: "POST",
22 headers: {

arenaApiExamplemain.tsx2 matches

@tmcw•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let arenaApiExample = (async () => {
4 const resp = await fetch(
5 "http://api.are.na/v2/channels/that-glassy-dark-design-style",
6 );

runGETmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let runGET = fetchJSON(
4 `https://api.val.town/v1/run/stevekrouse.add?args=${JSON.stringify([1, 2])}`,
5);

getDiscordChannelsmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { discordFetch } from "https://esm.town/v/stevekrouse/discordFetch";
2
3export let getDiscordChannels = (token, guildId) => discordFetch(
4 token,
5 `guilds/${guildId}/channels`

dateMeNYWomenmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchDateMeProfiles } from "https://esm.town/v/stevekrouse/fetchDateMeProfiles";
2
3// date me docs of women in nyc
4export let dateMeNYWomen = fetchDateMeProfiles().then((
5 profiles,
6) =>

spotifyAPImain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let spotifyAPI = ({token, endpoint, ...params}) => fetchJSON(
4 `https://api.spotify.com/v1/${endpoint}?${new URLSearchParams(params)}`,
5 {

runPOSTmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let runPOST = fetchJSON(
4 `https://api.val.town/v1/run/stevekrouse.add`,
5 {

nasaAPODmain.tsx2 matches

@dgzlopes•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 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago