{
  "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": "nYPkm4eL3z5RXvDcV"
  },
  "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",
        "properties": {
          "urls": {
            "title": "🔗 Douyin video links or IDs",
            "type": "array",
            "description": "One entry per line. Accepted: 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), iesdouyin.com share links and bare numeric IDs. Mixed formats are fine and duplicates are skipped. Profile links and non-Douyin links are skipped.",
            "items": {
              "type": "string"
            }
          },
          "includeExtras": {
            "title": "🧪 Add extra details",
            "type": "boolean",
            "description": "Adds an extras block to every row: author follower and verification text, recommend and danmaku counts, secure item ID, AI flag, suggested searches and up to about 10 top comments (top comments need the share page option).",
            "default": true
          },
          "shareFallback": {
            "title": "📍 Also read the Douyin share page",
            "type": "boolean",
            "description": "Also reads each post's public share page (no login, one light request): adds the tagged place, the author's post count and top comments, and serves as a backup when the main source cannot be used or hides a live post by region (rows then show dataSource share-page-fallback and have fewer fields). Switch off for the fastest run.",
            "default": true
          },
          "shouldDownloadVideos": {
            "title": "📥 Save MP4 video files",
            "type": "boolean",
            "description": "Downloads each video and stores 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. Files up to 500 MB are saved.",
            "default": false
          },
          "shouldDownloadCovers": {
            "title": "🌄 Save cover images",
            "type": "boolean",
            "description": "Downloads each video's cover image into the key-value store (coverFile).",
            "default": false
          },
          "shouldDownloadSlideshowImages": {
            "title": "📸 Save slideshow images",
            "type": "boolean",
            "description": "For image posts, downloads every slide into the key-value store (slideshowFiles). 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. With a name set, open files from each row's kvUrl."
          },
          "includeFailedItems": {
            "title": "🚧 Keep failed items in the results",
            "type": "boolean",
            "description": "Also saves 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).",
            "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 and 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}