{
  "openapi": "3.0.1",
  "info": {
    "title": "Douban Scraper",
    "description": "Scrape Douban (豆瓣) films, TV shows, books and music: ratings with the full star split, directors and cast, synopsis, tags, charts like the Top 250, keyword search, short comments and whole long reviews. No login or cookies.",
    "version": "0.1",
    "x-build-id": "PFkQNuk70LZpbyRwd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automly~douban-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automly-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/automly~douban-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automly-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/automly~douban-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automly-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": {
          "startUrls": {
            "title": "Douban links or IDs",
            "type": "array",
            "description": "Douban title links, one per line, e.g. https://movie.douban.com/subject/1292052/ (a film or TV show), https://book.douban.com/subject/2567698/ (a book), https://music.douban.com/subject/26812952/ (an album), mobile m.douban.com links, review links like https://movie.douban.com/review/1000369/, chart links like https://movie.douban.com/top250, or a numeric title ID.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Words to search Douban for, one per line, e.g. 科幻, 三体, 宫崎骏 or Nolan. Chinese titles and names find the most. Each keyword lists matching titles in Douban's own order.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search in",
            "enum": [
              "movie",
              "book",
              "music"
            ],
            "type": "string",
            "description": "What the keywords search: movie (films and TV shows together), book or music.",
            "default": "movie"
          },
          "charts": {
            "title": "Douban charts",
            "type": "array",
            "description": "Douban charts to scrape, e.g. Top 250 films or Now in cinemas. Each chart gives its titles in chart order with their rank. Works with no links or keywords too.",
            "items": {
              "type": "string",
              "enum": [
                "movie_top250",
                "book_top250",
                "music_top250",
                "movie_weekly_best",
                "movie_real_time_hotest",
                "movie_showing",
                "movie_soon",
                "movie_hot_gaia",
                "tv_hot",
                "show_hot",
                "tv_real_time_hotest",
                "tv_chinese_best_weekly",
                "tv_global_best_weekly"
              ],
              "enumTitles": [
                "Top 250 films (豆瓣电影 Top250)",
                "Top 250 books (豆瓣读书 Top250)",
                "Top 250 albums (豆瓣音乐 Top250)",
                "Best films of the week (一周口碑电影榜)",
                "Trending films now (实时热门电影)",
                "Now in cinemas (影院热映)",
                "Coming to cinemas (即将上映)",
                "Popular films (豆瓣热门)",
                "Popular TV series (近期热门剧集)",
                "Popular variety shows (近期热门综艺)",
                "Trending TV now (实时热门电视)",
                "Best Chinese TV of the week (华语口碑剧集榜)",
                "Best global TV of the week (全球口碑剧集榜)"
              ]
            }
          },
          "maxTitles": {
            "title": "Titles per search or chart",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Most titles to save from each keyword or chart, e.g. 50. Douban lists up to 3,000 titles per keyword.",
            "default": 50
          },
          "includeDetails": {
            "title": "Full title details",
            "type": "boolean",
            "description": "Keep on to open every title for its full record: star rating split, genres, countries, languages, release dates, runtime, episodes, synopsis, tags, directors and full cast, authors, publisher, pages, tracks, wish/watched counts and chart honors. Off saves search and chart rows as they are listed (faster and cheaper).",
            "default": true
          },
          "includeComments": {
            "title": "Include short comments",
            "type": "boolean",
            "description": "Also save each title's short comments (短评) with their star rating, date and likes, most liked first. Each comment is its own row.",
            "default": false
          },
          "maxComments": {
            "title": "Comments per title",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most short comments to save per title, e.g. 20. Douban shows visitors who are not signed in about 150 comments of a film or TV show and 100 of a book.",
            "default": 20
          },
          "includeReviews": {
            "title": "Include long reviews",
            "type": "boolean",
            "description": "Also save each title's long reviews (影评, 书评, 乐评) with their whole text, star rating, date, helpful votes, replies and reads. Each review is its own row.",
            "default": false
          },
          "maxReviews": {
            "title": "Reviews per title",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Most long reviews to save per title, e.g. 20. Popular films and books have thousands; albums show about 40.",
            "default": 20
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Most rows to save in the whole run (titles, comments and reviews together), e.g. 500. Leave 0 for no limit.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave the default.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}