{
  "openapi": "3.0.1",
  "info": {
    "title": "Douban Scraper: Movies, Books, Reviews, Comments, Groups (豆瓣)",
    "description": "Douban scraper for movies, TV and books (search, Top 250 and hot charts, subject pages) with ratings and star distribution, long reviews with full text, short comments and group topics. No login, no browser, no cookies. From $2 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "S5qG0g5NTvC8WtS1d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datagleaner~douban-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datagleaner-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/datagleaner~douban-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datagleaner-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/datagleaner~douban-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datagleaner-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Titles or keywords to search on Douban, Chinese or English (for example 三体, 流浪地球, Christopher Nolan). Each keyword returns matching movies, TV series and books as subject rows; see Search category.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search category",
            "enum": [
              "all",
              "movie",
              "book"
            ],
            "type": "string",
            "description": "Which Douban catalogue to search. 'all' runs the movie/TV search and the book search for every keyword.",
            "default": "all"
          },
          "subjectUrls": {
            "title": "Movie, TV or book URLs or IDs",
            "type": "array",
            "description": "Douban subject pages such as https://movie.douban.com/subject/1292052/ or https://book.douban.com/subject/2567698/ (m.douban.com links work too). A bare numeric ID is tried as a movie or series, then as a book. Each returns one full subject row, plus reviews and comments when those are on.",
            "items": {
              "type": "string"
            }
          },
          "charts": {
            "title": "Charts and lists",
            "type": "array",
            "description": "Douban's public charts, in chart order with a rank on each row: Top 250 movies and books, real-time hot movies and series, weekly top 10s, now showing, coming soon and bestsellers.",
            "items": {
              "type": "string",
              "enum": [
                "movie_real_time_hotest",
                "movie_weekly_best",
                "movie_top250",
                "movie_showing",
                "movie_soon",
                "movie_hot_gaia",
                "tv_real_time_hotest",
                "tv_hot",
                "tv_chinese_best_weekly",
                "tv_global_best_weekly",
                "show_hot",
                "book_top250",
                "book_bestseller"
              ],
              "enumTitles": [
                "Movies: real-time hot (实时热门电影)",
                "Movies: weekly top 10 (一周口碑电影榜)",
                "Movies: Douban Top 250",
                "Movies: now in cinemas (正在热映)",
                "Movies: coming soon (即将上映)",
                "Movies: popular (热门电影)",
                "TV: real-time hot (实时热门电视)",
                "TV: popular (热门剧集)",
                "TV: weekly Chinese series top 10 (华语口碑剧集榜)",
                "TV: weekly global series top 10 (全球口碑剧集榜)",
                "TV: popular variety shows (热门综艺)",
                "Books: Douban Top 250",
                "Books: bestsellers (畅销图书榜)"
              ]
            }
          },
          "maxSubjects": {
            "title": "Max subjects per keyword or chart",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Upper bound on movies, series or books for each search keyword (per category) and each chart. Top 250 charts stop at 250.",
            "default": 50
          },
          "fetchSubjectDetails": {
            "title": "Full details for search and chart rows",
            "type": "boolean",
            "description": "Fetches each subject's full page: genres, directors, actors or authors, countries, release dates, runtime, pages, intro, tags and the 1-5 star rating distribution. Two extra requests per subject. Turn off for fast lists with title, year, rating, rating count and cover only.",
            "default": true
          },
          "includeReviews": {
            "title": "Add long reviews (影评/书评)",
            "type": "boolean",
            "description": "Adds the hottest long reviews of every subject as 'review' rows: title, rating, helpful votes, comment count, date, author and (with full text on) the whole review as plain text. Douban shows signed-out visitors the top 40 reviews per title.",
            "default": false
          },
          "maxReviewsPerSubject": {
            "title": "Max reviews per subject",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Upper bound on long reviews for each subject. 40 is Douban's limit for signed-out visitors.",
            "default": 40
          },
          "fetchFullReviewText": {
            "title": "Full review text",
            "type": "boolean",
            "description": "Fetches each review's full text, unhelpful votes, read count, spoiler flag and IP region (one extra request per review). Off: the review keeps Douban's abstract of about 300 characters.",
            "default": true
          },
          "includeComments": {
            "title": "Add short comments (短评)",
            "type": "boolean",
            "description": "Adds the hottest short comments of every subject as 'comment' rows: text, star rating, helpful votes, date and author. Douban shows signed-out visitors about the top 150 per title (often 100 for books).",
            "default": false
          },
          "maxCommentsPerSubject": {
            "title": "Max short comments per subject",
            "minimum": 1,
            "maximum": 150,
            "type": "integer",
            "description": "Upper bound on short comments for each subject. About 150 is Douban's limit for signed-out visitors.",
            "default": 100
          },
          "reviewUrls": {
            "title": "Review URLs or IDs",
            "type": "array",
            "description": "Single long reviews such as https://movie.douban.com/review/1000369/ or a bare review ID, each returned as one review row with full text.",
            "items": {
              "type": "string"
            }
          },
          "groupUrls": {
            "title": "Group URLs or IDs",
            "type": "array",
            "description": "Douban groups such as https://www.douban.com/group/beijingzufang/ or a group ID like 35417. Returns the group's newest topics as 'groupTopic' rows; Douban shows signed-out visitors the newest 450 or so.",
            "items": {
              "type": "string"
            }
          },
          "maxTopicsPerGroup": {
            "title": "Max topics per group",
            "minimum": 1,
            "maximum": 450,
            "type": "integer",
            "description": "Upper bound on topics for each group, newest first.",
            "default": 100
          },
          "fetchTopicContent": {
            "title": "Full topic text",
            "type": "boolean",
            "description": "Fetches each group topic's full text, IP region and save count (one extra request per topic). Off: title, dates, counts, tags and photos only.",
            "default": true
          },
          "topicUrls": {
            "title": "Group topic URLs or IDs",
            "type": "array",
            "description": "Single group topics such as https://www.douban.com/group/topic/503033210/ or a bare topic ID, each returned with its full text.",
            "items": {
              "type": "string"
            }
          },
          "requestDelaySeconds": {
            "title": "Delay between requests (seconds)",
            "minimum": 0.5,
            "maximum": 30,
            "type": "number",
            "description": "Base pause between requests; the actual pause is randomised up to 1.5x. Raise it if you see throttling.",
            "default": 1.2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Works without a proxy from Apify datacenter IPs; if Douban starts refusing a run, it moves to a fresh Apify Proxy session on its own."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}