{"openapi":"3.1.0","info":{"title":"buyIt Price Comparison API","description":"Public API for buyitcompare.com. Compare live U.S. retailer prices. When to use: lowest-price lookups, multi-store offer lists, buying guides, clearance. Errors use RFC 9457 application/problem+json (type, title, status, detail, code).","version":"1.0.0","contact":{"name":"buyIt","url":"https://buyitcompare.com/contact","email":"sandeep.krishnapatnam@gmail.com"}},"servers":[{"url":"https://buyitcompare.com","description":"Production"}],"externalDocs":{"description":"Human API docs, versioning, and deprecation policy","url":"https://buyitcompare.com/docs#versioning"},"paths":{"/api/v1/search":{"get":{"operationId":"searchOffers","summary":"Search multi-retailer offers","description":"Return structured offers sorted by lowest price for a product query.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":120},"description":"Product or model search query"}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/SearchResponse"}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"422":{"description":"Validation error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"429":{"description":"Rate limit exceeded — honor Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"503":{"description":"Service temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}}}}},"/api/v1/search/stream":{"get":{"operationId":"searchOffersStream","summary":"Stream search snapshots (SSE)","description":"Server-Sent Events stream of SearchSnapshot JSON frames.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":120},"description":"Product or model search query"}],"responses":{"200":{"description":"text/event-stream of JSON snapshots","content":{"text/event-stream":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/SearchSnapshot"}]}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/SearchSnapshot"}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"422":{"description":"Validation error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"429":{"description":"Rate limit exceeded — honor Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"503":{"description":"Service temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}}}}},"/api/v1/guides":{"get":{"operationId":"listGuides","summary":"List buying guides","description":"Return the buying-guide index with slug, title, description, and query.","responses":{"200":{"description":"Guide index","content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/GuidesResponse"}]}}}},"429":{"description":"Rate limit exceeded — honor Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}}}}},"/api/v1/guides/{slug}":{"get":{"operationId":"getGuide","summary":"Get one buying guide","description":"Return a single buying guide including intro copy and tips.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Guide slug from the guides index"}],"responses":{"200":{"description":"Guide detail","content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/GuideDetail"}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"429":{"description":"Rate limit exceeded — honor Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}}}}},"/api/v1/picks":{"get":{"operationId":"listPicks","summary":"Top 100 product groups","description":"Curated best-seller and new-release product names grouped by category.","responses":{"200":{"description":"Pick groups","content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/PicksResponse"}]}}}},"429":{"description":"Rate limit exceeded — honor Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}}}}},"/api/v1/clearance":{"get":{"operationId":"listClearance","summary":"Amazon/Walmart 75-90% off","description":"Verified deep discounts where a published list price supports the band.","responses":{"200":{"description":"Clearance offers","content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ClearanceResponse"}]}}}},"429":{"description":"Rate limit exceeded — honor Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"503":{"description":"Service temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}}}}},"/api/v1/health":{"get":{"operationId":"healthCheck","summary":"Service health","description":"Liveness probe for agents and load balancers.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/HealthResponse"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}},"503":{"description":"Service temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}]}}}}}}}},"components":{"schemas":{"ProblemDetails":{"type":"object","required":["type","title","status","detail","code"],"properties":{"type":{"type":"string","format":"uri","description":"RFC 9457 problem type URI"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string","description":"Stable machine-readable error code"},"instance":{"type":"string","format":"uri"}}},"Offer":{"type":"object","required":["title","price","url","store"],"properties":{"title":{"type":"string"},"price":{"type":"number"},"url":{"type":"string","format":"uri"},"store":{"type":"string"},"image":{"type":"string","format":"uri"},"was":{"type":"number"},"discount":{"type":"integer","minimum":0,"maximum":100},"affiliate":{"type":"boolean"}}},"Source":{"type":"object","required":["store","status"],"properties":{"store":{"type":"string"},"status":{"type":"string"}}},"SearchResponse":{"type":"object","required":["offers","sources","query"],"properties":{"offers":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/Offer"}]}},"sources":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/Source"}]}},"query":{"type":"string"},"corrected_from":{"type":"string"}}},"SearchSnapshot":{"type":"object","required":["offers","sources","query"],"properties":{"offers":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/Offer"}]}},"sources":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/Source"}]}},"query":{"type":"string"},"corrected_from":{"type":"string"},"done":{"type":"boolean"},"pending":{"type":"array","items":{"type":"string"}},"affiliate":{"type":"boolean"}}},"GuideSummary":{"type":"object","required":["slug","title","description","query"],"properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"}}},"GuideDetail":{"type":"object","required":["slug","title","description","query","intro","tips"],"properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"intro":{"type":"string"},"tips":{"type":"array","items":{"type":"string"}}}},"GuidesResponse":{"type":"object","required":["guides"],"properties":{"guides":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/GuideSummary"}]}}}},"PickGroup":{"type":"object","required":["category","items"],"properties":{"category":{"type":"string"},"items":{"type":"array","items":{"type":"string"}}}},"PicksResponse":{"type":"object","required":["groups"],"properties":{"groups":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/PickGroup"}]}}}},"ClearanceResponse":{"type":"object","required":["offers","runners_up","scanned","stores","min","max"],"properties":{"offers":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/Offer"}]}},"runners_up":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/Offer"}]}},"scanned":{"type":"integer"},"stores":{"type":"array","items":{"type":"string"}},"min":{"type":"integer"},"max":{"type":"integer"},"runner_up_min":{"type":"integer"}}},"HealthResponse":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["ok"]}}}}}}