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/$1?q=api&page=6&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 18432 results for "api"(819ms)

sensibleMagentaPinniped

@Ayomiplenty•Updated 2 months ago

instagramScraping1 file match

@wolf•Updated 2 months ago

harmoniousPlumTapir1 file match

@davincidreams•Updated 2 months ago

apiProxy2 file matches

@maxm•Updated 2 months ago

capitalMultipliers2 file matches

@vinaybjp12•Updated 3 months ago

fiberplaneHonoZodStarter10 file matches

@fiberplane•Updated 3 months ago
Hono-Zod-OpenAPI with Fiberplane API Playground integration

API_Management

@aryandc•Updated 3 months ago

researchAgent2 file matches

@thesephist•Updated 3 months ago
This is a lightweight wrapper around Perplexity's web search API

lovingCoralTapir1 file match

@khennyyb•Updated 3 months ago

agent-chatindex.ts12 matches

@abrinz•Updated 56 mins ago
12app.get("/frontend/**/*", c => serveFile(c.req.path, import.meta.url));
13
14// Add your API routes here
15// app.get("/api/data", c => c.json({ hello: "world" }));
16
17// Chat API endpoint
18app.post("/api/chat", async (c) => {
19 const { messages } = await c.req.json();
20
21 try {
22 // Call your agent API
23 const requestBody = {
24 messages: messages,
30 };
31
32 // Add authorization header if API key is available
33 const apiKey = Deno.env.get("AGENT_API_KEY")?.trim();
34
35 if (apiKey) {
36 headers["Authorization"] = `Bearer ${apiKey}`;
37 }
38
50 if (!response.ok) {
51 const errorText = await response.text();
52 console.error(`Agent API error: ${response.status} - ${errorText}`);
53 throw new Error(`Agent API error: ${response.status} - ${errorText}`);
54 }
55
219 });
220 } catch (error) {
221 console.error("Chat API error:", error);
222
223 // Return error as streaming response

agent-chatChat.tsx1 match

@abrinz•Updated 1 hour ago
5export function Chat() {
6 const { messages, input, handleInputChange, handleSubmit, isLoading, setInput } = useChat({
7 api: "/api/chat",
8 streamProtocol: "data",
9 onError: (error) => {
apiry
snartapi