You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/...?q=api&page=51&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 19249 results for "api"(1093ms)
15- Fast and lightweight
16
17### HuyHieu API
18```
19/huyhieu?url=<website>&label=<label>&value=<value>&color=<color>&textcolor=<textcolor>&size=<size>&radius=<radius>&shape=<shape>
1/**
2* AI Team Performance Analysis HTTP API
3*
4* Provides HTTP endpoints for triggering analysis and accessing results
1516/**
17* Main HTTP handler for AI performance analysis API
18*
19* Supported endpoints:
7172if (method === "GET" && pathname === "/") {
73return await handleApiDocumentation(corsHeaders);
74}
7594);
95} catch (error) {
96console.error("API Error:", error);
97return new Response(
98JSON.stringify({
135}
136137console.log(`🚀 API: Starting analysis for user ${userId}, league ${leagueId}`);
138const startTime = Date.now();
139172}
173174console.log(`✅ API: Analysis complete in ${executionTime}ms`);
175176// Return structured response
218async function handleGetAnalysis(userId: string, corsHeaders: Record<string, string>): Promise<Response> {
219try {
220console.log(`📊 API: Retrieving latest analysis for user ${userId}`);
221222const latestAnalysis = await getLatestAnalysis(userId);
272timestamp: new Date().toISOString(),
273services: {
274api: "operational",
275scheduler: schedulerSummary.error ? "degraded" : "operational",
276storage: "operational",
332await addSchedulerConfig(schedulerConfig);
333334console.log(`⏰ API: Scheduler config added for user ${config.userId}`);
335336return new Response(
376await removeSchedulerConfig(userId, leagueId);
377378console.log(`🗑️ API: Scheduler config removed for user ${userId}`);
379380return new Response(
411summary,
412nextRun: "Configured in Val.town cron settings",
413documentation: "See API docs for scheduling configuration",
414};
415430431/**
432* Handle API documentation request
433* GET /
434*/
435async function handleApiDocumentation(corsHeaders: Record<string, string>): Promise<Response> {
436const docs = {
437title: "AI Fantasy Baseball Performance Analysis API",
438version: "1.0.0",
439description: "API for triggering AI-powered fantasy baseball analysis and waiver wire recommendations",
440endpoints: {
441"GET /analyze": {