{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin 抖音 Video Scraper - Metadata",
    "description": "Scrape Douyin (抖音) videos and image posts from links, share links or IDs. Get caption, author, music, likes, comments, shares, hashtags, video quality links and post date as clean JSON. Optional MP4, cover and image downloads. Bulk input, no account or cookies needed.",
    "version": "1.0",
    "x-build-id": "p7xCbfPLvaVtsq9wc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insights_data~douyin-video-scraper-metadata/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insights_data-douyin-video-scraper-metadata",
        "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/insights_data~douyin-video-scraper-metadata/runs": {
      "post": {
        "operationId": "runs-sync-insights_data-douyin-video-scraper-metadata",
        "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/insights_data~douyin-video-scraper-metadata/run-sync": {
      "post": {
        "operationId": "run-sync-insights_data-douyin-video-scraper-metadata",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "🔗 Douyin video links or IDs",
            "minItems": 1,
            "type": "array",
            "description": "One entry per line. Accepted: www.douyin.com/video/<id> or /note/<id> links, any Douyin page link with modal_id, v.douyin.com share links (or the whole share text copied from the app), www.iesdouyin.com/share/video/<id>/ links and bare numeric video IDs. Mixed formats are fine and duplicates are skipped. Free plan: up to 10 videos per run, with no monthly limit; paid plans have no limit.",
            "items": {
              "type": "string"
            }
          },
          "shouldDownloadVideos": {
            "title": "📥 Save MP4 video files",
            "type": "boolean",
            "description": "Download each video and store the MP4 in the key-value store. The row then has a videoFile entry with its storage key and link. Image posts have no MP4.",
            "default": false
          },
          "shouldDownloadCovers": {
            "title": "🌄 Save cover images",
            "type": "boolean",
            "description": "Download each video's cover image and store it in the key-value store (coverFile).",
            "default": false
          },
          "shouldDownloadSlideshowImages": {
            "title": "📸 Save slideshow images",
            "type": "boolean",
            "description": "For image posts, download every slide and store it in the key-value store (slideshowFiles). Has no effect on normal videos.",
            "default": false
          },
          "videoKvStoreName": {
            "title": "📂 Storage name for saved files",
            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$|^$",
            "type": "string",
            "description": "Optional name of a key-value store for the saved files (lowercase letters, digits and dashes). Leave empty to use this run's default key-value store."
          },
          "includeExtras": {
            "title": "🧪 Add extra details",
            "type": "boolean",
            "description": "Adds an extras block to every row: author follower and following counts, recommend and danmaku counts, secure item ID, AI-generated flag, download restriction note and suggested searches.",
            "default": false
          },
          "includeFailedItems": {
            "title": "🚧 Keep failed items in the results",
            "type": "boolean",
            "description": "Also save a short row (id, inputUrl, error) for every link that was unavailable, deleted, private or could not be read. These rows are not billed.",
            "default": false
          },
          "maxConcurrency": {
            "title": "🚀 Parallel videos",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many videos are read at the same time (1 to 10). Lower it if you see many slow-downs.",
            "default": 4
          },
          "maxRetries": {
            "title": "🔁 Retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How often a failed or blocked request is retried before giving up on that video (0 to 10). Also the number of fresh-IP tries on the last proxy step.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Optional. By default the actor connects without a proxy. If Douyin refuses the connection it switches to datacenter proxies, then residential proxies, and stays on that step for the rest of the run.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}