{
  "openapi": "3.0.1",
  "info": {
    "title": "Douban (豆瓣) Movie & TV Trending Scraper",
    "description": "Discover trending and top-rated movies & TV on Douban (豆瓣) with their ratings — no login, no account, no cookies, no API key.",
    "version": "0.1",
    "x-build-id": "yRY8mbGzPxonVxeRy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foxlabs~douban-trending-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foxlabs-douban-trending-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/foxlabs~douban-trending-scraper/runs": {
      "post": {
        "operationId": "runs-sync-foxlabs-douban-trending-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/foxlabs~douban-trending-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-foxlabs-douban-trending-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": {
          "categories": {
            "title": "Trending categories to sweep",
            "type": "array",
            "description": "Keyless discovery lists to pull (movie/TV + Douban tag). Leave empty (and give no subject IDs) to sweep all. Each delivered title is a `hot` result.",
            "items": {
              "type": "string",
              "enum": [
                "movie_hot",
                "movie_newest",
                "movie_top",
                "movie_hidden",
                "movie_chinese",
                "movie_western",
                "movie_korean",
                "movie_japanese",
                "movie_animation",
                "tv_hot",
                "tv_chinese",
                "tv_us",
                "tv_uk",
                "tv_korean",
                "tv_japanese",
                "tv_anime",
                "tv_variety",
                "tv_documentary"
              ],
              "enumTitles": [
                "Movies · Hot 热门",
                "Movies · Newest 最新",
                "Movies · Top rated 豆瓣高分",
                "Movies · Hidden gems 冷门佳片",
                "Movies · Chinese 华语",
                "Movies · Western 欧美",
                "Movies · Korean 韩国",
                "Movies · Japanese 日本",
                "Movies · Animation 动画",
                "TV · Hot 热门",
                "TV · Chinese drama 国产剧",
                "TV · US 美剧",
                "TV · UK 英剧",
                "TV · Korean 韩剧",
                "TV · Japanese 日剧",
                "TV · Anime 日本动画",
                "TV · Variety 综艺",
                "TV · Documentary 纪录片"
              ]
            },
            "default": []
          },
          "sort": {
            "title": "Trending sort order",
            "enum": [
              "recommend",
              "time",
              "rank"
            ],
            "type": "string",
            "description": "How Douban orders each discovery list.",
            "default": "recommend"
          },
          "maxResults": {
            "title": "Max trending titles",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on unique trending (`hot`) titles across the run (deduplicated by subject id).",
            "default": 500
          },
          "maxPages": {
            "title": "Max pages per category",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Pages (20 titles each) to walk per trending category.",
            "default": 25
          },
          "subjectIds": {
            "title": "Subject IDs or URLs to deep-scrape",
            "type": "array",
            "description": "Douban subject IDs or movie.douban.com/subject/<id>/ URLs to deep-scrape for full detail, reviews and/or comments. Works on its own (no trending needed).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "enrichTrending": {
            "title": "Enrich trending titles with full detail",
            "type": "boolean",
            "description": "After the trending sweep, deep-scrape every discovered title for full detail (cast, crew, IMDb, synopsis) and the reviews/comments you enable below. This is the zero-config 'everything' mode.",
            "default": false
          },
          "scrapeDetail": {
            "title": "Scrape full detail",
            "type": "boolean",
            "description": "For each deep-scrape subject, fetch the full detail row (rating & votes, directors, cast, genres, countries, languages, runtime, IMDb id, aka titles, synopsis).",
            "default": true
          },
          "scrapeReviews": {
            "title": "Scrape long-form reviews",
            "type": "boolean",
            "description": "For each deep-scrape subject, fetch long-form reviews (author, title, rating, date, snippet, review URL).",
            "default": false
          },
          "scrapeComments": {
            "title": "Scrape short comments (with location)",
            "type": "boolean",
            "description": "For each deep-scrape subject, fetch short comments (author, rating, date, province/location where shown, votes, text).",
            "default": false
          },
          "maxReviewsPerTitle": {
            "title": "Max reviews per title",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on long-form reviews per subject.",
            "default": 20
          },
          "maxCommentsPerTitle": {
            "title": "Max comments per title",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on short comments per subject.",
            "default": 40
          },
          "maxSubjects": {
            "title": "Max subjects to deep-scrape",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap on how many subjects are deep-scraped in one run (applies to subjectIds and enrichTrending).",
            "default": 200
          },
          "maxRunSeconds": {
            "title": "Time budget (seconds, 0 = none)",
            "minimum": 0,
            "maximum": 36000,
            "type": "integer",
            "description": "Optional soft deadline. 0 means no time limit.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy with a fresh exit per request/session. Deep-scrape uses a sticky exit to keep its anti-bot clearance; if an exit is blocked it rotates. Switch to residential only if datacenter exits are blocked.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}