{"openapi":"3.1.0","info":{"title":"Douban Movies Books and Community Data (x402 & MCP)","version":"0.1.0","description":"Douban movie, TV, book and music records, ratings, cast, reviews, member profiles and group topics, one row per entity.","x-guidance":"Structured real-time web intelligence APIs paid per delivered row in USDC via x402. All endpoints are synchronous at POST /s/<site>/v1/<endpoint> and also exposed over stateless MCP at POST /mcp. Supports x402 v2 'upto' (Permit2, charged strictly for delivered rows) and 'exact' (EIP-3009). Empty/0-row (404), invalid input (422), timeout (504), and upstream failures (502) are never charged.","contact":{"email":"ops@opendata.best"}},"servers":[{"url":"https://x402.opendata.best"}],"paths":{"/s/douban-com/v1/search":{"post":{"operationId":"douban_com_search","summary":"Douban Movies Books and Community Data: 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. Unit price: $0.003000/row USDC (default quote 10 rows, max 20 rows). Unsettled / 0-row / error responses are never charged.","tags":["douban-com","Entertainment"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.030000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","description":"Leave on Automatic unless you want to force one data view. Automatic picks the view from the field you filled.","default":"auto","enum":["auto","search","subjects","celebrities","users","groups","tags"]},"keywords":{"type":"array","items":{"type":"string"},"description":"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."},"subjectIds":{"type":"array","items":{"type":"string"},"description":"Douban subject IDs such as 1292052, or full links such as https://movie.douban.com/subject/1292052/. Used only when Search terms is empty."},"subjectType":{"type":"string","description":"Which Douban catalogue the IDs above belong to. Pick TV series for series IDs: Douban serves them on their own route.","default":"movie","enum":["movie","tv","book","music"]},"celebrityIds":{"type":"array","items":{"type":"string"},"description":"Douban person IDs such as 27253735, or links such as https://www.douban.com/personage/27253735/."},"userIds":{"type":"array","items":{"type":"string"},"description":"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":"Douban group IDs, the number in https://www.douban.com/group/<id>/. Topic rows carry titles, abstracts and authors."},"maxResults":{"type":"integer","description":"Rows delivered and billed for each input (each search term, ID or group). Child rows such as reviews or cast count toward the same limit. Default 70.","default":10,"minimum":1,"maximum":20},"includeReviews":{"type":"boolean","description":"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":"Add one row per short comment (with the commenter's rating on Douban's 5-point scale).","default":false},"includeCelebrities":{"type":"boolean","description":"Add one row per director and actor of each film, with their Douban IDs.","default":false},"includePhotos":{"type":"boolean","description":"Add one row per still, with the uploader's public profile and image links.","default":false},"includeWorks":{"type":"boolean","description":"For People mode: add one row per work of each person.","default":false}},"additionalProperties":false},"example":{"mode":"search","keywords":["肖申克的救赎"],"subjectType":"movie","maxResults":10}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_douban_com"},"example":{"jobId":"job_douban-c_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"rowType":"example_rowType","id":"example_001","title":"example_title","year":"example_year","rating":"example_rating","url":"https://douban.com/item/1"}],"meta":{"site":"douban-com","endpoint":"search","maxResults":10,"payment":{"scheme":"upto","network":"eip155:84532","quotedMicrousd":30000,"settledMicrousd":3000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream source failed or blocked (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"upstream_timeout: synchronous deadline reached and task cancelled (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/douban-com/v1/health":{"get":{"operationId":"douban_com_health","summary":"Douban Movies Books and Community Data: health check","description":"Free readiness check (never returns 402 and never starts a collection).","tags":["douban-com","health"],"responses":{"200":{"description":"Operational","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"charged":{"type":"boolean"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"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"}}},"Row_douban_com":{"type":"object","properties":{"rowType":{"type":["string","null"],"title":"Row type"},"id":{"type":["string","null"],"title":"ID"},"title":{"type":["string","null"],"title":"Title"},"year":{"type":["string","null"],"title":"Year"},"rating":{"type":["string","null"],"title":"Rating"},"url":{"type":["string","null"],"format":"uri","title":"URL"}},"additionalProperties":true},"Response_douban_com":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"done":{"type":"boolean"},"rowCount":{"type":"integer","minimum":1},"rowsBilled":{"type":"integer","minimum":1},"rowsDelivered":{"type":"integer","minimum":1},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row_douban_com"}},"meta":{"type":"object","properties":{"site":{"type":"string"},"endpoint":{"type":"string"},"maxResults":{"type":"integer"},"payment":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"quotedMicrousd":{"type":"integer"},"settledMicrousd":{"type":"integer"},"transaction":{"type":"string"},"payer":{"type":"string"}}}}}},"required":["jobId","status","done","rowCount","rows"]}}},"x-discovery":{"ownershipProofs":["0xdb7c562a3ef6f9f29da4672abdab1489e82e910a91b863e3c22b905df6522b7223798a84245e0452cab689483b6cbb7cd8c13141319df982b213dea31ee7e4311c"]}}