{"openapi":"3.1.0","info":{"title":"AudioBookBay API","description":"Pay-per-call search and metadata lookup for audiobooks indexed by audiobookbay.lu. Returns magnet links assembled from torrent info hashes and tracker lists.","version":"1.0.0","x-guidance":"Use POST /api/search with { query: string, page?: number } to find audiobooks by title, author, or narrator. Then call POST /api/details with { slug: string } using the slug from a search result to get a magnet link plus full metadata (author, narrators, format, file size, description). Magnet links contain the info hash and all backup trackers.","guidance":"Use POST /api/search with { query: string, page?: number } to find audiobooks by title, author, or narrator. Then call POST /api/details with { slug: string } using the slug from a search result to get a magnet link plus full metadata (author, narrators, format, file size, description). Magnet links contain the info hash and all backup trackers."},"servers":[{"url":"https://audiobook-api-beta.vercel.app"}],"tags":[{"name":"Details"},{"name":"Search"}],"paths":{"/api/search":{"post":{"operationId":"search","summary":"Search audiobookbay.lu for audiobooks. Returns up to ~12 results per page with title, slug, cover, category, language, and keywords. Use the `slug` field with POST /api/details to retrieve a magnet link.","tags":["Search"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200,"description":"Search query (title, author, or narrator)"},"page":{"description":"Page number, defaults to 1","type":"integer","minimum":1,"maximum":20}},"required":["query"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"slug":{"type":"string","description":"Pass this to POST /api/details to get the magnet link."},"detailUrl":{"type":"string","format":"uri"},"coverUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"type":"array","items":{"type":"string"}},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"keywords":{"type":"array","items":{"type":"string"}}},"required":["title","slug","detailUrl","coverUrl","category","language","keywords"],"additionalProperties":false}}},"required":["query","page","count","results"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/details":{"post":{"operationId":"details","summary":"Fetch full metadata and a magnet download link for one audiobook. Returns title, author, narrators, format, bitrate, length, description, cover URL, file size, info hash, tracker list, and the assembled magnet URI.","tags":["Details"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[a-z0-9-]+$","description":"Audiobook slug from a search result (e.g. \"dune-frank-herbert-2\")"}},"required":["slug"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"slug":{"type":"string"},"detailUrl":{"type":"string","format":"uri"},"author":{"anyOf":[{"type":"string"},{"type":"null"}]},"narrators":{"type":"array","items":{"type":"string"}},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"e.g. \"M4B\", \"MP3\""},"bitrate":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"coverUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileSize":{"anyOf":[{"type":"string"},{"type":"null"}]},"infoHash":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"40-character SHA-1 BitTorrent info hash, hex-encoded."},"trackers":{"type":"array","items":{"type":"string"},"description":"All announce URLs from the torrent."},"magnet":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Ready-to-use magnet: URI with info hash + all trackers. Null if the source page lacks an info hash."}},"required":["title","slug","detailUrl","author","narrators","format","bitrate","length","description","coverUrl","fileSize","infoHash","trackers","magnet"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}}}}