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/$%7Burl%7D?q=fetch&page=1263&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 13568 results for "fetch"(4699ms)

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

proxyJpegmain.tsx2 matches

@steven•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const proxyJpeg = async (request: Request): Promise<Response> => {
4 const url = new URL(request.url).searchParams.get("url");
5 const response = await fetch(url);
6 const blob = await response.arrayBuffer();
7 return new Response(blob, {

getSeattleSubwayInstagramPostsmain.tsx2 matches

@steven•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let getSeattleSubwayInstagramPosts = async (
4 request: Request,
5): Promise<Response> => {
6 let data = await fetch(
7 `https://api.apify.com/v2/acts/apify~instagram-post-scraper/runs/last/dataset/items?token=apify_api_wi6mnWH8aJ5yiwv3ePmYV7BI31yTE13ameye`,
8 );

GithubPRFetcher

@andybak•Updated 2 days ago

proxiedfetch1 file match

@jayden•Updated 3 days ago