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)
51};
52}
53function buildHeaders(apiKey: string, usingMCP: boolean) {
54const h: Record<string, string> = {
55"x-api-key": apiKey,
56"anthropic-version": "2023-06-01",
57"content-type": "application/json",
106const send = React.useCallback(
107async (history: Message[], userText: string): Promise<AssistantMsg> => {
108if (!config.anthropicApiKey) throw new Error("API key missing");
109if (status !== "idle") throw new Error("Stream already in progress");
110113const body = buildBody(config, history, userText);
114const headers = buildHeaders(
115config.anthropicApiKey,
116(body as any).mcp_servers?.length,
117);
120abortRef.current = ctrl;
121122const resp = await fetch("https://api.anthropic.com/v1/messages", {
123method: "POST",
124body: JSON.stringify(body),
130const err = await resp.json().catch(() => ({}));
131throw new Error(
132err.error?.message ?? `Anthropic API error: ${resp.status} ${resp.statusText}`,
133);
134}
287const fetchPrompts = async () => {
288try {
289const response = await fetch("/api/mcp-prompts", {
290method: "POST",
291headers: { "Content-Type": "application/json" },
357/** Dispatch user input */
358const fireSend = async () => {
359if (!input.trim() || status !== "idle" || !config.anthropicApiKey) return;
360361const userText = input.trim();
464};
465466const canSend = input.trim() && status === "idle" && config.anthropicApiKey;
467468/* ββ UI βββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
470<>
471<div className="chat-messages">
472{!config.anthropicApiKey && (
473<div className="message system">
474Please configure your Anthropic API key in settings to start chatting
475</div>
476)}
521onChange={(e) => setInput(e.target.value)}
522onKeyDown={handleKeyDown}
523placeholder={config.anthropicApiKey
524? streaming
525? "Press Enter to stop streamingβ¦"
526: "Type your messageβ¦"
527: "Configure API key in settings first"}
528className="chat-input"
529disabled={!config.anthropicApiKey || thinking}
530rows={1}
531/>
44- **Visual hierarchy** - Time always at top, data in consistent positions
4546## API Data
4748Uses 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
6768The main endpoint serves the weather dashboard. The API automatically detects location or allows manual coordinates input.
6970### Key Features
86- **Golden Hour** (π ): Special highlighting for optimal portrait/landscape times
8788### API Endpoints
8990- `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