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/$%7Burl%7D?q=api&page=921&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 13339 results for "api"(3566ms)

reflectiveBrownCowmain.tsx11 matches

@CoachCompanionUpdated 5 months ago
332
333const css = `
334 @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');
335
336 :root {
664async function server(request: Request): Promise<Response> {
665 if (request.method === "POST" && new URL(request.url).pathname === "/generate-training") {
666 const YOUTUBE_API_KEY = Deno.env.get("YOUTUBE_API_KEY2");
667 const useApiKey = YOUTUBE_API_KEY !== undefined && YOUTUBE_API_KEY !== "";
668 if (!YOUTUBE_API_KEY) {
669 console.warn("YouTube API key (YOUTUBE_API_KEY2) is not set. Falling back to search URL method.");
670 }
671
722 for (const placeholder of videoPlaceholders) {
723 const searchQuery = placeholder.replace('[VIDEO: ', '').replace(']', '');
724 const videoId = await getYouTubeVideoId(searchQuery, sport, YOUTUBE_API_KEY);
725 if (videoId) {
726 const embedHtml = `
805}
806
807async function getYouTubeVideoId(query, sport, apiKey, useApiKey = true) {
808 if (useApiKey) {
809 try {
810 const searchUrl = `https://www.googleapis.com/youtube/v3/search?part=snippet&q=${encodeURIComponent(sport + ' ' + query)}&key=${apiKey}&type=video&maxResults=1`;
811 const response = await fetch(searchUrl);
812 const data = await response.json();
813 if (data.error) {
814 console.warn("YouTube API error:", data.error.message);
815 return getFallbackYouTubeLink(query, sport);
816 }
819 }
820 } catch (error) {
821 console.error("Error fetching from YouTube API:", error);
822 }
823 }

exceptionalBrownWolfmain.tsx1 match

@CoachCompanionUpdated 5 months ago
7
8const css = `
9 @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');
10
11 :root {

yuktiVoiceAssistantmain.tsx1 match

@Aditya230Updated 5 months ago
224 const openai = new OpenAI({
225 // Add any necessary configuration if required
226 // For example: apiKey might be needed depending on the library version
227 });
228

PaintSeqmain.tsx1 match

@youkq95Updated 5 months ago
275 }
276
277 // Preferred method: Clipboard API
278 if (navigator.clipboard) {
279 navigator.clipboard.writeText(sequence)

fantasticPinkCougarmain.tsx1 match

@Aditya230Updated 5 months ago
12 try {
13 const response = await fetch(
14 `https://api.open-meteo.com/v1/forecast?latitude=${location.latitude}&longitude=${location.longitude}&current_weather=true&hourly=temperature_2m,relativehumidity_2m,windspeed_10m`
15 );
16 const data = await response.json();

dreamyYellowFleamain.tsx1 match

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

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);

vapi-minutes-db1 file match

@henrywilliamsUpdated 3 days ago

vapi-minutes-db2 file matches

@henrywilliamsUpdated 3 days 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