{"openapi":"3.0.0","info":{"title":"Crawler API Documentation","version":"1.0.0","description":"Complete API documentation for the web crawling and search system","contact":{"email":"support@example.com"}},"servers":[{"url":"https:\/\/databaseoftheknowledgeofhumanity.com\/api\/v1","description":"Production API"},{"url":"https:\/\/databaseoftheknowledgeofhumanity.com\/api\/v1","description":"Development API"}],"tags":[{"name":"Search","description":"Search operations"},{"name":"Crawl","description":"Crawling operations"},{"name":"Health","description":"Health check endpoints"}],"paths":{"\/search":{"get":{"tags":["Search"],"summary":"Search indexed content","description":"Search through crawled and indexed web pages","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Successful search","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SearchResponse"}}}}}}},"\/crawl\/start":{"post":{"tags":["Crawl"],"summary":"Start a crawl job","description":"Initiate a new crawling job","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CrawlRequest"}}}},"responses":{"200":{"description":"Crawl job created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CrawlJob"}}}}}}},"\/crawl\/{id}":{"get":{"tags":["Crawl"],"summary":"Get crawl job status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Crawl job details","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CrawlJob"}}}}}}},"\/health":{"get":{"tags":["Health"],"summary":"Health check","description":"Check system health status","responses":{"200":{"description":"System is healthy","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/HealthResponse"}}}}}}}},"components":{"schemas":{"SearchResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#\/components\/schemas\/SearchResult"}},"total":{"type":"integer"},"query":{"type":"string"}}},"SearchResult":{"type":"object","properties":{"id":{"type":"integer"},"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"relevance_score":{"type":"number"}}},"CrawlRequest":{"type":"object","required":["query"],"properties":{"query":{"type":"string"},"search_engine":{"type":"string","enum":["google","duckduckgo","both"],"default":"both"},"max_results":{"type":"integer","default":10,"minimum":1,"maximum":50}}},"CrawlJob":{"type":"object","properties":{"id":{"type":"integer"},"query":{"type":"string"},"search_engine":{"type":"string"},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"results":{"type":"integer"},"created_at":{"type":"string","format":"date-time"}}},"HealthResponse":{"type":"object","properties":{"status":{"type":"string"},"database":{"type":"boolean"},"cache":{"type":"boolean"},"queue":{"type":"boolean"}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}}}