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=370&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 7888 results for "fetch"(1635ms)

instagramExtractmain.tsx4 matches

@wolf•Updated 3 months ago
13 useEffect(() => {
14 if (url) {
15 fetch(`/extract?url=${encodeURIComponent(url)}`)
16 .then((response) => response.json())
17 .then((data) => {
21 })
22 .catch((error) => {
23 console.error("Error fetching data:", error);
24 setResultText("Error fetching data");
25 setResultImage("");
26 });
141 // If the 'image' parameter is present, proxy the image
142 if (url.searchParams.get("image") === "true") {
143 const imageResponse = await fetch(imageUrl);
144 return new Response(imageResponse.body, {
145 headers: {

textToGeneratemain.tsx2 matches

@KALPESHPATEL•Updated 3 months ago
25
26 try {
27 const response = await fetch("/generate-content", {
28 method: "POST",
29 body: JSON.stringify({ prompt, mode }),
258 });
259
260 return app.fetch(request);
261}

cerebrasTemplatemain.tsx1 match

@rupesh0745•Updated 3 months ago
20
21 try {
22 const response = await fetch("/chat", {
23 method: "POST",
24 headers: { "Content-Type": "application/json" },

cerebrasTemplatemain.tsx1 match

@devin78988•Updated 3 months ago
20
21 try {
22 const response = await fetch("/chat", {
23 method: "POST",
24 headers: { "Content-Type": "application/json" },

characterGuessermain.tsx2 matches

@vawogbemi•Updated 3 months ago
33 : [];
34
35 const response = await fetch(
36 `/ai?direction=${direction}&conversation=${encodeURIComponent(JSON.stringify(conversation))}`,
37 );
47 window.history.replaceState({}, "", `${window.location.pathname}?${urlParams}`);
48 } catch (error) {
49 setMessage("Error fetching AI response");
50 } finally {
51 setIsLoading(false);

prosperousYellowMulemain.tsx1 match

@gokulnpc•Updated 3 months ago
57
58 try {
59 const response = await fetch("/generate-api", {
60 method: "POST",
61 headers: { "Content-Type": "application/json" },

cerebras_codermain.tsx1 match

@diegoasua•Updated 3 months ago
234
235 try {
236 const response = await fetch("/", {
237 method: "POST",
238 body: JSON.stringify({

cerebras_searchermain.tsx3 matches

@meamitpatil•Updated 3 months ago
27 try {
28 // First API call - Get search results
29 const searchResult = await fetch("/api/search", {
30 method: "POST",
31 headers: { "Content-Type": "application/json" },
38 // Second API call - Get summary
39 setSummaryLoading(true);
40 const summaryResult = await fetch("/api/summarize", {
41 method: "POST",
42 headers: { "Content-Type": "application/json" },
149 // Search using SerpApi
150 try {
151 const searchResponse = await fetch(
152 `https://serpapi.com/search.json?q=${encodeURIComponent(query)}&api_key=${Deno.env.get("SERP_API_KEY")}`,
153 );

cerebrasTemplatemain.tsx1 match

@siddz415•Updated 3 months ago
20
21 try {
22 const response = await fetch("/chat", {
23 method: "POST",
24 headers: { "Content-Type": "application/json" },

getRandomWordmain.tsx2 matches

@alexwein•Updated 3 months ago
20 const useSeed = seed ?? Date.now().toString();
21
22 // Fetch and cache the word list if not already done
23 if (!wordListCache) {
24 const response = await fetch("https://raw.githubusercontent.com/wordnik/wordlist/main/wordlist-20210729.txt");
25 const text = await response.text();
26 wordListCache = text.trim().split("\n")

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago