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/image-url.jpg%20%22Image%20title%22?q=api&page=955&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 13676 results for "api"(1649ms)

discordWebhookWeatherHydmain.tsx1 match

@bosonUpdated 6 months ago
9const getForecast = async () => {
10 const forecastData = await fetchJSON(
11 `http://dataservice.accuweather.com/forecasts/v1/daily/1day/${accuweatherCityCode}?apikey=${process.env.accuWeather}&details=true&metric=true`,
12 );
13 return forecastData.DailyForecasts[0];

searchSectorsAppmain.tsx10 matches

@FairestofthemallUpdated 6 months ago
35
36 try {
37 const response = await fetch(`/api/search?postcode=${postcode}&sector=${sector}`);
38
39 if (!response.ok) {
249
250export default async function server(request: Request): Promise<Response> {
251 // Get API key from environment variables
252 const API_KEY = Deno.env.get('BUSINESS_SEARCH_API_KEY');
253
254 // Check if it's an API request
255 const url = new URL(request.url);
256 if (url.pathname === '/api/search') {
257 const postcode = url.searchParams.get('postcode') || '';
258 const sector = url.searchParams.get('sector') || '';
259
260 try {
261 // Use a business directory API (Replace with actual API)
262 const apiResponse = await fetch(`https://api.example.com/businesses?postcode=${postcode}&sector=${sector}`, {
263 headers: {
264 'Authorization': `Bearer ${API_KEY}`,
265 'Content-Type': 'application/json'
266 }
267 });
268
269 if (!apiResponse.ok) {
270 throw new Error('Failed to fetch businesses');
271 }
272
273 const data = await apiResponse.json();
274
275 return new Response(JSON.stringify({

dns_record_debuggerREADME.md1 match

@stevekrouseUpdated 6 months ago
11subject to caching. It'd be an improvement to this tool if we
12could add an uncached DNS check in here. In a couple min I wasn't
13able to find a free DNS checker API. Pull requests welcome!

authUtilsmain.tsx2 matches

@ideofunkUpdated 6 months ago
27
28/**
29 * Create a secure hash of an email using Web Crypto API
30 * @param email User's email address
31 * @returns Hexadecimal hash string
65 const currentTime = Math.floor(Date.now() / 30000);
66
67 // Generate a simple time-based code using Web Crypto API
68 const encoder = new TextEncoder();
69 const data = encoder.encode(secret + currentTime);

createMovieSitemain.tsx5 matches

@temptempUpdated 6 months ago
12 return cachedResponse;
13 }
14 const apiResponse = await fetch(
15 `https://api.zoechip.to/data/browse/?lang=3&keyword=&year=&rating=&votes=&genre=&country=&cast=&directors=&type=&order_by=trending&page=${page}&limit=${limit}`,
16 {
17 headers: {
22 );
23
24 if (!apiResponse.ok) {
25 throw new Error(`HTTP error! status: ${apiResponse.status}`);
26 }
27
28 const data = await apiResponse.json();
29
30 // Cache the response for 1 hour

plantIdentifierAppmain.tsx4 matches

@mahtabtatturUpdated 6 months ago
122
123 const openai = new OpenAI({
124 apiKey: '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',
125 dangerouslyAllowBrowser: true
126 });
196 reject(new Error('Unable to extract plant details from the image'));
197 }
198 } catch (apiError) {
199 console.error('Full API Error:', apiError);
200 reject(new Error(`Plant identification API error: ${apiError.message || 'Unknown error occurred'}`));
201 }
202 };
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

exceptionalBlueMockingbirdmain.tsx1 match

@elise_ifUpdated 6 months ago
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

deepLTranslatorAppmain.tsx3 matches

@sky_porie_fire443Updated 6 months ago
213 }
214
215 // 使用开放的翻译API作为备选方案
216 const translationResponse = await fetch(
217 `https://translate.googleapis.com/translate_a/single?client=gtx&sl=${source_lang === 'auto' ? 'auto' : source_lang}&tl=${target_lang}&dt=t&q=${encodeURIComponent(text)}`,
218 {
219 method: 'GET',
233 const translationData = await translationResponse.json();
234
235 // 从Google翻译API提取翻译文本
236 const translatedText = translationData[0].reduce((acc, item) => {
237 return acc + (item[0] || '');

translateTextAPIREADME.md1 match

@sky_porie_fire443Updated 6 months ago
1用于中转谷歌翻译api

groq-api2 file matches

@cameronpakUpdated 59 mins ago

create-val-api-demo1 file match

@shouserUpdated 16 hours ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration