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/$2?q=api&page=15&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 17453 results for "api"(2698ms)

api1 file match

@pomdtrβ€’Updated 1 year ago

api1 file match

@zeroftdevβ€’Updated 1 year ago

postHogAPICapture1 file match

@daisukeβ€’Updated 1 year ago

myApi1 file match

@fahimfoysalβ€’Updated 1 year ago

vtApiExample2 file matches

@neverstewβ€’Updated 1 year ago

updateVtApiTypes2 file matches

@neverstewβ€’Updated 1 year ago

jsrApi_example2 file matches

@vladimyrβ€’Updated 1 year ago

jsrApi2 file matches

@vladimyrβ€’Updated 1 year ago

myApi1 file match

@tonychealβ€’Updated 1 year ago

APIAyeee

@Negashβ€’Updated 1 year ago

ChatStreamingChat.tsx14 matches

@c15rβ€’Updated 52 mins ago
51 };
52}
53function buildHeaders(apiKey: string, usingMCP: boolean) {
54 const h: Record<string, string> = {
55 "x-api-key": apiKey,
56 "anthropic-version": "2023-06-01",
57 "content-type": "application/json",
106 const send = React.useCallback(
107 async (history: Message[], userText: string): Promise<AssistantMsg> => {
108 if (!config.anthropicApiKey) throw new Error("API key missing");
109 if (status !== "idle") throw new Error("Stream already in progress");
110
113 const body = buildBody(config, history, userText);
114 const headers = buildHeaders(
115 config.anthropicApiKey,
116 (body as any).mcp_servers?.length,
117 );
120 abortRef.current = ctrl;
121
122 const resp = await fetch("https://api.anthropic.com/v1/messages", {
123 method: "POST",
124 body: JSON.stringify(body),
130 const err = await resp.json().catch(() => ({}));
131 throw new Error(
132 err.error?.message ?? `Anthropic API error: ${resp.status} ${resp.statusText}`,
133 );
134 }
287 const fetchPrompts = async () => {
288 try {
289 const response = await fetch("/api/mcp-prompts", {
290 method: "POST",
291 headers: { "Content-Type": "application/json" },
357 /** Dispatch user input */
358 const fireSend = async () => {
359 if (!input.trim() || status !== "idle" || !config.anthropicApiKey) return;
360
361 const userText = input.trim();
464 };
465
466 const canSend = input.trim() && status === "idle" && config.anthropicApiKey;
467
468 /* ── UI ─────────────────────────────────────────────────────── */
470 <>
471 <div className="chat-messages">
472 {!config.anthropicApiKey && (
473 <div className="message system">
474 Please configure your Anthropic API key in settings to start chatting
475 </div>
476 )}
521 onChange={(e) => setInput(e.target.value)}
522 onKeyDown={handleKeyDown}
523 placeholder={config.anthropicApiKey
524 ? streaming
525 ? "Press Enter to stop streaming…"
526 : "Type your message…"
527 : "Configure API key in settings first"}
528 className="chat-input"
529 disabled={!config.anthropicApiKey || thinking}
530 rows={1}
531 />

saulyteREADME.md7 matches

@laurynasβ€’Updated 1 hour ago
44- **Visual hierarchy** - Time always at top, data in consistent positions
45
46## API Data
47
48Uses Open-Meteo KNMI API with official SDK:
49- **Hourly**: temperature, cloud cover (total, low, mid, high), surface pressure, visibility
50- **Daily**: sunrise, sunset times
66## Usage
67
68The main endpoint serves the weather dashboard. The API automatically detects location or allows manual coordinates input.
69
70### Key Features
86- **Golden Hour** (πŸŒ…): Special highlighting for optimal portrait/landscape times
87
88### API Endpoints
89
90- `GET /` - Main dashboard
91- `GET /api/weather?lat={lat}&lon={lon}` - Weather data with photography insights
92- `GET /api/location` - Auto-detect location from IP
93- `GET /api/geocode?q={query}` - Search for locations by city/area name
Kapil01
apiv1