{
  "openapi": "3.0.1",
  "info": {
    "title": "Douban Scraper: Movies, Books, Ratings, Comments & Reviews (豆瓣)",
    "description": "Scrape Douban (豆瓣) without login: movie, TV and book search, full details and ratings, short comments (短评), reviews (影评/书评) with full text, and charts. $3 per 1,000 rows.",
    "version": "0.3",
    "x-build-id": "8IG4HxbmW2Kc48ha2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dheerajitbhu~douban-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dheerajitbhu-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/dheerajitbhu~douban-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dheerajitbhu-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/dheerajitbhu~douban-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dheerajitbhu-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "subject",
              "comments",
              "reviews",
              "chart",
              "selftest"
            ],
            "type": "string",
            "description": "What to scrape. No login or cookie is needed.",
            "default": "search"
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Used in 'search' mode. If left empty, the run uses 活着 as a sample keyword.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search in",
            "enum": [
              "movie",
              "book"
            ],
            "type": "string",
            "description": "Douban's movie search also returns TV series.",
            "default": "movie"
          },
          "fetchDetails": {
            "title": "Fetch full details for search results",
            "type": "boolean",
            "description": "Open each search result for its full details (intro, directors/actors or authors/publisher, genres, tags…). Same price per row, one extra request each.",
            "default": false
          },
          "subjectUrls": {
            "title": "Subject links",
            "type": "array",
            "description": "Used in 'subject', 'comments' and 'reviews'. Examples: https://movie.douban.com/subject/1292052/, https://book.douban.com/subject/1007305/, or movie:1292052 / tv:26647087 / book:1007305.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results per keyword / chart",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound for search and chart modes.",
            "default": 20
          },
          "maxComments": {
            "title": "Max short comments per title",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Most-helpful first. Douban shows about the top 150–200 without login.",
            "default": 50
          },
          "maxReviews": {
            "title": "Max reviews per title",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Most-helpful first. Douban shows the top 40 without login.",
            "default": 20
          },
          "fullReviewText": {
            "title": "Full review text",
            "type": "boolean",
            "description": "Fetch each review's full text (one extra request per review, no extra charge). Off: you get the abstract.",
            "default": false
          },
          "charts": {
            "title": "Charts / collections",
            "type": "array",
            "description": "Douban collection ids, e.g. movie_showing (in theaters), movie_real_time_hotest, tv_hot, book_fiction. Used in 'chart' mode.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "standard",
              "compact"
            ],
            "type": "string",
            "description": "Dataset rows are always pushed and charged the same either way. 'compact' additionally writes OUTPUT_COMPACT to the run's key-value store: a lossless columnar JSON encoding of the same rows that is far cheaper to feed to an LLM and decodes back to the exact same rows.",
            "default": "standard"
          },
          "maxChargeUsd": {
            "title": "Maximum charge per run (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Hard spending cap. The run stops cleanly before going over it; rows already delivered are kept.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Default: Apify datacenter proxy. If Douban blocks it (HTTP 403/418/429), the run switches once to the RESIDENTIAL group automatically. Pick RESIDENTIAL to use it from the start.",
            "default": {
              "useApifyProxy": true
            }
          },
          "requestIntervalSecs": {
            "title": "Seconds between requests",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "Polite pacing between requests.",
            "default": 1.2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}