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%20%22Image%20title%22?q=fetch&page=1271&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 13310 results for "fetch"(1440ms)

nameNationalitymain.tsx2 matches

@laionazeredo•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Predict the nationality of a name
4export let nameNationality = fetchJSON(
5 "https://api.nationalize.io/?name=michael"
6);

bbc6MusicSpotifyRedirectmain.tsx2 matches

@neverstew•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let bbc6MusicSpotifyRedirect = async (req: Request) => {
4 const response = await fetch("https://6music.sharpshooterlabs.com/");
5 const html = await response.text();
6 const rawUrl = html

elysiaExamplemain.tsx1 match

@neverstew•Updated 1 year ago
3 const app = new Elysia()
4 .get("/", () => "Hello Elysia");
5 return app.fetch(req);
6};

secretEndpointFailuremain.tsx2 matches

@neverstew•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const secretEndpointFailure = fetch(
4 "https://neverstew-secretEndpoint.web.val.run",
5);

openapi2TSmain.tsx2 matches

@pomdtr•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { prettifyTS } from "https://esm.town/v/pomdtr/prettifyTS";
3
4export async function openapi2TS(url: string) {
5 const yaml = await import("npm:yaml");
6 const resp = await fetch(url);
7 const spec = yaml.parse(await resp.text());
8 return prettifyTS(

nominatimSearchmain.tsx2 matches

@mgruel•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/mgruel/fetchJSON";
2
3export function nominatimSearch(params: {
10 postalcode?: string;
11} = {}) {
12 return fetchJSON(
13 "https://nominatim.openstreetmap.org/search?" +
14 new URLSearchParams({

aliasmain.tsx2 matches

@mgruel•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/mgruel/fetchJSON";
2
3type UserParams = {
49 headers.Authorization = `Bearer ${params.token}`;
50 }
51 return fetchJSON<Result<P>>(url, { headers });
52}

editDiscordMessagemain.tsx2 matches

@tr3ntg•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3// Edit Discord message via webhook
8}) => {
9 const url = `${webhookUrl}/messages/${messageId}`;
10 const text = await fetchText(url, {
11 method: "PATCH",
12 headers: {

githubFollowersmain.tsx2 matches

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

notionSearchmain.tsx2 matches

@andreterron•Updated 1 year ago
1import { fetchNotion } from "https://esm.town/v/andreterron/fetchNotion";
2
3export let notionSearch = async ({token, query}) => {
4 const response = await fetchNotion({token, method: "POST", path: "v1/search", body: {page_size: 100, query}})
5 return response.results
6}

GithubPRFetcher

@andybak•Updated 1 day ago

proxiedfetch1 file match

@jayden•Updated 1 day ago