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=103&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 12982 results for "api"(1981ms)

StarterPackFeedsneynar.ts4 matches

@moe•Updated 6 days ago
1const NEYNAR_API_KEY = Deno.env.get("NEYNAR_API_KEY") || "NEYNAR_API_DOCS";
2const headers = {
3 "Content-Type": "application/json",
4 "x-api-key": NEYNAR_API_KEY,
5};
6
7export const fetchGet = async (path: string) => {
8 return await fetch("https://api.neynar.com/v2/farcaster/" + path, {
9 method: "GET",
10 headers: headers,
13
14export const fetchPost = async (path: string, body: any) => {
15 return await fetch("https://api.neynar.com/v2/farcaster/" + path, {
16 method: "POST",
17 headers: headers,

reelMitrajsREADME.md2 matches

@Omyadav•Updated 6 days ago
2 const prompt = `Generate a short 15-second Instagram reel script and 5 viral hashtags for the topic: "${topic}". Make the script engaging and desi style.`;
3
4 const res = await fetch("https://api.openai.com/v1/chat/completions", {
5 method: "POST",
6 headers: {
7 "Authorization": `Bearer ${Deno.env.get("OPENAI_API_KEY")}`,
8 "Content-Type": "application/json",
9 },

untitled-509README.md2 matches

@Omyadav•Updated 6 days ago
2 const prompt = `Generate a short 15-second Instagram reel script and 5 viral hashtags for the topic: "${topic}". Make the script engaging and desi style.`;
3
4 const res = await fetch("https://api.openai.com/v1/chat/completions", {
5 method: "POST",
6 headers: {
7 "Authorization": `Bearer ${Deno.env.get("OPENAI_API_KEY")}`,
8 "Content-Type": "application/json",
9 },

resume-parserresumeSchemas.ts46 matches

@prashamtrivedi•Updated 6 days ago
1import {z} from 'npm:@hono/zod-openapi'
2import {ZodObject, ZodType, ZodTypeAny} from "npm:zod"
3
31
32 // Create new object schema with additionalProperties: false and all fields required
33 return z.object(newShape).openapi({
34 // Preserve description and example if they exist
35 ...(schema._def.openapi ? {
36 description: schema._def.openapi.description,
37 example: schema._def.openapi.example
38 } : {}),
39 // Always add additionalProperties: false
44 // Process array items, removing all array constraints
45 // This removes: minItems, maxItems, uniqueItems validation
46 return z.array(processSchema(schema._def.type)).openapi({
47 // Preserve description and example if they exist
48 ...(schema._def.openapi ? {
49 description: schema._def.openapi.description,
50 example: schema._def.openapi.example
51 } : {})
52 })
54 else if (schema instanceof z.ZodString) {
55 // Remove ALL string validations (min, max, regex, email, url, etc.)
56 return z.string().openapi({
57 // Preserve description and example if they exist
58 ...(schema._def.openapi ? {
59 description: schema._def.openapi.description,
60 example: schema._def.openapi.example
61 } : {})
62 })
64 else if (schema instanceof z.ZodNumber) {
65 // Remove ALL number validations (min, max, multipleOf, int, etc.)
66 return z.number().openapi({
67 // Preserve description and example if they exist
68 ...(schema._def.openapi ? {
69 description: schema._def.openapi.description,
70 example: schema._def.openapi.example
71 } : {})
72 })
74 else if (schema instanceof z.ZodBoolean) {
75 // Preserve boolean as is
76 return z.boolean().openapi({
77 // Preserve description and example if they exist
78 ...(schema._def.openapi ? {
79 description: schema._def.openapi.description,
80 example: schema._def.openapi.example
81 } : {})
82 })
93 // Preserve enums and literals but without additional constraints
94 // Convert them to strings for maximum compatibility
95 return z.string().openapi({
96 // Preserve description and example if they exist
97 ...(schema._def.openapi ? {
98 description: schema._def.openapi.description,
99 example: schema._def.openapi.example
100 } : {})
101 })
119 z.object({
120 value: valueSchema,
121 confidence: z.number().min(0).max(1).openapi({
122 description: 'Confidence score between 0 and 1',
123 example: 0.95
124 }),
125 standardization: z.string().nullable().openapi({
126 description: 'Notes about any standardization applied',
127 example: 'Standardized from "JS" to "JavaScript"'
135 durationInMonths: ConfidenceFieldSchema(z.number().nullable()),
136 current: ConfidenceFieldSchema(z.boolean())
137}).openapi('DateRange')
138
139// Request schema
140export const ResumeParserRequestSchema = z.object({
141 resumeText: z.string().min(1).openapi({
142 description: 'The raw text of the resume to parse',
143 example: 'John Doe\nSoftware Engineer\n...'
144 }),
145 options: z.object({
146 confidenceThreshold: z.number().min(0).max(1).optional().openapi({
147 description: 'Minimum confidence score threshold (0-1)',
148 example: 0.5
149 }),
150 standardizationEnabled: z.boolean().optional().openapi({
151 description: 'Whether to standardize terminology',
152 example: true
153 }),
154 extractSummary: z.boolean().optional().openapi({
155 description: 'Whether to extract and analyze the resume summary',
156 example: true
157 }),
158 sectionPriorities: z.array(z.string()).optional().openapi({
159 description: 'Sections to prioritize in extraction',
160 example: ['skills', 'workExperience']
161 }),
162 extractLanguages: z.boolean().optional().openapi({
163 description: 'Whether to extract language proficiencies',
164 example: true
165 })
166 }).optional().openapi({
167 description: 'Parser configuration options'
168 })
169}).openapi('ResumeParserRequest')
170
171// Personal info schema
179 website: ConfidenceFieldSchema(z.string().nullable()),
180 summary: ConfidenceFieldSchema(z.string().nullable())
181}).openapi('PersonalInfo')
182
183// Skill schema
187 proficiency: ConfidenceFieldSchema(z.string().nullable()),
188 yearsOfExperience: ConfidenceFieldSchema(z.number().nullable())
189}).openapi('Skill')
190
191// Work experience schema
198 technologies: ConfidenceFieldSchema(z.array(z.string())),
199 achievements: ConfidenceFieldSchema(z.array(z.string()))
200}).openapi('WorkExperience')
201
202// Education schema
209 coursework: ConfidenceFieldSchema(z.array(z.string()).nullable()),
210 achievements: ConfidenceFieldSchema(z.array(z.string()).nullable())
211}).openapi('Education')
212
213// Project schema
219 dates: ConfidenceFieldSchema(DateRangeSchema.nullable()),
220 role: ConfidenceFieldSchema(z.string().nullable())
221}).openapi('Project')
222
223// Certification schema
228 expiryDate: ConfidenceFieldSchema(z.string().nullable()),
229 id: ConfidenceFieldSchema(z.string().nullable())
230}).openapi('Certification')
231
232// Language schema
234 name: ConfidenceFieldSchema(z.string()),
235 proficiency: ConfidenceFieldSchema(z.string().nullable())
236}).openapi('Language')
237
238// Parsed resume schema
248 missingFields: z.array(z.string()),
249 detectedSections: z.array(z.string())
250}).openapi('ParsedResume')
251
252// Response schema
259 details: z.unknown().optional()
260 }).optional()
261}).openapi('ParseResumeResponse')
262
263// Error response schema
269 details: z.unknown().optional()
270 })
271}).openapi('ErrorResponse')
272//Simplified ConfidenceFieldSchema
273export const SimplifiedConfidenceFieldSchema = <T extends z.ZodTypeAny>(valueSchema: T) =>

