{
  "openapi": "3.0.1",
  "info": {
    "title": "Douban Scraper - Movies, TV, Books & Music Metadata",
    "description": "Scrape Douban (豆瓣) movie, TV, book and music data: ratings, star distribution, genres, directors, cast, authors, publishers, tags and Top 250 rankings. No login needed. Clean English JSON.",
    "version": "1.0",
    "x-build-id": "HZCzITVCpy39bnvfP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/poetsc~douban-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-poetsc-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/poetsc~douban-scraper/runs": {
      "post": {
        "operationId": "runs-sync-poetsc-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/poetsc~douban-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-poetsc-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": {
          "collections": {
            "title": "Rankings & lists",
            "type": "array",
            "description": "Douban charts to scrape, e.g. Movie Top 250, Book Top 250, now showing, popular TV by region.",
            "items": {
              "type": "string",
              "enum": [
                "movie_top250",
                "movie_showing",
                "movie_soon",
                "movie_hot_gaia",
                "movie_weekly_best",
                "tv_hot",
                "tv_domestic",
                "tv_american",
                "tv_japanese",
                "tv_korean",
                "tv_animation",
                "show_hot",
                "tv_chinese_best_weekly",
                "tv_global_best_weekly",
                "book_top250",
                "book_fiction",
                "book_nonfiction",
                "book_bestseller",
                "book_latest"
              ],
              "enumTitles": [
                "Movie Top 250",
                "Movies now showing",
                "Movies coming soon",
                "Popular movies",
                "Weekly best movies",
                "Popular TV series",
                "Popular Chinese TV",
                "Popular American TV",
                "Popular Japanese TV",
                "Popular Korean TV",
                "Popular animation",
                "Popular variety shows",
                "Weekly best Chinese TV",
                "Weekly best global TV",
                "Book Top 250",
                "Popular fiction",
                "Popular non-fiction",
                "Bestselling books",
                "New books"
              ]
            }
          },
          "subjects": {
            "title": "Subject URLs or IDs",
            "type": "array",
            "description": "Douban subject URLs (movie.douban.com/subject/1292052/, book.douban.com/subject/1007305/, m.douban.com links) or type:id strings like movie:1292052, book:1007305, music:1394539.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search by title",
            "type": "array",
            "description": "Titles to look up (Chinese or original title). Uses Douban's public autocomplete, returns the top matches.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search in",
            "enum": [
              "movie",
              "book"
            ],
            "type": "string",
            "description": "Whether search queries look up movies & TV or books.",
            "default": "movie"
          },
          "maxItemsPerSource": {
            "title": "Max items per list / search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many subjects to take from each ranking or search query.",
            "default": 50
          },
          "maxItems": {
            "title": "Max total items",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on subjects saved in one run.",
            "default": 500
          },
          "includeRatingDistribution": {
            "title": "Include star distribution",
            "type": "boolean",
            "description": "Adds the 1-5 star percentage split, genre percentile ranks and wish/watched counts (one extra request per subject).",
            "default": true
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 300,
            "type": "integer",
            "description": "Politeness delay between requests to Douban. Keep it at 800+ for large runs.",
            "default": 800
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}