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=api&page=13&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 18960 results for "api"(2715ms)

voicemessagesVoiceRecorder.tsx1 match

@arthrod•Updated 1 day ago
145 }
146
147 fetch("/api/voicenotes", {
148 method: "POST",
149 body: formData,

voicemessagesVoicePlayer.tsx2 matches

@arthrod•Updated 1 day ago
20 try {
21 setLoading(true);
22 const response = await fetch(`/api/voicenotes/${voiceNoteId}`);
23 const data = await response.json();
24
26 setVoiceNote(data.voiceNote);
27 // Get audio URL
28 setAudioUrl(`/api/voicenotes/${voiceNoteId}/audio`);
29 } else {
30 setError(data.error || "Voice message not found");

voicemessagesvoicenotes.ts1 match

@arthrod•Updated 1 day ago
148
149const groq = new Groq({
150 apiKey: Deno.env.get("GROQ_API_KEY") || "",
151});
152// Background transcription function

voicemessagesREADME.md1 match

@arthrod•Updated 1 day ago
50## Tech Stack
51
52- **Backend**: Hono (TypeScript API framework)
53- **Database**: SQLite for voice note metadata
54- **Storage**: Val Town Blob storage for audio files

voicemessagesindex.ts1 match

@arthrod•Updated 1 day ago
20
21// Mount routes
22app.route("/api/voicenotes", voiceNotesRoutes);
23app.route("/", staticRoutes);
24

voicemessagesDashboard.tsx2 matches

@arthrod•Updated 1 day ago
15 try {
16 setLoading(true);
17 const response = await fetch("/api/voicenotes");
18 const data = await response.json();
19
120
121 try {
122 const response = await fetch(`/api/voicenotes/${voiceNoteId}`, {
123 method: "DELETE",
124 });

mcp-starterREADME.md1 match

@mattrossman•Updated 1 day ago
30## What is the adapter for?
31
32The MCP TypeScript SDK uses Node-specific APIs that don't play nicely with Deno
33or edge functions:
34

vivekmain.tsx10 matches

@hackthehackerman•Updated 1 day ago
4const app = new Hono();
5
6// --- NEW VAPI WEBHOOK ENDPOINT ---
7app.post("/vapi-webhook", async (c) => {
8 try {
9 const webhookData = await c.req.json(); // Parse the incoming JSON payload from Vapi
10
11 // As per Vapi's 'end-of-call-report' format, the main payload is under 'message'
12 if (webhookData && typeof webhookData.message === "object" && webhookData.message !== null) {
13 console.log("--- Received Vapi End-of-Call Report Message ---");
14 // Print the entire 'message' object, pretty-formatted for readability in Val Town logs
15 console.log(JSON.stringify(webhookData.message, null, 2));
16 console.log("--- End of Vapi Report ---");
17 } else {
18 console.warn(
19 "Received Vapi webhook payload, but 'message' field was not an object or was missing. Full payload:",
20 webhookData,
21 );
22 }
23
24 // Always return a 200 OK status to Vapi to acknowledge successful receipt of the webhook.
25 // If you don't return 200, Vapi might retry sending the webhook.
26 return c.json({ status: "success", message: "Webhook received and processed" }, 200);
27 } catch (error) {
28 // If there's any error during processing, log it and return a 500 status.
29 console.error("Error processing Vapi webhook:", error);
30 return c.json({ status: "error", message: "Failed to process webhook" }, 500);
31 }

GlancerpageContents.controller.ts1 match

@lightweight•Updated 1 day ago
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7

GlancerpageID.controller.ts1 match

@lightweight•Updated 1 day ago
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7

beeminder-api4 file matches

@cricks_unmixed4u•Updated 15 hours ago

shippingAPI1 file match

@dynamic_silver•Updated 1 day ago
apiry
snartapi