untitled-2198brownhaven_zillow_feed.ts13 matches

@hazardhouse•Updated 6 days ago
16
17/**
18 * Simplified proof-of-concept function to test API connectivity
19 * This should return an immediate result we can inspect
20 */
33
34 try {
35 log("Starting API test with Airtable");
36
37 // Test the most basic API call to verify connectivity
38 const testUrl = `https://api.airtable.com/v0/${BASE_ID}/${TABLE_NAME}?maxRecords=1`;
39 log("Testing connection with URL", testUrl);
40
44 // First test - just check if we can connect at all
45 const testResponse = await fetch(testUrl, { headers });
46 log(`API response status: ${testResponse.status} ${testResponse.statusText}`);
47
48 if (!testResponse.ok) {
49 const errorText = await testResponse.text();
50 log("API Error", errorText);
51 throw new Error(`API Error: ${testResponse.status} - ${errorText}`);
52 }
53
57
58 // Now try with the view specified
59 const viewUrl = `https://api.airtable.com/v0/${BASE_ID}/${TABLE_NAME}?view=${VIEW_NAME}&maxRecords=1`;
60 log("Testing with view specified", viewUrl);
61
62 const viewResponse = await fetch(viewUrl, { headers });
63 log(`View API response status: ${viewResponse.status} ${viewResponse.statusText}`);
64
65 if (!viewResponse.ok) {
66 const errorText = await viewResponse.text();
67 log("View API Error", errorText);
68 throw new Error(`View API Error: ${viewResponse.status} - ${errorText}`);
69 }
70
76
77 // If we got here, we can fetch records successfully
78 log("API connectivity test successful");
79
80 return {
81 success: true,
82 message: "API connectivity test successful",
83 logs: debugLog,
84 firstRecord: viewJson.records && viewJson.records[0] ? viewJson.records[0] : null,

mandateworkflowDefinition.ts1 match

@salon•Updated 6 days ago
83 },
84 config: { // Example of static config for a step, if fetchAgent could use it
85 "static_api_key": "ui-test-fetch-key",
86 "item_limit_from_initial": { source: "initial", field: "itemCount" } // Note: Engine currently doesn't resolve sources in step.config
87 },
30 do {
31 // Using view ID in the URL
32 const url = `https://api.airtable.com/v0/${BASE_ID}/${TABLE_NAME}?view=${VIEW_NAME}&pageSize=100${
33 offset ? `&offset=${offset}` : ""
34 }`;
42 if (!res.ok) {
43 const errorText = await res.text();
44 console.error(`API Error (${res.status}): ${errorText}`);
45 throw new Error(`Airtable API error: ${res.status} - ${errorText}`);
46 }
47

MiniAppStarterneynar.ts2 matches

@kashi•Updated 6 days ago
1const baseUrl = "https://api.neynar.com/v2/farcaster/";
2
3export async function fetchNeynarGet(path: string) {
7 "Content-Type": "application/json",
8 "x-neynar-experimental": "true",
9 "x-api-key": "NEYNAR_API_DOCS",
10 },
11 });

MiniAppStarterindex.tsx2 matches

@kashi•Updated 6 days ago
19 }));
20
21app.get("/api/counter/get", async c => c.json(await db.get("counter")));
22app.get("/api/counter/increment", async c => c.json(await db.set("counter", (await db.get("counter") || 0) + 1)));
23
24app.get("/frontend/**/*", c => serveFile(c.req.path, import.meta.url));

MiniAppStarterimage.tsx3 matches

@kashi•Updated 6 days ago
84
85const loadEmoji = (code) => {
86 // const api = `https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${code.toLowerCase()}.svg`
87 const api = `https://cdn.jsdelivr.net/gh/shuding/fluentui-emoji-unicode/assets/${code.toLowerCase()}_color.svg`;
88 return fetch(api).then((r) => r.text());
89};
90

vapi-minutes-db1 file match

@henrywilliams•Updated 2 days ago

vapi-minutes-db2 file matches

@henrywilliams•Updated 2 days ago
snartapi
mux
Your friendly, neighborhood video API.