{
  "openapi": "3.0.1",
  "info": {
    "title": "Douban Movie Scraper",
    "description": "Find movies through Douban search suggestions, collect a tagged list or the Top250, or look up subjects by ID. The dataset includes titles, years, ratings, posters, and available genres, directors, actors, and runtime. Top250 results can also include rank, rating count, and quote.",
    "version": "0.1",
    "x-build-id": "JypMoocImZmWLJcXv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axiomworks~douban-movie-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axiomworks-douban-movie-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/axiomworks~douban-movie-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axiomworks-douban-movie-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/axiomworks~douban-movie-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axiomworks-douban-movie-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": "Collection or lookup mode",
            "enum": [
              "top250",
              "hot",
              "search",
              "subjects"
            ],
            "type": "string",
            "description": "Choose \"top250\" (default: ranked movie list), \"hot\" (tag), \"search\" (title suggestions), or \"subjects\" (IDs/URLs). Example: \"top250\". Only inputs for the selected mode are used.",
            "default": "top250"
          },
          "searchQuery": {
            "title": "Movie title for search mode",
            "type": "string",
            "description": "Movie title or phrase, e.g. \"inception\" or \"千与千寻\"; up to 200 characters. Used only with mode \"search\" and merged with searchQueries. Supply at least one query across these two fields. Default empty; unmatched terms return no rows.",
            "default": ""
          },
          "searchQueries": {
            "title": "Additional movie titles for search mode",
            "type": "array",
            "description": "Additional movie titles, e.g. [\"千与千寻\", \"parasite\"]. Used only with mode \"search\"; merged with searchQuery and deduplicated. Up to 50 combined queries, each at most 200 characters. Default []; maxItems is shared across all queries.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searchMatch": {
            "title": "Search title matching",
            "enum": [
              "any",
              "titleContains"
            ],
            "type": "string",
            "description": "Choose any (default) to keep Douban suggestions and tag matches, or titleContains to retain only results whose returned title or subtitle contains the query. Case-insensitive, Unicode-normalized matching. Used only in search mode; filtering can return fewer than maxItems or zero rows.",
            "default": "any"
          },
          "subjectIds": {
            "title": "Douban movie IDs or HTTPS URLs",
            "type": "array",
            "description": "Movie IDs or HTTPS subject URLs, e.g. [\"1292052\"]. Used only in subjects mode; merged with subjectUrls and subjectId. Supply at least one target. Default []; duplicate IDs are fetched once, unavailable targets return no rows, maxItems is shared.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "subjectUrls": {
            "title": "Douban movie URLs",
            "type": "array",
            "description": "HTTPS movie subject URLs, e.g. [\"https://movie.douban.com/subject/1292052/\"]. In subjects mode, merged with subjectIds and subjectId. Query strings are accepted. Default []; maxItems is shared across targets. Unavailable targets return no rows.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "subjectId": {
            "title": "Single Douban movie ID",
            "type": "string",
            "description": "One movie ID or HTTPS subject URL, e.g. \"1292052\". In subjects mode, merged with subjectIds and subjectUrls. Default empty; use this for a single lookup. Unavailable targets return no rows.",
            "default": ""
          },
          "tag": {
            "title": "Douban movie tag for hot mode",
            "type": "string",
            "description": "Movie tag, e.g. \"热门\" (default) or \"豆瓣高分\"; at most 100 characters. Used only with mode \"hot\". An unknown tag may return no rows; try a known Douban movie tag.",
            "default": "热门"
          },
          "maxItems": {
            "title": "Total movie row limit",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Total unique movie rows to save across all pages, queries, or IDs, e.g. 25. Whole number 1-10000, default 50. Stops at this shared limit or when available results end; top250 has at most 250 movies.",
            "default": 50
          },
          "includeDetails": {
            "title": "Fetch movie abstract details",
            "type": "boolean",
            "description": "Set true (default), e.g. true, to fetch directors, actors, duration and other available abstract fields for list/search results. False reduces requests and leaves abstract-only fields empty. Subjects mode always reads abstracts. Missing or blocked details remain empty.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy settings for Douban requests",
            "type": "object",
            "description": "Proxy settings, e.g. {\"useApifyProxy\":true} (default: Apify datacenter proxy). Blocked requests retry on fresh sessions. If a target remains blocked, the run succeeds without rows for that target; retry later or change these proxy settings.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}