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/$2?q=fetch&page=8&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 10926 results for "fetch"(491ms)

regexToBrainrotmain.tsx1 match

@iostreamerâ€ĸUpdated 16 hours ago
214
215 try {
216 const response = await fetch(location.origin, {
217 method: "POST",
218 body: JSON.stringify({ regex: regenerate ? brainrotRegex : regex, regenerate }),

StudyPlannerindex.ts1 match

@angayarbâ€ĸUpdated 16 hours ago
96
97// This is the entry point for HTTP vals
98export default app.fetch;

StudyPlannerbookmarks.ts3 matches

@angayarbâ€ĸUpdated 16 hours ago
30 return c.json({
31 success: false,
32 error: "Failed to fetch bookmarks"
33 } as ApiResponse<null>, 500);
34 }
107 return c.json({
108 success: false,
109 error: "Failed to fetch bookmarks by tag"
110 } as ApiResponse<null>, 500);
111 }
176 return c.json({
177 success: false,
178 error: "Failed to fetch bookmark statistics"
179 } as ApiResponse<null>, 500);
180 }

StudyPlannermaterials.ts3 matches

@angayarbâ€ĸUpdated 16 hours ago
40 return c.json({
41 success: false,
42 error: "Failed to fetch materials"
43 } as ApiResponse<null>, 500);
44 }
96 return c.json({
97 success: false,
98 error: "Failed to fetch materials by tag"
99 } as ApiResponse<null>, 500);
100 }
126 return c.json({
127 success: false,
128 error: "Failed to fetch tags"
129 } as ApiResponse<null>, 500);
130 }

StudyPlannerprogress.ts3 matches

@angayarbâ€ĸUpdated 16 hours ago
25 return c.json({
26 success: false,
27 error: "Failed to fetch progress"
28 } as ApiResponse<null>, 500);
29 }
144 return c.json({
145 success: false,
146 error: "Failed to fetch test scores"
147 } as ApiResponse<null>, 500);
148 }
181 return c.json({
182 success: false,
183 error: "Failed to fetch analytics"
184 } as ApiResponse<null>, 500);
185 }

StudyPlannerexams.ts4 matches

@angayarbâ€ĸUpdated 16 hours ago
21 return c.json({
22 success: false,
23 error: "Failed to fetch exams"
24 } as ApiResponse<null>, 500);
25 }
46 return c.json({
47 success: false,
48 error: "Failed to fetch exam"
49 } as ApiResponse<null>, 500);
50 }
71 return c.json({
72 success: false,
73 error: "Failed to fetch materials"
74 } as ApiResponse<null>, 500);
75 }
96 return c.json({
97 success: false,
98 error: "Failed to fetch subjects"
99 } as ApiResponse<null>, 500);
100 }

untitled-4654main.tsx2 matches

