{
  "openapi": "3.0.1",
  "info": {
    "title": "Douban Scraper - Movies, TV, Books, Music & Reviews",
    "description": "Scrape Douban movies, TV, books and music albums: ratings with full star distribution, cast and crew, awards, IMDb IDs, short comments, long reviews and people profiles. No login, no browser. Export CSV/JSON.",
    "version": "0.1",
    "x-build-id": "1yYQAAdDzHQYFBUii"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~douban-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~douban-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-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/scrapesage~douban-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-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": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "movies",
              "books",
              "music",
              "comments",
              "reviews",
              "people"
            ],
            "type": "string",
            "description": "Each mode emits exactly ONE record type. Movies covers films and TV series. Comments and Reviews take a movie/book/music subject and return its short comments or long reviews. People returns person profiles - pass a person URL, or a movie URL to get that title's whole cast.",
            "default": "movies"
          },
          "collection": {
            "title": "Built-in collection",
            "enum": [
              "none",
              "top250",
              "chart",
              "nowPlaying",
              "tag"
            ],
            "type": "string",
            "description": "Scrape a whole Douban chart without needing any URLs. Top 250 works for movies, books and music. Chart and Now playing are movies only. Tag browses a category tag (set the Tag field below).",
            "default": "none"
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Douban search keywords - Chinese or English, e.g. 科幻, 三体, Nolan. Works for Movies & TV and for Books. Douban exposes no keyword search for Music, so in Music mode use Top 250, a tag, or album URLs instead.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Douban URLs",
            "type": "array",
            "description": "Direct Douban URLs - movie/book/music subject pages (https://movie.douban.com/subject/1292052/) or person pages (https://www.douban.com/personage/27260288/). In Comments/Reviews mode these are the subjects to pull from; in People mode a subject URL returns that title's full cast.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "tag": {
            "title": "Tag",
            "type": "string",
            "description": "Only used when Collection = Browse by tag. e.g. 科幻, 小说, 悬疑.",
            "default": ""
          },
          "city": {
            "title": "City (Now playing)",
            "type": "string",
            "description": "Only used when Collection = Now playing in cinemas. Douban city slug, e.g. beijing, shanghai, guangzhou, chengdu.",
            "default": "beijing"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many records. Set 0 for no cap - the run then stops only on its own wall-clock budget and always exits Succeeded with whatever it collected.",
            "default": 100
          },
          "includeDetails": {
            "title": "Fetch full detail pages",
            "type": "boolean",
            "description": "ON (default) opens each subject page for the rich fields: full rating distribution, genres, countries, languages, release dates, runtime, IMDb ID, synopsis, alternate titles and recommendations. OFF is faster and cheaper but returns listing-level fields only.",
            "default": true
          },
          "includeCast": {
            "title": "Include full cast & crew (movies)",
            "type": "boolean",
            "description": "Adds the complete cast/crew list with each person's role, Douban person ID and best-known titles - typically 60+ people versus the 9 shown on the subject page. Costs one extra request per title.",
            "default": true
          },
          "includeAwards": {
            "title": "Include awards (movies)",
            "type": "boolean",
            "description": "Adds every awards ceremony the title appeared in, with each category, whether it won or was only nominated, and the people nominated. Costs one extra request per title.",
            "default": true
          },
          "maxPerSubject": {
            "title": "Max comments / reviews per subject",
            "minimum": 1,
            "type": "integer",
            "description": "Only used in Comments and Reviews mode - caps how many are pulled from each subject before moving to the next one.",
            "default": 100
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Only keep records rated at or above this (Douban's scale is 0-10). Leave empty for no filter. Applied inside the crawl, so it never starves the item cap."
          },
          "detailConcurrency": {
            "title": "Detail concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many detail pages to fetch in parallel. Each parallel request leaves from its own residential IP, so raising this is safe - but Douban rate-limits per IP, so 4 is a good balance.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxy is strongly recommended - Douban throttles per IP and the actor rotates a pool of sessions to stay ahead of it.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}