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=922&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"(3064ms)

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

captivatingLimeGuanmain.tsx1 match

@mahtabtatturUpdated 6 months ago
75async function identifyPlant(imageFile) {
76 return new Promise((resolve, reject) => {
77 // Simulate API call with image processing
78 const reader = new FileReader();
79 reader.onloadend = () => {

sonnetmain.tsx9 matches

@manyoneUpdated 6 months ago
3export default async function generatePoem() {
4 try {
5 // Retrieve the Anthropic API key from environment variables
6 const apiKey = Deno.env.get("ANTHROPIC_API_KEY");
7
8 // Check if API key is present
9 if (!apiKey) {
10 throw new Error("Anthropic API key is missing. Please set the ANTHROPIC_API_KEY environment variable.");
11 }
12
13 // Create Anthropic instance with the API key
14 const anthropic = new Anthropic({
15 apiKey: apiKey,
16 });
17
18 console.log("Anthropic API Key Status: Present ✅");
19 console.log("Attempting to create message...");
20
64 // More detailed error logging
65 if (error.response) {
66 console.error("API Response Error Details:", {
67 status: error.response.status,
68 body: error.response.body,

get_gemini_modelsmain.tsx2 matches

@spinningideasUpdated 6 months ago
9export async function getGeminiModels(): Promise<GeminiModel[]> {
10 try {
11 const API_KEY = process.env.GEMINI_API_KEY;
12
13 const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models?key=${API_KEY}`);
14
15 const data = await response.json();

sqliteExplorerAppREADME.md1 match

@spinningideasUpdated 6 months ago
13## Authentication
14
15Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
16
17## Todos / Plans

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