{
  "openapi": "3.0.1",
  "info": {
    "title": "Douban Scraper",
    "description": "Scrape Douban (豆瓣) with no login: long reviews, short comments with stars (movies too), subject search and group search for movies, books and music. Input: subject links or a keyword. Output: one row per review, comment, subject or topic. Same fields as the top Douban Actor, about half the price.",
    "version": "0.1",
    "x-build-id": "d8IopLHZj0hE5zW59"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/istmobot~douban-scraper-cheap/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-istmobot-douban-scraper-cheap",
        "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/istmobot~douban-scraper-cheap/runs": {
      "post": {
        "operationId": "runs-sync-istmobot-douban-scraper-cheap",
        "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/istmobot~douban-scraper-cheap/run-sync": {
      "post": {
        "operationId": "run-sync-istmobot-douban-scraper-cheap",
        "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": [
              "subject_reviews",
              "subject_comments",
              "subject_search",
              "group_search",
              "group_topic"
            ],
            "type": "string",
            "description": "What to get, one mode per run, no login. subject_reviews: long-form reviews of each subject in subjectUrls (movies, books, music). subject_comments: short comments with star ratings (movies too). subject_search: movies, books or music matching searchQuery; each row's subjectUrl feeds the two modes above. group_search: Douban Group topics whose title contains searchQuery, newest first. group_topic: Douban shows group topics only to logged-in users, so this mode returns a free error row per topic. Example: \"subject_reviews\".",
            "default": "subject_reviews"
          },
          "subjectUrls": {
            "title": "Subject URLs",
            "type": "array",
            "description": "For subject_reviews and subject_comments. Douban subject links, one per line, e.g. \"https://movie.douban.com/subject/1292052/\", \"https://book.douban.com/subject/1084336/\" or \"https://music.douban.com/subject/1419463/\". A bare numeric ID is read as a movie.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "For subject_search and group_search. A keyword in Chinese or English. Douban indexes titles in Chinese, so \"三体\" finds far more than \"The Three-Body Problem\". In group_search only topics whose title contains the exact keyword are returned (case-insensitive). Examples: \"三体\", \"李宁\"."
          },
          "searchType": {
            "title": "Search category",
            "enum": [
              "all",
              "movie",
              "book",
              "music"
            ],
            "type": "string",
            "description": "subject_search only: \"all\" mixes movies, books and music page by page; or pick one category. Example: \"book\".",
            "default": "all"
          },
          "topicUrls": {
            "title": "Group topic URLs",
            "type": "array",
            "description": "For group_topic. Douban Group topic links, e.g. \"https://www.douban.com/group/topic/319929381/\". Douban shows topics only to logged-in users, so each topic gives a free error row (LOGIN_REQUIRED or NOT_FOUND). Use group_search to find topics by keyword.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results per URL or query",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum rows per subject link (reviews or comments) or per search query. Douban shows logged-out visitors at most the 40 most useful reviews and about 200 short comments per subject; search goes deeper. Example: 30.",
            "default": 50
          },
          "fetchFullReviewBody": {
            "title": "Fetch full review body",
            "type": "boolean",
            "description": "subject_reviews only. On (default): each review row carries the full long-form text in markdown (one extra light request per review). Off: the ~150-character excerpt Douban shows in the list. The price is the same either way.",
            "default": true
          },
          "deltaMode": {
            "title": "Delta mode (only new rows)",
            "type": "boolean",
            "description": "For scheduled runs. On: the Actor remembers the reviews, comments, subjects and topics it already delivered for this mode and these targets (up to 200,000 IDs) and skips them, so you are charged only for new rows. Example: run daily on a movie's comments to get only today's new ones.",
            "default": false
          },
          "deltaStateKey": {
            "title": "Delta memory name",
            "type": "string",
            "description": "Only used when Delta mode is on. By default each mode + target combination keeps its own memory. Give a name (letters, digits, - or _) to share or reset a memory on purpose, e.g. \"brand-watch-2026\"."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy. The default datacenter proxy works for every mode: the Actor answers Douban's bot check by itself. Residential also works.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}