{
  "openapi": "3.0.1",
  "info": {
    "title": "Douban Scraper (豆瓣电影) - 短评 Comments, 影评 Reviews, Top 250",
    "description": "Returns Douban (豆瓣) movies, TV, books, music: rating, star split, countries, release dates; short comments (短评) and reviews (影评) with stars and helpful votes; Top 250 and now showing with country and date filters; group posts. $2/1,000 subjects or reviews, $1/1,000 comments. No login.",
    "version": "0.1",
    "x-build-id": "2P285vZn9bvYCvIuP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/improved_knot_vyk~douban-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-improved_knot_vyk-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/improved_knot_vyk~douban-scraper/runs": {
      "post": {
        "operationId": "runs-sync-improved_knot_vyk-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/improved_knot_vyk~douban-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-improved_knot_vyk-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": [
              "charts",
              "subject_details",
              "subject_comments",
              "subject_reviews",
              "subject_search",
              "group_search",
              "group_topic"
            ],
            "type": "string",
            "description": "One mode per run. Comments and reviews can also be added to every subject in details, charts and search.",
            "default": "charts"
          },
          "charts": {
            "title": "Charts",
            "type": "array",
            "description": "movie_top250, movie_showing (now showing), movie_soon, movie_hot_gaia, movie_real_time_hotest, tv_hot, tv_real_time_hotest, book_top250.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries (charts)",
            "type": "array",
            "description": "Keep only subjects from any of these countries, as Douban writes them: 中国大陆, 中国香港, 中国台湾, 美国, 日本, 韩国...",
            "items": {
              "type": "string"
            }
          },
          "releasedAfter": {
            "title": "Released after (charts)",
            "type": "string",
            "description": "Keep only subjects released on or after this date: YYYY-MM-DD or YYYY."
          },
          "sortBy": {
            "title": "Chart order",
            "enum": [
              "default",
              "newest",
              "rating"
            ],
            "type": "string",
            "description": "With filters, e.g. the 5 newest Chinese movies now showing: countries 中国大陆, order newest, max 5.",
            "default": "default"
          },
          "subjectUrls": {
            "title": "Subject URLs or ids",
            "type": "array",
            "description": "Douban links like https://movie.douban.com/subject/1291546/, https://book.douban.com/subject/1084336/, https://music.douban.com/subject/1419463/ (TV shows use movie links), or bare ids.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Subject search (title, person) or, in group search, the keyword a discussion title must contain. Chinese or English."
          },
          "searchType": {
            "title": "Search in",
            "enum": [
              "all",
              "movie",
              "book",
              "music"
            ],
            "type": "string",
            "description": "Also sets the type of bare ids in Subject URLs (movie by default).",
            "default": "all"
          },
          "topicUrls": {
            "title": "Group topic URLs or ids",
            "type": "array",
            "description": "Links like https://www.douban.com/group/topic/502497554/ for the group topic mode.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Per chart, per search query, per group search; in comment and review modes, per subject (Douban shows logged-out visitors up to 150 short comments and 40 reviews per subject, most helpful first).",
            "default": 50
          },
          "includeDetails": {
            "title": "Full details (charts and search)",
            "type": "boolean",
            "description": "Open each subject for languages, all release dates, durations, intro, tags, star distribution and want/watched counts. Chart rows already have rating, year, countries, genres, directors and actors.",
            "default": false
          },
          "includeComments": {
            "title": "Add short comments",
            "type": "boolean",
            "description": "Add the most helpful short comments (短评) of every subject, with stars and helpful votes.",
            "default": false
          },
          "maxComments": {
            "title": "Comments per subject",
            "minimum": 1,
            "maximum": 150,
            "type": "integer",
            "description": "Up to 150 (what Douban shows logged out).",
            "default": 20
          },
          "includeReviews": {
            "title": "Add long reviews",
            "type": "boolean",
            "description": "Add the most helpful long reviews (影评) of every subject, with stars, helpful and unhelpful votes.",
            "default": false
          },
          "maxReviews": {
            "title": "Reviews per subject",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Up to 40 (what Douban shows logged out).",
            "default": 10
          },
          "fetchFullReviewBody": {
            "title": "Full review text",
            "type": "boolean",
            "description": "Fetch each review's full text (one extra request each, same price). Off: title and abstract only.",
            "default": true
          },
          "fetchTopicContent": {
            "title": "Topic text and replies (group search)",
            "type": "boolean",
            "description": "Also read each found discussion's text and replies.",
            "default": false
          },
          "maxRepliesPerTopic": {
            "title": "Replies per topic",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Replies attached to each topic row.",
            "default": 50
          },
          "sentimentAnalysis": {
            "title": "Sentiment",
            "type": "boolean",
            "description": "Lexicon-based sentiment (positive, negative, neutral, score -1 to +1) on comments, reviews and topics.",
            "default": false
          },
          "deltaMode": {
            "title": "Only new rows (delta)",
            "type": "boolean",
            "description": "For scheduled runs: return only comments, reviews and topics no earlier run with the same state key delivered.",
            "default": false
          },
          "deltaStateKey": {
            "title": "Delta state key",
            "type": "string",
            "description": "Name of an independent tracking stream for delta mode.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed. Without a proxy, the Actor switches to Apify Proxy by itself if Douban blocks a request.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}