{"openapi":"3.1.0","info":{"title":"brek.ai","version":"2.0.0","description":"Find direct booking URLs for specific Airbnb listings."},"servers":[{"url":"https://api.brek.ai/agent/v1"}],"paths":{"/direct-booking":{"post":{"operationId":"lookupDirectBooking","summary":"Find direct booking pages for Airbnb listings","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listings":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":2048},"description":"Airbnb room URLs or exact listing IDs as strings, one to ten. Never convert listing IDs to numbers."},"locale":{"description":"User language, such as en or zh-CN, for the booking link card.","type":"string","maxLength":35,"pattern":"^[a-zA-Z]{2,8}(?:-[a-zA-Z0-9]{1,8})*$"},"limit":{"default":3,"description":"Maximum URLs per listing in this page.","type":"integer","minimum":1,"maximum":25},"offset":{"default":0,"description":"URL offset per listing; use next_offset to retrieve more.","type":"integer","minimum":0,"maximum":100000}},"required":["listings"]}}}},"responses":{"200":{"description":"Direct booking links by input listing","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"listing":{"type":"string"},"found":{"type":"boolean","description":"Whether an eligible mapped booking URL is available in the current Brek data. With no item error, false is a successful lookup with no mapped link to return. It does not establish whether the Airbnb listing exists or the operator has a direct-booking website. True can have an empty URL page after pagination is exhausted."},"urls":{"maxItems":25,"type":"array","items":{"type":"string","format":"uri"},"description":"Mapped booking links on this page, not live prices, availability or independently verified savings."},"links":{"description":"Property names and images for the URLs on this page, in the same order. Missing images are null; metadata may be absent in older responses.","maxItems":25,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"property_name":{"type":"string","minLength":1,"maxLength":300},"featured_image_url":{"nullable":true,"type":"string","format":"uri"}},"required":["url","featured_image_url"],"additionalProperties":false}},"next_offset":{"description":"Present only when more URLs remain.","type":"integer","minimum":0,"maximum":9007199254740991},"error":{"description":"Present only when the input cannot be looked up.","type":"string","enum":["needs_canonical_url","invalid_input","unsupported_platform"]}},"required":["listing","found","urls"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}}}}}}}