{"openapi":"3.1.0","info":{"title":"Libergent API","version":"1.0.0","description":"Product search for storefronts and applications. Create scoped test/live keys at /developers. Test keys return simulated data and never contact marketplaces."},"servers":[{"url":"/"}],"paths":{"/api/v1/search":{"get":{"operationId":"searchProducts","summary":"Search products","security":[{"ApiKey":[]}],"parameters":[{"name":"q","required":true,"in":"query","schema":{"type":"string","minLength":1,"maxLength":120},"description":"Any supported product query, e.g. iphone 15 or bicicleta."},{"name":"sites","in":"query","schema":{"type":"string","default":"olx.ro"},"description":"Comma-separated allowed sources: olx.ro, publi24.ro, okazii.ro."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":20,"default":20}},{"name":"details","in":"query","schema":{"type":"boolean","default":false},"description":"Requires listings:details. Enrich within a bounded time budget."},{"name":"category","in":"query","schema":{"enum":["any","full_fur_coat"],"default":"any"},"description":"Optional specialized filter. Leave any for general product searches."},{"name":"material","in":"query","schema":{"enum":["any","natural","synthetic","unknown"],"default":"any"},"description":"Optional fur-material seller-claim filter."}],"responses":{"200":{"description":"Complete or partial results. Inspect partial and source errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"400":{"description":"Invalid query or parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid, expired or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"API not enabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Quota exhausted or busy; honor Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until retry."}}},"502":{"description":"Every source failed. No successful cache entry is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"503":{"description":"Authentication or storage unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/demo":{"get":{"operationId":"getDemo","summary":"Try the response format without a key","security":[],"responses":{"200":{"description":"Simulated sample. No source requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}}}}},"/api/v1/sources":{"get":{"operationId":"listSources","summary":"List supported API sources","security":[],"responses":{"200":{"description":"Current API source allowlist, not a guarantee of uptime.","content":{"application/json":{"schema":{"type":"object","properties":{"apiVersion":{"const":"1"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"lg_test_… or lg_live_…","description":"Send the API key from your server. Never use a personal session or admin key."}},"schemas":{"Listing":{"type":"object","required":["url","source","title","price","currency","location","condition","description","mainImage","galleryImages","size","measurements","material","attributes","availability","lastVerifiedAt","detailStatus","classification"],"properties":{"url":{"type":["string","null"]},"source":{"type":"string"},"title":{"type":["string","null"]},"price":{"type":["number","string","null"],"description":"Structured amount when available; otherwise original price text. No inferred conversion."},"currency":{"type":["string","null"]},"location":{"type":["string","null"]},"condition":{"type":["string","null"]},"description":{"type":["string","null"]},"size":{"type":["string","null"]},"measurements":{"type":["string","null"]},"material":{"type":["string","null"]},"mainImage":{"anyOf":[{"type":"object","required":["url","sourceUrl","provenance"],"properties":{"url":{"type":"string","format":"uri"},"sourceUrl":{"type":["string","null"]},"provenance":{"const":"original_listing"}}},{"type":"null"}]},"galleryImages":{"type":"array","items":{"type":"object","required":["url","sourceUrl","provenance"],"properties":{"url":{"type":"string","format":"uri"},"sourceUrl":{"type":["string","null"]},"provenance":{"const":"original_listing"}}}},"attributes":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}}}},"availability":{"enum":["active","removed","unknown"]},"lastVerifiedAt":{"type":["string","null"],"format":"date-time"},"detailStatus":{"enum":["verified","unavailable","not_requested"]},"classification":{"type":"object","properties":{"category":{"enum":["full_fur_coat","fur_trim_only_or_ambiguous","accessory","unknown"]},"material":{"enum":["natural","synthetic","unknown"]},"independentlyVerified":{"const":false},"age":{"type":"null"},"authenticity":{"type":"null"},"evidence":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"rule":{"type":"string"},"text":{"type":"string"},"basis":{"const":"seller_claim"}}}}}}}},"SearchResponse":{"type":"object","required":["apiVersion","mode","searchedAt","expiresAt","partial","sources","inspectedCount","items"],"properties":{"apiVersion":{"const":"1"},"mode":{"enum":["test","live"]},"simulated":{"type":"boolean"},"searchedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"partial":{"type":"boolean"},"inspectedCount":{"type":"integer"},"cache":{"type":"object","properties":{"status":{"enum":["hit","miss","coalesced"]},"ageSeconds":{"type":"integer"}}},"sources":{"type":"array","items":{"type":"object","required":["source","status","candidateCount"],"properties":{"source":{"type":"string"},"status":{"enum":["ok","failed"]},"candidateCount":{"type":"integer"},"error":{"enum":["timeout","source_unavailable"]},"simulated":{"type":"boolean"}}}},"items":{"type":"array","items":{"$ref":"#/components/schemas/Listing"}}}},"Error":{"type":"object","required":["apiVersion","error"],"properties":{"apiVersion":{"const":"1"},"error":{"type":"object","required":["code"],"properties":{"code":{"type":"string"}}}}}}}}