{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin Scraper & API | EveryInfra",
    "description": "Unofficial Douyin data via one Actor: search, profile, user_posts, video, comments, comment_replies, trending, transcript, creator_search, creator_audience, creator_trend, creator_benchmark and 25 more. Pay per request, no start fee. First 3 requests free across EveryInfra Actors.",
    "version": "0.1",
    "x-build-id": "9geHgcpnRJAfDEGeW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blushing_parachute~everyinfra-douyin-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blushing_parachute-everyinfra-douyin-api",
        "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/blushing_parachute~everyinfra-douyin-api/runs": {
      "post": {
        "operationId": "runs-sync-blushing_parachute-everyinfra-douyin-api",
        "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/blushing_parachute~everyinfra-douyin-api/run-sync": {
      "post": {
        "operationId": "run-sync-blushing_parachute-everyinfra-douyin-api",
        "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": [
          "action"
        ],
        "properties": {
          "action": {
            "title": "Action",
            "enum": [
              "search",
              "profile",
              "user_posts",
              "video",
              "comments",
              "comment_replies",
              "trending",
              "transcript",
              "creator_search",
              "creator_audience",
              "creator_trend",
              "creator_benchmark",
              "xingtu_creator_search",
              "xingtu_creator_analytics",
              "xingtu_rate_card",
              "xingtu_creator_rankings",
              "product_search",
              "product_detail",
              "live_product_search",
              "hashtag_search",
              "hashtag_detail",
              "billboard_video_hot",
              "billboard_low_fan_explosion",
              "billboard_high_completion",
              "billboard_search_hot",
              "billboard_account_search",
              "music_search",
              "search_suggest",
              "billboard_rise_list",
              "billboard_challenge_hot",
              "billboard_topic_hot",
              "music_detail",
              "xingtu_conversion_ability",
              "xingtu_link_structure",
              "xingtu_recommended_videos",
              "xingtu_touch_distribution",
              "xingtu_video_performance"
            ],
            "type": "string",
            "description": "What to fetch. Each action uses only the fields listed for it below; other fields are ignored when empty.",
            "default": "search"
          },
          "keyword": {
            "title": "keyword",
            "type": "string",
            "description": "Used by `search` (required), `creator_search` (required), `xingtu_creator_search` (required), `product_search` (required), `live_product_search` (required), `hashtag_search` (required), `billboard_video_hot`, `billboard_low_fan_explosion`, `billboard_high_completion`, `billboard_search_hot`, `billboard_account_search` (required), `music_search` (required), `search_suggest` (required), `billboard_rise_list`, `billboard_topic_hot`. Search term for the video search action, passed as a string, for example `latte art`. It finds videos; it is not an account nickname or a video ID."
          },
          "page_token": {
            "title": "page_token",
            "type": "string",
            "description": "Leave empty for the first page. To continue, copy next_page_token from the previous run's OUTPUT."
          },
          "publish_time": {
            "title": "publish_time",
            "enum": [
              "half_year",
              "one_day",
              "one_week",
              "unlimited"
            ],
            "type": "string",
            "description": "Used by `search`. Filters video search results by publishing time window. Allowed values are `unlimited` (default), `one_day` (last 24 hours), `one_week` (last 7 days), and `half_year` (last 6 months)."
          },
          "sort": {
            "title": "sort",
            "enum": [
              "most_liked",
              "newest",
              "relevance"
            ],
            "type": "string",
            "description": "Used by `search`. Sorts video search results. Allowed values are `relevance` (default), `newest` for the latest publish date, and `most_liked` for highest likes. Supports legacy compatibility aliases `general` (mapped to `relevance`) and `latest` (mapped to `newest`)."
          },
          "user_id": {
            "title": "user_id",
            "type": "string",
            "description": "Used by `profile` (required), `user_posts` (required), `creator_audience` (required), `creator_trend` (required), `creator_benchmark` (required). The Douyin user's `secUid` string (typically starting with `MS4w`), not a nickname or short numerical Douyin ID. It can be obtained from an `author_id` field in search results or from a user profile URL. If the account has been deleted or banned (Douyin keeps only an empty shell profile), the call returns 200 with an empty result and `empty_reason` set to `account_unavailable`. It is not charged, and retrying the same account does not change the result. Requesting the same account again within 24 hours returns the same result and is also not charged."
          },
          "since": {
            "title": "since",
            "type": "string",
            "description": "Used by `user_posts`. Sets a lower bound for video publish dates in `profile` and `user_posts` actions using the `YYYY-MM-DD` format. Filters videos retrieved for the request rather than account creation date. Omitting this parameter removes the date filter."
          },
          "url": {
            "title": "url",
            "type": "string",
            "description": "Used by `video` (required), `comments` (required), `comment_replies` (required), `transcript` (required). Full URL of the target Douyin video, formatted as `https://www.douyin.com/video/<video_id>`. Do not pass user profile or search page URLs. If the video does not exist or cannot be viewed (deleted, set to visible only to the author, still under review, or the ID is wrong), the call returns 200 with an empty result and `empty_reason` set to `post_unavailable`. It is not charged. Requesting the same URL again within 1 hour returns the same result and is also not charged. The window is 1 hour because a video that is visible only to the author or under review may become visible later; a request after 1 hour looks the video up again."
          },
          "comment_id": {
            "title": "comment_id",
            "type": "string",
            "description": "Used by `comment_replies` (required). The ID of the top-level comment whose replies you want, digits only, taken from the `id` of a `comments` row; only comments whose `reply_count` is above zero have replies. Used by `comment_replies` together with the `url` of the same video; it is not a video ID or a reply ID."
          },
          "boards": {
            "title": "boards",
            "type": "array",
            "description": "Used by `trending`. Specifies trending board types to query in the `trending` action, passed as a single string or an array of strings: `hotspot`, `seeding`, `entertainment`, `social`, and `challenge`. Defaults to `hotspot` if omitted or passed as an empty array.",
            "items": {
              "type": "string"
            }
          },
          "follower_range": {
            "title": "follower_range",
            "enum": [
              "100k_to_1m",
              "10k_to_100k",
              "1k_to_10k",
              "over_1m",
              "under_1k"
            ],
            "type": "string",
            "description": "Used by `creator_search`. Filters `creator_search` by an account's follower-count band. Use `under_1k`, `1k_to_10k`, `10k_to_100k`, `100k_to_1m`, or `over_1m`; omit it to leave the band unrestricted."
          },
          "user_type": {
            "title": "user_type",
            "enum": [
              "business",
              "general",
              "verified_individual"
            ],
            "type": "string",
            "description": "Used by `creator_search`. Filters `creator_search` by account category: `general`, `business`, or `verified_individual`. It is not a buyer category or proof of legal identity."
          },
          "dimension": {
            "title": "dimension",
            "enum": [
              "age",
              "device_price_band",
              "gender",
              "province"
            ],
            "type": "string",
            "description": "Used by `creator_audience`. Selects the `creator_audience` follower-segment view: `device_price_band` (default), `gender`, `age`, or `province`. Distribution values are raw share decimals from 0 to 1, not percentages; TGI remains a separate index. This parameter does not request individual follower records or buyer data."
          },
          "douyin_id": {
            "title": "douyin_id",
            "type": "string",
            "description": "Used by `xingtu_creator_analytics` (required), `xingtu_rate_card` (required), `xingtu_conversion_ability` (required), `xingtu_link_structure` (required), `xingtu_recommended_videos` (required), `xingtu_touch_distribution` (required), `xingtu_video_performance` (required). The visible Douyin account ID (`unique_id`) returned by the ordinary `creator_search` action and required by `xingtu_creator_analytics` and `xingtu_rate_card`; `xingtu_creator_search` does not return it. It is distinct from a `user_id` (`secUid`), Xingtu `creator_id`, and nickname."
          },
          "industry": {
            "title": "industry",
            "enum": [
              "apparel_accessories",
              "automotive",
              "beauty",
              "electronics",
              "food_beverage",
              "household_goods",
              "mother_baby_pets"
            ],
            "type": "string",
            "description": "Used by `xingtu_creator_rankings` (required). Selects the Xingtu creator-ranking industry: `apparel_accessories`, `automotive`, `beauty`, `electronics`, `food_beverage`, `household_goods`, or `mother_baby_pets`. It is a board filter, not a creator-authored tag."
          },
          "ranking_type": {
            "title": "ranking_type",
            "enum": [
              "all_top",
              "head_tier",
              "paid_ad_performers",
              "rising_stars",
              "sales_champions",
              "top_creators",
              "viral_drivers"
            ],
            "type": "string",
            "description": "Used by `xingtu_creator_rankings` (required). Selects the Xingtu ranking board: `all_top`, `head_tier`, `paid_ad_performers`, `rising_stars`, `sales_champions`, `top_creators`, or `viral_drivers`. Board names do not turn rank into a forecast or guaranteed outcome."
          },
          "time_window": {
            "title": "time_window",
            "enum": [
              "1d",
              "1h",
              "30d",
              "3d",
              "7d",
              "90d",
              "all_history_monthly",
              "all_history_weekly",
              "latest_monthly",
              "latest_weekly"
            ],
            "type": "string",
            "description": "Used by `xingtu_creator_rankings` (required), `billboard_video_hot`, `billboard_low_fan_explosion`, `billboard_high_completion`, `billboard_search_hot`, `billboard_topic_hot`, `xingtu_conversion_ability`. Selects the Xingtu ranking snapshot: `latest_weekly`, `latest_monthly`, `all_history_weekly`, or `all_history_monthly`. This scopes the returned leaderboard and does not accept an arbitrary date range."
          },
          "page": {
            "title": "page",
            "type": "integer",
            "description": "Used by `product_search`. Page number from 1 to 17, with up to 30 products a page. Only page 1 can be read for now, as one call; pages 2 to 17 return 503 and are not charged. When `page_token` is also sent, the token wins."
          },
          "product_id": {
            "title": "product_id",
            "type": "string",
            "description": "Used by `product_detail` (required). A numeric Douyin product ID returned by `product_search` or `live_product_search`. It is not a SKU ID, promotion ID, title, or URL."
          },
          "hashtag_id": {
            "title": "hashtag_id",
            "type": "string",
            "description": "Used by `hashtag_detail` (required). The numeric ID of a Douyin hashtag for `hashtag_detail`, such as `1767586897793101`, taken from the `hashtag_id` of a `hashtag_search` row. A hashtag name or `#name` is rejected before any charge."
          },
          "board": {
            "title": "board",
            "enum": [
              "all",
              "follower_growth",
              "like_rate"
            ],
            "type": "string",
            "description": "Used by `billboard_video_hot`. Board for `billboard_video_hot`: `all` (default) is the overall board, `follower_growth` the board for works that gained the most followers relative to plays, and `like_rate` the board for the highest like rate."
          },
          "music_id": {
            "title": "music_id",
            "type": "string",
            "description": "Used by `music_detail` (required). Numeric Douyin music ID, such as `7699717253151558410`, taken from the `id` of a `music_search` row, from a video's `music.id` or from `music_detail`; a douyin.com/music/<ID> link is accepted too."
          },
          "limit": {
            "title": "limit",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many results to request for list actions. Defaults and maximums per action: `search` 10 (max 50); `user_posts` 20 (max 100); `comments` 20 (max 150); `comment_replies` 20 (max 100); `trending` 20 (max 60); `creator_search` 20 (max 20); `xingtu_creator_search` 20 (max 20); `xingtu_creator_rankings` 5 (max 5); `live_product_search` 3 (max 3); `hashtag_search` 20 (max 200); `search_suggest` 10 (max 10); `billboard_challenge_hot` 50 (max 50). Billing: `search` one event per started block of 10 results; `user_posts` one event per started block of 20 results; `comments` one event per started block of 20 results; `comment_replies` one event per started block of 20 results; `trending` one event per started block of 20 results; `creator_search` one event per non-empty request, whatever the row count; `xingtu_creator_search` one event per non-empty request, whatever the row count; `xingtu_creator_rankings` one event per non-empty request, whatever the row count; `live_product_search` one event per non-empty request, whatever the row count; `hashtag_search` one event per started block of 20 results; `search_suggest` one event per non-empty request, whatever the row count; `billboard_challenge_hot` one event per non-empty request, whatever the row count."
          },
          "params": {
            "title": "params (advanced)",
            "type": "object",
            "description": "Optional JSON object with the same fields as above, for API and integration use. Flat fields and params must not disagree."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}