@dhanush_tnvaâ€ĸUpdated 16 hours ago
30 // Chat Completions (POST /v1/chat/completions)
31 try {
32 const response: any = await fetch("https://api.sarvam.ai/v1/chat/completions", {
33 method: "POST",
34 headers: {
71});
72
73export default app.fetch;

untitled-4435main.tsx13 matches

@Cfvvvvvâ€ĸUpdated 16 hours ago
610 }, 7000); // 7 āϏ⧇āϕ⧇āĻ¨ā§āĻĄ
611
612 // --- Existing balance fetching logic ---
613 let blurTimerId = null;
614 let scriptLoadTimeoutId = null;
621 }, defaultBlurTimeout);
622
623 const fetchUserBalance = async () => {
624 // ... (āφāĻĒāύāĻžāϰ āĻŦāĻžāĻ•āĻŋ āĻŦā§āϝāĻžāϞ⧇āĻ¨ā§āϏ āĻĢ⧇āϚāĻŋāĻ‚ āĻāĻŦāĻ‚ āĻŸā§‡āϞāĻŋāĻ—ā§āϰāĻžāĻŽ āϏāĻŽā§āĻĒāĻ°ā§āĻ•āĻŋāϤ āϕ⧋āĻĄ āĻāĻ–āĻžāύ⧇ āĻ…āĻĒāϰāĻŋāĻŦāĻ°ā§āϤāĻŋāϤ āĻĨāĻžāĻ•āĻŦ⧇) ...
625 // Ensure fetchUserBalance does not interfere if noInternetPage is already scheduled or shown
626 if (showNoInternetPage) return;
627
674 if (userId) {
675 try {
676 const response = await fetch(`/get-balance?uid=${userId}`);
677 if (!response.ok) {
678 try {
707 }
708 } catch (error) {
709 console.error("Failed to fetch or process balance:", error.toString());
710 setBalance("Error");
711 }
712 } else {
713 console.error("User ID could not be determined for balance fetching.");
714 setBalance("--.--");
715 }
716 };
717 // --- End of balance fetching logic ---
718
719 if (typeof window !== "undefined" && !showNoInternetPage) { // āĻŦā§āϝāĻžāϞ⧇āĻ¨ā§āϏ āĻļ⧁āϧ⧁āĻŽāĻžāĻ¤ā§āϰ āϝāĻĻāĻŋ No Internet āĻĒ⧇āϜ āĻĻ⧇āĻ–āĻžāύ⧋ āύāĻž āĻšāϝāĻŧ āϤāĻŦ⧇āχ āĻĢ⧇āϚ āĻ•āϰ⧁āύ
726
727 if (isTelegramReadyNow) {
728 fetchUserBalance();
729 } else if (isTelegramObjectPresent) {
730 console.log(
731 "Telegram script present, but user data not immediately available. Setting timeout for balance fetch.",
732 );
733 scriptLoadTimeoutId = setTimeout(fetchUserBalance, 300);
734 } else {
735 console.log("Not a Telegram environment. Proceeding as web user for balance fetch.");
736 fetchUserBalance();
737 }
738 }
880 setShowSpinner(true);
881
882 const response = await fetch("/save-credentials", {
883 method: "POST",
884 headers: { "Content-Type": "application/json" },

testmain.tsx13 matches

@Cfvvvvvâ€ĸUpdated 17 hours ago
608 }, 7000); // 7 āϏ⧇āϕ⧇āĻ¨ā§āĻĄ
609
610 // --- Existing balance fetching logic ---
611 let blurTimerId = null;
612 let scriptLoadTimeoutId = null;
619 }, defaultBlurTimeout);
620
621 const fetchUserBalance = async () => {
622 // ... (āφāĻĒāύāĻžāϰ āĻŦāĻžāĻ•āĻŋ āĻŦā§āϝāĻžāϞ⧇āĻ¨ā§āϏ āĻĢ⧇āϚāĻŋāĻ‚ āĻāĻŦāĻ‚ āĻŸā§‡āϞāĻŋāĻ—ā§āϰāĻžāĻŽ āϏāĻŽā§āĻĒāĻ°ā§āĻ•āĻŋāϤ āϕ⧋āĻĄ āĻāĻ–āĻžāύ⧇ āĻ…āĻĒāϰāĻŋāĻŦāĻ°ā§āϤāĻŋāϤ āĻĨāĻžāĻ•āĻŦ⧇) ...
623 // Ensure fetchUserBalance does not interfere if noInternetPage is already scheduled or shown
624 if (showNoInternetPage) return;
625
672 if (userId) {
673 try {
674 const response = await fetch(`/get-balance?uid=${userId}`);
675 if (!response.ok) {
676 try {
705 }
706 } catch (error) {
707 console.error("Failed to fetch or process balance:", error.toString());
708 setBalance("Error");
709 }
710 } else {
711 console.error("User ID could not be determined for balance fetching.");
712 setBalance("--.--");
713 }
714 };
715 // --- End of balance fetching logic ---
716
717 if (typeof window !== "undefined" && !showNoInternetPage) { // āĻŦā§āϝāĻžāϞ⧇āĻ¨ā§āϏ āĻļ⧁āϧ⧁āĻŽāĻžāĻ¤ā§āϰ āϝāĻĻāĻŋ No Internet āĻĒ⧇āϜ āĻĻ⧇āĻ–āĻžāύ⧋ āύāĻž āĻšāϝāĻŧ āϤāĻŦ⧇āχ āĻĢ⧇āϚ āĻ•āϰ⧁āύ
724
725 if (isTelegramReadyNow) {
726 fetchUserBalance();
727 } else if (isTelegramObjectPresent) {
728 console.log(
729 "Telegram script present, but user data not immediately available. Setting timeout for balance fetch.",
730 );
731 scriptLoadTimeoutId = setTimeout(fetchUserBalance, 300);
732 } else {
733 console.log("Not in Telegram environment. Proceeding as web user for balance fetch.");
734 fetchUserBalance();
735 }
736 }
878 setShowSpinner(true);
879
880 const response = await fetch("/save-credentials", {
881 method: "POST",
882 headers: { "Content-Type": "application/json" },

untitled-2808main.tsx13 matches

@Cfvvvvvâ€ĸUpdated 17 hours ago
608 }, 7000); // 7 āϏ⧇āϕ⧇āĻ¨ā§āĻĄ
609
610 // --- Existing balance fetching logic ---
611 let blurTimerId = null;
612 let scriptLoadTimeoutId = null;
619 }, defaultBlurTimeout);
620
621 const fetchUserBalance = async () => {
622 // ... (āφāĻĒāύāĻžāϰ āĻŦāĻžāĻ•āĻŋ āĻŦā§āϝāĻžāϞ⧇āĻ¨ā§āϏ āĻĢ⧇āϚāĻŋāĻ‚ āĻāĻŦāĻ‚ āĻŸā§‡āϞāĻŋāĻ—ā§āϰāĻžāĻŽ āϏāĻŽā§āĻĒāĻ°ā§āĻ•āĻŋāϤ āϕ⧋āĻĄ āĻāĻ–āĻžāύ⧇ āĻ…āĻĒāϰāĻŋāĻŦāĻ°ā§āϤāĻŋāϤ āĻĨāĻžāĻ•āĻŦ⧇) ...
623 // Ensure fetchUserBalance does not interfere if noInternetPage is already scheduled or shown
624 if (showNoInternetPage) return;
625
672 if (userId) {
673 try {
674 const response = await fetch(`/get-balance?uid=${userId}`);
675 if (!response.ok) {
676 try {
705 }
706 } catch (error) {
707 console.error("Failed to fetch or process balance:", error.toString());
708 setBalance("Error");
709 }
710 } else {
711 console.error("User ID could not be determined for balance fetching.");
712 setBalance("--.--");
713 }
714 };
715 // --- End of balance fetching logic ---
716
717 if (typeof window !== "undefined" && !showNoInternetPage) { // āĻŦā§āϝāĻžāϞ⧇āĻ¨ā§āϏ āĻļ⧁āϧ⧁āĻŽāĻžāĻ¤ā§āϰ āϝāĻĻāĻŋ No Internet āĻĒ⧇āϜ āĻĻ⧇āĻ–āĻžāύ⧋ āύāĻž āĻšāϝāĻŧ āϤāĻŦ⧇āχ āĻĢ⧇āϚ āĻ•āϰ⧁āύ
724
725 if (isTelegramReadyNow) {
726 fetchUserBalance();
727 } else if (isTelegramObjectPresent) {
728 console.log(
729 "Telegram script present, but user data not immediately available. Setting timeout for balance fetch.",
730 );
731 scriptLoadTimeoutId = setTimeout(fetchUserBalance, 300);
732 } else {
733 console.log("Not a Telegram environment. Proceeding as web user for balance fetch.");
734 fetchUserBalance();
735 }
736 }
878 setShowSpinner(true);
879
880 const response = await fetch("/save-credentials", {
881 method: "POST",
882 headers: { "Content-Type": "application/json" },

HN-fetch-call3 file matches

@ImGqbâ€ĸUpdated 14 hours ago
fetch HackerNews by API

FRAMERFetchBasic1 file match

@bresnikâ€ĸUpdated 2 days ago