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=466&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 8146 results for "fetch"(947ms)

inspiringLavenderTakinmain.tsx4 matches

@stevekrouse•Updated 4 months ago
36
37 useEffect(() => {
38 async function fetchStats() {
39 const response = await fetch("/dashboard-stats");
40 const data = await response.json();
41 setStats(data);
42 }
43 fetchStats();
44 }, []);
45
146
147 try {
148 const response = await fetch("/", {
149 method: "POST",
150 body: JSON.stringify({

slackScoutmain.tsx8 matches

@kamath•Updated 4 months ago
20 for (const topic of KEYWORDS) {
21 const results = await Promise.allSettled([
22 fetchHackerNewsResults(topic),
23 fetchTwitterResults(topic),
24 fetchRedditResults(topic),
25 ]);
26
49}
50
51// Fetch Hacker news, Twitter, and Reddit results
52async function fetchHackerNewsResults(topic: string): Promise<Website[]> {
53 return hackerNewsSearch({
54 query: topic,
58}
59
60async function fetchTwitterResults(topic: string): Promise<Website[]> {
61 return twitterSearch({
62 query: topic,
67}
68
69async function fetchRedditResults(topic: string): Promise<Website[]> {
70 return redditSearch({ query: topic });
71}
84 }
85
86 const response = await fetch(slackWebhookUrl, {
87 method: "POST",
88 headers: { "Content-Type": "application/json" },

interview_practicemain.tsx1 match

@spinningideas•Updated 4 months ago
90
91 try {
92 const response = await fetch("/ask", {
93 method: "POST",
94 headers: {

webpage_summarizermain.tsx3 matches

@spinningideas•Updated 4 months ago
87
88 try {
89 const response = await fetch("/summarize", {
90 method: "POST",
91 body: JSON.stringify({ url }),
224 const { url } = await request.json();
225
226 // Fetch webpage content
227 const webpageResponse = await fetch(url);
228 const webpageText = await webpageResponse.text();
229

reflective_qamain.tsx1 match

@spinningideas•Updated 4 months ago
145
146 try {
147 const response = await fetch("/ask", {
148 method: "POST",
149 headers: {

cleanupmain.tsx1 match

@flymaster•Updated 4 months ago
8 }
9
10 const response = await fetch(`https://ntfy.sh/${ntfyChannel}`, {
11 method: "POST",
12 body: `What did you throw out today?`,

getShowcaseValsmain.tsx4 matches

@stevekrouse•Updated 4 months ago
35}, { concurrency: 3 })).filter(Boolean);
36
37// fetch text from endpoint
38const vals3 = await pMap(vals2, async (v) => {
39 if (!v.links.endpoint) return v;
40 const text = await (await fetch(v.links.endpoint)).text();
41 return { ...v, endpointText: text };
42}, { concurrency: 3 });
69}
70
71// fetch ai summary of val
72const vals4 = await pMap(vals3, async (v) => {
73 const descriptions = await getDescriptions(v);
76
77async function getScreenshot(url: string) {
78 const resp = await fetch(
79 "https://api.apiflash.com/v1/urltoimage?" + new URLSearchParams({
80 access_key: Deno.env.get("API_FLASH"),

wideApimain.tsx1 match

@maxm•Updated 4 months ago
88export type WideApi = typeof routes;
89
90export default app.fetch.bind(app);

mdxmain.tsx1 match

@pomdtr•Updated 4 months ago
1/** @jsxImportSource https://esm.sh/preact **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { api } from "https://esm.town/v/pomdtr/api";
5import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";

reflective_qamain.tsx1 match

@stevekrouse•Updated 4 months ago
145
146 try {
147 const response = await fetch("/ask", {
148 method: "POST",
149 headers: {

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago