{
  "openapi": "3.0.1",
  "info": {
    "title": "Douban Scraper – Movies, Books, Ratings, Comments & Reviews",
    "description": "Douban scraper for movies, TV shows and books without login: ratings and star distribution, short comments, full reviews, Top 250 and real-time hot lists, keyword search, cast, authors and publishers. Pay per result, no user profiles.",
    "version": "1.0",
    "x-build-id": "AGHmrQ7dTFTd4dU3J"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/openharvest~douban-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-openharvest-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/openharvest~douban-scraper/runs": {
      "post": {
        "operationId": "runs-sync-openharvest-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/openharvest~douban-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-openharvest-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": {
          "subjects": {
            "title": "Douban subjects (links or IDs)",
            "type": "array",
            "description": "Movie, TV or book pages. Accepted formats: <code>https://movie.douban.com/subject/1292052/</code>, <code>https://book.douban.com/subject/1084336/</code>, <code>https://m.douban.com/movie/subject/1292052/</code>, <code>book:1084336</code> or a plain ID like <code>1292052</code> (movie is tried first, then book).",
            "items": {
              "type": "string"
            }
          },
          "hotLists": {
            "title": "Hot lists & charts",
            "type": "array",
            "description": "Douban rankings to scrape: real-time hot movies/TV, weekly best, now showing, Top 250 movies and books, hot books and more. Each subject on the list becomes one result.",
            "items": {
              "type": "string",
              "enum": [
                "movie_real_time_hotest",
                "movie_weekly_best",
                "movie_showing",
                "movie_soon",
                "movie_hot_gaia",
                "movie_top250",
                "tv_real_time_hotest",
                "tv_hot",
                "tv_domestic",
                "tv_american",
                "tv_korean",
                "tv_japanese",
                "tv_animation",
                "show_hot",
                "book_top250",
                "book_hot",
                "book_fiction",
                "book_nonfiction",
                "book_bestseller"
              ],
              "enumTitles": [
                "Real-time hot movies (实时热门电影)",
                "Weekly best movies (一周口碑榜)",
                "Now showing in cinemas (正在热映)",
                "Coming soon (即将上映)",
                "Popular movies (热门电影)",
                "Top 250 movies (豆瓣电影Top250)",
                "Real-time hot TV (实时热门电视)",
                "Popular TV series (热门剧集)",
                "Chinese TV series (国产剧)",
                "US TV series (美剧)",
                "Korean TV series (韩剧)",
                "Japanese TV series (日剧)",
                "Animation series (动画)",
                "Popular variety shows (综艺)",
                "Top 250 books (豆瓣图书Top250)",
                "Popular books (热门图书)",
                "Fiction books (虚构类)",
                "Non-fiction books (非虚构类)",
                "Bestsellers (畅销图书)"
              ]
            }
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Optional. Search Douban by keyword (Chinese or English titles, names). Each query returns up to <i>Max subjects per list / search</i> results.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search in",
            "enum": [
              "movie",
              "book"
            ],
            "type": "string",
            "description": "What the keyword search looks for. <code>movie</code> also returns TV shows.",
            "default": "movie"
          },
          "maxSubjectsPerList": {
            "title": "Max subjects per list / search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of subjects taken from each hot list and each search keyword. Top 250 lists have 250 entries.",
            "default": 10
          },
          "fetchDetails": {
            "title": "Fetch full details for list / search results",
            "type": "boolean",
            "description": "On: every subject from a hot list or search gets full details (cast, directors, authors, publisher, intro, aka, star distribution, wish/done counts) - 2 extra requests each. Off: only the fields shown on the list (title, rating, cover, short info). Subjects given by link always get full details.",
            "default": true
          },
          "maxCommentsPerSubject": {
            "title": "Max short comments per subject (短评)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Short comments (one-line reviews with star rating and helpful votes), most helpful first. 0 = none. Without login Douban only shows roughly the top 150 per movie/TV show and about 100 per book.",
            "default": 20
          },
          "maxReviewsPerSubject": {
            "title": "Max reviews per subject (影评 / 书评)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Long reviews, most helpful first. 0 = none. Without login Douban only shows roughly the top 40 per subject.",
            "default": 5
          },
          "fullReviewText": {
            "title": "Full review text",
            "type": "boolean",
            "description": "On: download the complete text of every review (1 extra request per review). Off: only the ~150-character abstract.",
            "default": true
          },
          "requestDelaySecs": {
            "title": "Delay between requests (seconds)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Pause between requests to Douban. Douban bans IPs that go too fast - the default 2 seconds is safe; raise it if you see BLOCKED errors. With a rotating proxy you can lower it to 1.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Small runs work without a proxy. For large runs, or if you see BLOCKED errors, enable Apify Proxy (RESIDENTIAL, ideally country CN or HK/TW).",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}