{
  "openapi": "3.0.1",
  "info": {
    "title": "Douban Scraper API – 豆瓣 Movies, Books, Reviews & Comments",
    "description": "Douban scraper API, no login: Douban movie, TV, book & music search, ratings & details (IMDb id, star distribution), short comments (短评), full reviews (影评), cast, photos, Top 250 & hot charts, group topics. Arrays, filters, only-new delta, lean JSON for AI agents. $0.002/row, $0.01/detail.",
    "version": "2.0",
    "x-build-id": "9tweBYIBaLAtjk9Ko"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deadc0dex~douban-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deadc0dex-douban-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/deadc0dex~douban-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deadc0dex-douban-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/deadc0dex~douban-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deadc0dex-douban-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "operation": {
            "title": "Operation (Douban search, details, comments, reviews, charts, groups…)",
            "enum": [
              "auto",
              "search",
              "subject_details",
              "comments",
              "reviews",
              "review_details",
              "celebrities",
              "photos",
              "charts",
              "explore",
              "group_search",
              "group_topics",
              "group_topic_details",
              "subject_research",
              "topic_search",
              "topic_replies",
              "review_replies",
              "capabilities"
            ],
            "type": "string",
            "description": "auto (default): keywords->search, subject URLs/ids->subject_details, review URLs->review_details, topic URLs->group_topic_details, group URLs->group_topics, charts->charts, tags->explore. subject_research = title -> detail + hot comments + reviews + free insights. topic_search = discussions across all groups. topic_replies / review_replies = topic/review URL -> row with replies[]. Also: comments 短评, reviews 影评, celebrities, photos, group_search, capabilities (free).",
            "default": "auto"
          },
          "keywords": {
            "title": "Douban search keywords (movie, TV, book, music, group)",
            "type": "array",
            "description": "Search terms, one per item, for search (subjectType picks movie+TV, tv, book, music, all) or group_search. Chinese titles work best; English titles are auto-translated when known (The Wandering Earth -> 流浪地球). With comments/reviews/subject_details/celebrities/photos a keyword is resolved to its top hit (free).",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Douban URLs (subject, review, group, topic, chart)",
            "type": "array",
            "description": "movie./book./music.douban.com/subject/<id>/, m.douban.com/movie/subject/<id>/, …/review/<id>/, www.douban.com/group/<name>/, www.douban.com/group/topic/<id>/, m.douban.com/subject_collection/<id>. One per item; messy links are cleaned. Failed inputs return a free error row.",
            "items": {
              "type": "string"
            }
          },
          "ids": {
            "title": "Douban IDs (subject, review, topic or group)",
            "type": "array",
            "description": "Bare ids: subject ids (26266893; movie/TV/book/music detected automatically), review ids for review_details, topic ids for group_topic_details, group ids or names (beijingzufang) for group_topics.",
            "items": {
              "type": "string"
            }
          },
          "charts": {
            "title": "Douban charts (Top 250, now showing, hot TV, books, music)",
            "type": "array",
            "description": "Chart ids for operation charts, in rank order: movie_top250, movie_showing, movie_real_time_hotest, movie_weekly_best, movie_hot_gaia, tv_hot, tv_domestic, tv_american, tv_korean, tv_japanese, tv_animation, tv_variety_show, book_top250, book_fiction, book_hot, music_single, music_hot … (capabilities lists all 30). Aliases: top250, now_showing, kdrama.",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "title": "Explore tags (genre, region, theme)",
            "type": "array",
            "description": "Douban tags for operation explore (movies or TV by tag): 科幻, 喜剧, 爱情, 悬疑, 动画, 美国, 日本, 韩剧, 美剧, 豆瓣高分, 经典, 冷门佳片… One task per item; combine tags with commas in one item (科幻,美国).",
            "items": {
              "type": "string"
            }
          },
          "subjectType": {
            "title": "Subject type (movie, TV, book, music)",
            "enum": [
              "movie",
              "tv",
              "book",
              "music",
              "all",
              "group"
            ],
            "type": "string",
            "description": "search: movie (default) = movies and TV series, tv = TV only, book, music, all = movie+book+music, group = group search. explore: movie or tv. Subject ops detect the type from the id/URL (hint only)."
          },
          "maxItems": {
            "title": "Max billable rows (total)",
            "type": "integer",
            "description": "Maximum billable rows for the whole run, all inputs together. Default 100. Range 1-10000; larger values are capped."
          },
          "maxItemsPerInput": {
            "title": "Max rows per input",
            "type": "integer",
            "description": "Cap per keyword, chart, tag, subject or group. Default 20 (= maxItems when only maxItems is set). Range 1-2000. Douban guest caps: ~150 hot comments and ~40 reviews per subject, ~300 topics per group, 500 search/explore rows."
          },
          "include": {
            "title": "Include: details, full review text, replies, insights",
            "type": "array",
            "description": "details = search/charts/explore rows -> full subject detail rows (billed as subject $0.01 instead of row $0.002). fullText = reviews with full body as Markdown (review $0.006 instead of comment $0.002). replies = replies[] (up to maxRepliesPerItem) inside full review / group topic rows, no extra charge. insights = one free analysis row per subject after comments/reviews (sentiment heuristic, top terms, regions).",
            "items": {
              "type": "string",
              "enum": [
                "details",
                "fullText",
                "replies",
                "insights"
              ],
              "enumTitles": [
                "Subject details for list rows",
                "Full review text (Markdown)",
                "Replies embedded in full reviews / topics",
                "Free insights row (comments/reviews)"
              ]
            }
          },
          "fields": {
            "title": "Return only these fields",
            "type": "array",
            "description": "Projection: keep only these fields per data row (type always kept), e.g. [\"title\",\"rating\",\"ratingCount\"]. Also skips requests not needed (rating distribution / desc page). Empty = default set of outputMode. Full list: operation capabilities.",
            "items": {
              "type": "string"
            }
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "compact",
              "lean",
              "full"
            ],
            "type": "string",
            "description": "compact (default) = stable flat rows, every key present (null when unknown). lean = for LLM agents: no null/empty keys, no envelope (it is in the summary row once), compact dates, short texts cut at maxTextChars (300). full = all fields of the row type.",
            "default": "compact"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "hot",
              "latest",
              "recommend",
              "time",
              "rating",
              "elite"
            ],
            "type": "string",
            "description": "comments/reviews: hot (default); latest = visible hot pool sorted newest first (Douban requires login for its newest feed). explore: recommend (default), hot, time, rating. group_topics: Douban default (latest activity), latest = newest posts, hot, elite. search/charts: rating = by rating."
          },
          "minRating": {
            "title": "Min rating",
            "type": "number",
            "description": "Keep rows with rating >= this, applied before billing. Subjects (search, charts, explore, details): Douban score 0-10 (e.g. 8). Comments/reviews: stars 1-5 (e.g. 4). Rows without a rating are dropped when set."
          },
          "maxRating": {
            "title": "Max rating",
            "type": "number",
            "description": "Keep rows with rating <= this. Same scales as minRating. Example: comments with maxRating 2 = 1-2 star complaints."
          },
          "dateFrom": {
            "title": "Created from",
            "type": "string",
            "description": "comments, reviews, group topics, photos: keep items created on/after this date. 2026-10-01 (Beijing time), ISO date-time, or relative 7d / 24h / 4w. Applied before billing."
          },
          "maxCostUsd": {
            "title": "Max cost (USD)",
            "type": "number",
            "description": "Stop before the run's charges would exceed this amount (e.g. 0.05). The run ends SUCCEEDED with the rows so far plus a free BUDGET_REACHED error row. Works together with Apify's max cost per run."
          },
          "dryRun": {
            "title": "Dry run (free plan)",
            "type": "boolean",
            "description": "true = fetch and bill nothing: one free plan row per input (operation, queryUsed, estimated rows, event, cost, seconds) plus a summary. Check routing and cost first.",
            "default": false
          },
          "deltaKey": {
            "title": "Delta key (monitoring)",
            "type": "string",
            "description": "Name of a memory shared by runs (e.g. top250-weekly). Rows get isNew; chart rows also previousRank and rankChange vs the last run with the same key. Combine with onlyNew. Stored in your named key-value store douban-delta-<key>."
          },
          "onlyNew": {
            "title": "Only new rows",
            "type": "boolean",
            "description": "true = skip (not billed) rows already returned by earlier runs with the same deltaKey (deltaKey \"default\" if empty), e.g. new comments, reviews or group topics since the last scheduled run.",
            "default": false
          },
          "maxSubjects": {
            "title": "Research: subjects per keyword",
            "type": "integer",
            "description": "subject_research: how many top search hits per keyword to research. Default 1, range 1-10 (clamped)."
          },
          "maxCommentsPerItem": {
            "title": "Research: short comments per subject",
            "type": "integer",
            "description": "subject_research: hot short comments per subject (billed as comment). Default 50, range 0-150 (Douban shows guests ~150). 0 = none."
          },
          "maxReviewsPerItem": {
            "title": "Research: reviews per subject",
            "type": "integer",
            "description": "subject_research: reviews per subject. Default 10, range 0-40 (Douban guest cap ~40). Billed as comment (list row) or review with include fullText. 0 = none."
          },
          "maxRepliesPerItem": {
            "title": "Replies per review / topic",
            "type": "integer",
            "description": "With include replies: replies embedded per full review or group topic (nested review replies flattened, replyToId/replyToName set). Default 20, range 0-200. No extra charge."
          },
          "matchTerms": {
            "title": "Match terms (keep rows mentioning any)",
            "type": "array",
            "description": "Keep only comments/reviews/topics whose text mentions any term (case-insensitive) and count each term in the insights row. Filtering happens after fetching and before billing: dropped rows are not billed, but fetch work is the same.",
            "items": {
              "type": "string"
            }
          },
          "minRatingCount": {
            "title": "Min number of ratings (subjects)",
            "type": "integer",
            "description": "Skip subjects with fewer Douban ratings (search, charts, explore, subject_research). Rows without a rating count are skipped too."
          },
          "insights": {
            "title": "Insights row (free)",
            "type": "boolean",
            "description": "subject_research: free insights row per subject is on unless false. Other comments/reviews runs: true adds it (same as include insights)."
          },
          "dateTo": {
            "title": "Created until",
            "type": "string",
            "description": "Keep items created on/before this date. Same formats as dateFrom."
          },
          "stars": {
            "title": "Exact stars (comments/reviews)",
            "type": "array",
            "description": "Keep comments/reviews with exactly these star ratings, e.g. [\"1\",\"2\"]. Applied before billing.",
            "items": {
              "type": "string"
            }
          },
          "strictMatch": {
            "title": "Strict keyword match (topic_search, group_search)",
            "type": "boolean",
            "description": "Douban group search is fuzzy: 小米SU7 also returns topics that only say 小米. true = keep only topics (group names) whose title contains the keyword, spaces and case ignored, or every part of it (小米 + SU7); mixed keywords are also searched by their Latin part. Filtered before billing. Default false."
          },
          "textContains": {
            "title": "Text contains (any)",
            "type": "array",
            "description": "Keep rows whose title/text/abstract contains at least one of these words (case-insensitive), checked before billing.",
            "items": {
              "type": "string"
            }
          },
          "leanFormat": {
            "title": "Lean format",
            "enum": [
              "rows",
              "table"
            ],
            "type": "string",
            "description": "Only with outputMode lean. rows (default) = dataset rows. table = also one tab-separated table per row type in the summary row (leanTable, when < 20 KB) and key-value record LEAN_TABLE.",
            "default": "rows"
          },
          "maxTextChars": {
            "title": "Max text characters",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cut text, abstract, intro and description to this many characters (ends with …, row gets truncated: true). Default 300 in lean mode, no cut otherwise. When set, also cuts full review/topic bodies (contentMarkdown)."
          },
          "expandQuery": {
            "title": "Translate English keywords",
            "type": "boolean",
            "description": "English titles/names are mapped to Chinese with a curated dictionary (~950 entries: The Wandering Earth -> 流浪地球, Harry Potter -> 哈利波特, Jay Chou -> 周杰伦). queryUsed shows the term searched. false = search the keyword as typed.",
            "default": true
          },
          "dedupe": {
            "title": "De-duplicate",
            "type": "boolean",
            "description": "Drop rows already returned earlier in the run (same type + id), e.g. when two keywords find the same movie.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Default: no proxy (Douban's mobile API answers Apify IPs directly); if Douban rate-limits the IP, the Actor slows down and switches to Apify Proxy by itself ({\"useApifyProxy\":false} forbids that). Set {\"useApifyProxy\":true} to always use a proxy."
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "type": "integer",
            "description": "Retries with backoff on rate limits or server errors (0-6). Login walls are not retried.",
            "default": 3
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "type": "integer",
            "description": "Minimum spacing between request starts (0-5000). Default 0 = up to 8 requests in flight; after a Douban rate limit the Actor slows itself to 3 in flight and 300 ms spacing. Raise (e.g. 500) only for very large runs.",
            "default": 0
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}