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=392&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 7885 results for "fetch"(1288ms)

gameWebsitemain.tsx5 matches

@ffgamebet13•Updated 3 months ago
34
35 useEffect(() => {
36 async function fetchTopGames() {
37 try {
38 // Fetch top 50 free games from US App Store
39 const response = await fetch(
40 `https://itunes.apple.com/us/rss/topfreeapplications/limit=50/genre=${selectedCategory === 'all' ? '6014' : selectedCategory}/json`
41 );
42
43 if (!response.ok) {
44 throw new Error('Failed to fetch game data');
45 }
46
64 }
65 }
66 fetchTopGames();
67 }, [selectedCategory]);
68

umbrellaRemindermain.tsx2 matches

@kylecrews•Updated 3 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { nominatimSearch } from "https://esm.town/v/stevekrouse/nominatimSearch";
4import { weatherGovGrid } from "https://esm.town/v/stevekrouse/weatherGovGrid";
14 lon,
15 });
16 let { properties: { periods } } = await fetchJSON(
17 grid.forecastHourly,
18 );

cerebras_codermain.tsx1 match

@kylecrews•Updated 3 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

cerebras_codermain.tsx1 match

@plaidmustache•Updated 3 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

cerebras_codermain.tsx1 match

@ayouberrglitch•Updated 3 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

cerebras_codermain.tsx1 match

@mam•Updated 3 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

sprightlyWhiteLionmain.tsx6 matches

@studywithai•Updated 3 months ago
39 useEffect(() => {
40 // Load initial data from server
41 fetchInitialData();
42 }, []);
43
44 async function fetchInitialData() {
45 try {
46 const response = await fetch('/load-data');
47 const data = await response.json();
48 setTotalEarnings(data.totalEarnings);
65
66 try {
67 const response = await fetch('/record-session', {
68 method: 'POST',
69 headers: { 'Content-Type': 'application/json' },
88 async function clearEarnings() {
89 try {
90 const response = await fetch('/clear-earnings', { method: 'POST' });
91 const data = await response.json();
92 setTotalEarnings(0);
292 `, [earnings]);
293
294 // Fetch updated data with more detailed session history
295 const totalEarningsResult = await sqlite.execute(`
296 SELECT total_earnings FROM ${KEY}_total_earnings_${SCHEMA_VERSION}

ntfymain.tsx1 match

@lime•Updated 3 months ago
189 }
190 // Publish message
191 return await fetch(`${this.serverUrl}/${this.topic}`, {
192 method: "POST",
193 body: this.message ?? this.file,

zanyCyanHookwormmain.tsx2 matches

@nvpkp•Updated 3 months ago
66
67 const callAnthropicAPI = async (prompt) => {
68 const response = await fetch("https://api.anthropic.com/v1/messages", {
69 method: "POST",
70 headers: {
101 });
102
103 const response = await fetch(`${apiUrl}?${params}`);
104 const data = await response.json();
105 const pages = data.query.pages;

unassumingAzureLungfishmain.tsx1 match

@Johner•Updated 3 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago