{"openapi":"3.0.0","info":{"title":"Douban Movies Books and Community Data","version":"1.0.0","description":"Douban movie, TV, book and music records, ratings, cast, reviews, member profiles and group topics, one row per entity."},"servers":[{"url":"https://ah-douban-com.opendata.best/s/douban-com"}],"paths":{"/v1/search":{"post":{"operationId":"search","summary":"Search Douban movies, books, music and groups","description":"Query Douban films, series, books, music, celebrities, users and discussion groups by keyword or ID with structured ratings and metadata.","tags":["search"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["auto","search","subjects","celebrities","users","groups","tags"],"description":"Mode. Leave on Automatic unless you want to force one data view. Automatic picks the view from the field you filled.","default":"auto"},"keywords":{"type":"array","items":{"type":"string"},"description":"Search terms. Titles, directors, authors or anything else you would type into Douban's search box, in Chinese or English. Each term is one input, and maxResults applies to each of them.","example":["肖申克的救赎"]},"subjectIds":{"type":"array","items":{"type":"string"},"description":"Film, book or music IDs. Douban subject IDs such as 1292052, or full links such as https://movie.douban.com/subject/1292052/. Used only when Search terms is empty.","example":["1292052"]},"subjectType":{"type":"string","enum":["movie","tv","book","music"],"description":"Subject type. Which Douban catalogue the IDs above belong to. Pick TV series for series IDs: Douban serves them on their own route.","default":"movie"},"celebrityIds":{"type":"array","items":{"type":"string"},"description":"People IDs. Douban person IDs such as 27253735, or links such as https://www.douban.com/personage/27253735/."},"userIds":{"type":"array","items":{"type":"string"},"description":"Member IDs. Public Douban member IDs, as they appear in https://www.douban.com/people/<id>/. Email addresses and phone numbers are never published on this route and are not collected."},"groupIds":{"type":"array","items":{"type":"string"},"description":"Group IDs. Douban group IDs, the number in https://www.douban.com/group/<id>/. Topic rows carry titles, abstracts and authors."},"maxResults":{"type":"integer","minimum":1,"maximum":20,"description":"Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).","default":10,"example":3},"includeReviews":{"type":"boolean","description":"Include long reviews. Add one row per long review of each subject. Each row is billed and counts toward Max rows per input.","default":false},"includeInterests":{"type":"boolean","description":"Include short comments. Add one row per short comment (with the commenter's rating on Douban's 5-point scale).","default":false},"includeCelebrities":{"type":"boolean","description":"Include cast and crew","default":false},"includePhotos":{"type":"boolean","description":"Include stills. Add one row per still, with the uploader's public profile and image links.","default":false},"includeWorks":{"type":"boolean","description":"Include filmography. For People mode: add one row per work of each person.","default":false},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,80}$","description":"Optional. Your id for this request: repeating it while the job runs returns the same job."}}},"example":{"mode":"search","keywords":["肖申克的救赎"],"subjectType":"movie","maxResults":3}}}},"responses":{"200":{"description":"Done within the request: the rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsPage"}}}},"404":{"description":"No results matched the query (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"At capacity, too many running jobs, or rolling 24-hour row limit reached; retry after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The source could not be collected this time (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Synchronous timeout reached before completion; task cancelled (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/health":{"get":{"operationId":"health","summary":"API health check","description":"Lightweight readiness check for this API. Never starts a collection and always bills 0 rows.","tags":["health"],"responses":{"200":{"description":"API is operational (0 rows).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"API is temporarily unavailable (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"Row":{"type":"object","properties":{"source":{"type":"string"},"rowType":{"type":"string"},"entityType":{"type":"string"},"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"scrapedAt":{"type":"string"},"channel":{"nullable":true,"type":"string"},"cardSubtitle":{"nullable":true,"type":"string"},"coverUrl":{"nullable":true,"type":"string"},"intro":{"nullable":true,"type":"string"},"rating":{"nullable":true,"type":"object"},"nullRatingReason":{"nullable":true,"type":"string"},"year":{"nullable":true,"type":"string"},"genres":{"type":"array","items":{}},"countries":{"type":"array","items":{}},"durations":{"type":"array","items":{}},"languages":{"type":"array","items":{}},"aka":{"type":"array","items":{}},"pubdate":{"type":"array","items":{}},"isTv":{"nullable":true,"type":"boolean"},"episodesCount":{"nullable":true,"type":"integer"},"commentCount":{"nullable":true,"type":"integer"},"actors":{"type":"array","items":{}},"directors":{"type":"array","items":{}},"honors":{"type":"array","items":{}},"vendors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"isPaid":{"type":"boolean"},"isAd":{"type":"boolean"},"paymentDesc":{"type":"string"},"episodesInfo":{"type":"string"}}}},"vendorCount":{"nullable":true,"type":"integer"},"authors":{"type":"array","items":{}},"presses":{"type":"array","items":{}},"pages":{"type":"array","items":{}},"price":{"type":"array","items":{}},"isbn":{"nullable":true,"type":"string"},"authorIntro":{"nullable":true,"type":"string"},"catalog":{"nullable":true,"type":"string"},"reviewCount":{"nullable":true,"type":"integer"},"hasEbook":{"nullable":true,"type":"boolean"},"performers":{"type":"array","items":{}},"albumTypes":{"type":"array","items":{}},"media":{"nullable":true,"type":"string"},"publisher":{"nullable":true,"type":"string"},"releaseDate":{"nullable":true,"type":"string"},"discCount":{"nullable":true,"type":"integer"},"barcode":{"nullable":true,"type":"string"},"isrc":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"latinName":{"nullable":true,"type":"string"},"subtype":{"nullable":true,"type":"string"},"followedCount":{"nullable":true,"type":"integer"},"createdAt":{"nullable":true,"type":"string"},"celebrityId":{"nullable":true,"type":"string"},"roles":{"type":"array","items":{}},"character":{"nullable":true,"type":"string"},"subjectId":{"nullable":true,"type":"string"},"subjectType":{"nullable":true,"type":"string"},"uid":{"nullable":true,"type":"string"},"avatar":{"nullable":true,"type":"string"},"kind":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"ipLocation":{"nullable":true,"type":"string"},"location":{"nullable":true,"type":"string"},"locationId":{"nullable":true,"type":"string"},"regTime":{"nullable":true,"type":"string"},"isClub":{"nullable":true,"type":"boolean"},"isPhoneBound":{"nullable":true,"type":"boolean"},"isPhoneVerified":{"nullable":true,"type":"boolean"},"isBanned":{"nullable":true,"type":"boolean"},"isNormal":{"nullable":true,"type":"boolean"},"movieCollectedCount":{"nullable":true,"type":"integer"},"bookCollectedCount":{"nullable":true,"type":"integer"},"joinedGroupCount":{"nullable":true,"type":"integer"},"statusesCount":{"nullable":true,"type":"integer"},"birthdayPrivacy":{"nullable":true,"type":"string"},"hideGender":{"nullable":true,"type":"boolean"},"abstract":{"nullable":true,"type":"string"},"usefulCount":{"nullable":true,"type":"integer"},"commentsCount":{"nullable":true,"type":"integer"},"createTime":{"nullable":true,"type":"string"},"userId":{"nullable":true,"type":"string"},"userUid":{"nullable":true,"type":"string"},"userName":{"nullable":true,"type":"string"},"userUrl":{"nullable":true,"type":"string"},"userAvatar":{"nullable":true,"type":"string"},"userKind":{"nullable":true,"type":"string"},"userIsClub":{"nullable":true,"type":"boolean"},"userRegTime":{"nullable":true,"type":"string"},"userLocation":{"nullable":true,"type":"string"},"userLocationId":{"nullable":true,"type":"string"},"userGender":{"nullable":true,"type":"string"},"comment":{"nullable":true,"type":"string"},"voteCount":{"nullable":true,"type":"integer"},"status":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"collectionsCount":{"nullable":true,"type":"integer"},"groupId":{"nullable":true,"type":"string"},"content":{"nullable":true,"type":"string"},"targetType":{"nullable":true,"type":"string"},"typeName":{"nullable":true,"type":"string"},"tag":{"nullable":true,"type":"string"},"isNew":{"nullable":true,"type":"boolean"}},"additionalProperties":true,"description":"One collected entity. Field availability depends on rowType and the source. Fields always present (a|b = at least one of them): every row: id; rowType=movie: id; rowType=tv: id; rowType=book: id; rowType=music: id; rowType=celebrity: id; rowType=user: id; rowType=review: id; rowType=interest: id; rowType=photo: id; rowType=topic: id; rowType=search_result: id."},"Error":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","example":"invalid_input"},"message":{"type":"string"},"retryable":{"type":"boolean"}}},"JobStatus":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","partial","failed","cancelled"]},"done":{"type":"boolean"},"rowsAvailable":{"type":"integer"},"rowsDelivered":{"type":"integer","description":"Rows already delivered (and billed) to you for this job."},"rowsLimit":{"type":"integer","description":"Most rows this job can deliver."},"estimatedFinishSec":{"type":"integer","description":"While running: estimated seconds until done."},"statusUrl":{"type":"string"},"resultsUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"retentionHours":{"type":"integer"},"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"RowsPage":{"allOf":[{"$ref":"#/components/schemas/JobStatus"},{"type":"object","properties":{"offset":{"type":"integer"},"nextOffset":{"type":"integer"},"hasMore":{"type":"boolean"},"rowCount":{"type":"integer"},"rowsBilled":{"type":"integer","description":"Rows delivered by this response."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"meta":{"type":"object","additionalProperties":true}}}]},"HealthStatus":{"type":"object","required":["ok","site","status","endpoints","rowsBilled"],"properties":{"ok":{"type":"boolean"},"site":{"type":"string"},"status":{"type":"string","enum":["operational","unavailable"]},"endpoints":{"type":"array","items":{"type":"string"}},"rowsBilled":{"type":"integer"}}}}}}