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=1038&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 13197 results for "fetch"(3141ms)

BalanceCapMonstermain.tsx3 matches

@augustohp•Updated 8 months ago
1import fetchBalanceFromCaptchaProvider from "https://esm.town/v/augustohp/CaptchaGetBalance";
2
3export default async function fetchAntiCaptchaBalance(
4 token: string,
5): Promise<number> {
6 return await fetchBalanceFromCaptchaProvider(token, "capmonster");
7}

BalanceAntiCaptchamain.tsx3 matches

@augustohp•Updated 8 months ago
1import fetchBalanceFromCaptchaProvider from "https://esm.town/v/augustohp/CaptchaGetBalance";
2
3export default async function fetchAntiCaptchaBalance(
4 token: string,
5): Promise<number> {
6 return await fetchBalanceFromCaptchaProvider(token, "anticaptcha");
7}

CaptchaGetBalancemain.tsx4 matches

@augustohp•Updated 8 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export default async function fetchBalanceFromCaptchaProvider(
4 token: string,
5 provider: "capmonster" | "anticaptcha" | "nextcaptcha",
15 throw new Error("Unrecognized captcha provider " + provider + "!");
16 }
17 const result = await fetchJSON(
18 endpointUrl,
19 {
26
27 if (result.errorId != 0) {
28 throw new Error("Could not fetch balance.");
29 }
30

CaptchaGetBalanceREADME.md2 matches

@augustohp•Updated 8 months ago
10
11```typescript
12import fetchBalanceFromCaptchaProvider from "https://esm.town/v/augustohp/CaptchaGetBalance";
13const remainingBalance = await fetchBalanceFromCaptchaProvider(Deno.env.get("CAPMONSTER_KEY"), "capmonster");
14```
15

v3FanFicScrapermain.tsx2 matches

@willthereader•Updated 8 months ago
14 setLoading(true);
15 try {
16 const response = await fetch("/scrape", {
17 method: "POST",
18 headers: { "Content-Type": "application/json" },
79 const { url } = await request.json();
80 try {
81 const response = await fetch(url);
82 const content = await response.text();
83 return new Response(JSON.stringify({ content: content.slice(0, 1000) }), {

distinctGoldLarkmain.tsx2 matches

@temptemp•Updated 8 months ago
13const apiUrl = "https://filehaus.top/api/upload/data.json"; // Replace with your API URL
14
15// Send the file using fetch
16try {
17 const response = await fetch(apiUrl, {
18 method: "POST",
19 body: formData,

XKCDComicOfTheDaymain.tsx3 matches

@wolf•Updated 8 months ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
2import { load } from "npm:cheerio";
3
4export default async function(req: Request): Promise<Response> {
5 const response = await fetchText("https://xkcd.com/");
6 const $ = load(response);
7 const image = $("div#comic img").attr("src");
8 return new Response(await (await fetch(image)).arrayBuffer());
9}

megacloudUtilsmain.tsx2 matches

@temptemp•Updated 8 months ago
39}
40export async function getMeta(id) {
41 const req = await fetch(`https://rabbitstream.net/v2/embed-4/${id}?z=`, {
42 headers: {
43 "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0",
55}
56export async function getWasm() {
57 const req = await fetch("https://rabbitstream.net/images/loading.png?v=0.6", {
58 "headers": {
59 "Referrer-Policy": "strict-origin-when-cross-origin",

githubreposearchmain.tsx3 matches

@toowired•Updated 8 months ago
1export default async function fetchNewPublicGitHubRepos() {
2 // Generate today's date in YYYY-MM-DD format
3 const today = new Date().toISOString().split("T")[0];
9 const url = `https://api.github.com/search/repositories?q=${encodeURIComponent(query)}&sort=${sort}&order=${order}`;
10
11 const response = await fetch(url, {
12 headers: {
13 "Accept": "application/vnd.github.v3+json",
14 "User-Agent": "Deno-GitHub-Repo-Fetcher", // GitHub API requires a user-agent header
15 },
16 });

madPinkCardinalmain.tsx2 matches

@test_account_001•Updated 8 months ago
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
137});
138
139export default modifyFetchHandler(passwordAuth(app.fetch));

GithubPRFetcher

@andybak•Updated 1 hour ago

proxiedfetch1 file match

@jayden•Updated 21 hours ago