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/?q=fetch&page=1&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 1935 results for "fetch"(379ms)

35 }
36
37 const response = await fetch(`${endpoint}?${params}`, {
38 headers: {
39 "Accept": "application/json",
29 params.append("pagina", pagina);
30
31 const response = await fetch(`${endpoint}?${params}`, {
32 headers: {
33 "Accept": "application/json",

untitled-5254main.ts1 match

@wenderaugusto15Updated 20 mins ago
33 }
34
35 const response = await fetch(`${endpoint}?${params}`, {
36 headers: {
37 "Accept": "application/json",

my-first-valcommuter_proxy.ts8 matches

@ktreillyUpdated 22 mins ago
5 let b82 = { bikes: 0, ebikes: 0 }, b86 = { bikes: 0, ebikes: 0 };
6
7 const safeFetch = async (url: string, timeout = 4000) => {
8 const controller = new AbortController();
9 const id = setTimeout(() => controller.abort(), timeout);
10 return fetch(url, {
11 signal: controller.signal,
12 headers: { "User-Agent": "NYC-Dashboard-Bot/1.0" },
17 try {
18 const [wRes, aqiRes] = await Promise.all([
19 safeFetch("https://api.weather.gov/gridpoints/OKX/35,35/forecast/hourly"),
20 safeFetch("https://api.waqi.info/feed/newyork/?token=demo"), // Use 'demo' or get a free token
21 ]);
22
43 try {
44 const [iR, sR] = await Promise.all([
45 safeFetch(
46 "https://gbfs.citibikenyc.com/gbfs/en/station_information.json",
47 ),
48 safeFetch("https://gbfs.citibikenyc.com/gbfs/en/station_status.json"),
49 ]);
50 const info = await iR.json(), stat = await sR.json();
69 // MTA
70 try {
71 const rtRes = await safeFetch("https://www.goodservice.io/api/routes/7");
72 const rtData = await rtRes.json();
73 const globalStatus = rtData.status.toUpperCase();
74 try {
75 const stRes = await safeFetch(
76 "https://www.goodservice.io/api/stations/724",
77 3000,
31 params.append("dataFinal", "31/12/2026");
32
33 const response = await fetch(`${endpoint}?${params}`, {
34 headers: {
35 "Accept": "application/json",

untitled-619main.ts12 matches

@zyloxtubeUpdated 47 mins ago
2import { streamSSE } from "npm:hono@3.11.7/streaming";
3import pngjs from "npm:pngjs@7.0.0";
4import fetch from "node-fetch";
5
6const { PNG } = pngjs;
59 console.log("📋 جلب التذكرة...");
60
61 const ticketRes = await fetch(
62 "https://www.oreateai.com/passport/api/getticket",
63 {
96 const cookieString = cookies.map((c) => c.split(";")[0]).join("; ");
97
98 const signupRes = await fetch(
99 "https://www.oreateai.com/passport/api/emailsignupin",
100 {
222 // نحاول التحميل المباشر أولاً
223 try {
224 const response = await fetch(url, {
225 headers: {
226 "User-Agent":
246 }&container=focus`;
247
248 const response = await fetch(googleViewerUrl, {
249 headers: {
250 "User-Agent":
266 const webArchiveUrl = `https://web.archive.org/web/2/${url}`;
267
268 const response = await fetch(webArchiveUrl, {
269 headers: {
270 "User-Agent":
302 encodeURIComponent(imageUrl)
303 }&output=png`;
304 const response = await fetch(converterUrl);
305 const convertedBuffer = await response.arrayBuffer();
306 png = PNG.sync.read(Buffer.from(convertedBuffer));
388
389 console.log(" 📝 إنشاء محادثة...");
390 const chatRes = await fetch("https://www.oreateai.com/oreate/create/chat", {
391 method: "POST",
392 headers,
406
407 console.log(" 🖼️ طلب الصورة...");
408 const sseRes = await fetch("https://www.oreateai.com/oreate/sse/stream", {
409 method: "POST",
410 headers: { ...headers, "Accept": "text/event-stream" },
647 });
648
649 const chatRes = await fetch(
650 "https://www.oreateai.com/oreate/create/chat",
651 {
673 });
674
675 const sseRes = await fetch("https://www.oreateai.com/oreate/sse/stream", {
676 method: "POST",
677 headers: { ...headers, "Accept": "text/event-stream" },
767 }));
768
769export default app.fetch;

proxyFornecedoresmain.ts1 match

@wenderaugusto15Updated 49 mins ago
33 }
34
35 const response = await fetch(`${endpoint}?${params}`, {
36 headers: {
37 "Accept": "application/json",

x402-playgroundhome.tsx2 matches

@stevekrouseUpdated 49 mins ago
114 />
115 </svg>
116 <span class="text-sm font-medium">Processing payment &amp; fetching random number…</span>
117 </div>
118 <p class="text-xs text-gray-400 mt-1">This usually takes a few seconds.</p>
147 </li>
148 <li>
149 The <code class="bg-gray-100 px-1 rounded">@x402/fetch</code> SDK automatically handles
150 the HTTP 402 payment flow — signing a USDC payment on Base
151 </li>

x402-playgroundseller.tsx5 matches

@stevekrouseUpdated 51 mins ago
80 </li>
81 <li>
82 Use <code class="bg-gray-100 px-1 rounded">@x402/fetch</code> to automatically sign & pay
83 </li>
84 <li>Receive your premium random number</li>
88 <section class="bg-white rounded-xl shadow p-6 mb-6">
89 <h2 class="text-lg font-semibold mb-3">Try it</h2>
90 <pre class="bg-gray-100 rounded-lg p-4 text-sm overflow-x-auto">{`import { wrapFetchWithPayment } from "@x402/fetch";
91
92const paidFetch = wrapFetchWithPayment(fetch, client);
93const res = await paidFetch("${endpoint}");
94const data = await res.json();
95console.log(data.random);`}</pre>
114});
115
116export default app.fetch;
117
36 params.append("dataFinal", "31/12/2026");
37
38 const response = await fetch(`${endpoint}?${params}`, {
39 headers: {
40 "Accept": "application/json",

test_simple_fetch1 file match

@vinciartsUpdated 1 week ago
Val created by bot

fetch1 file match

@gaearonUpdated 1 week ago