跳到主要内容
抖音

douyin.videos.search@v1

抖音视频搜索

视频搜索

按关键词、排序、发布时间和视频时长读取一页公开抖音视频。

POST/v1/douyin/videos/search

英文名称: Douyin video search · Video · Search
Read one page of public Douyin videos by keyword, ordering, publication window, and duration.

适合什么任务

  • 需要发现与关键词相关的抖音公开视频。

不适合什么任务

  • 不用于全量召回、任意日期区间或完播率分析。

请求参数

字段query类型string约束与默认值minLength: 1 · maxLength: 128必填性必填
字段sort类型string约束与默认值enum: "relevance" | "most_liked" | "latest" · default: "relevance"必填性选填
字段published_within类型string约束与默认值enum: "any" | "day" | "week" | "half_year" · default: "any"必填性选填
字段duration类型string约束与默认值enum: "any" | "under_minute" | "one_to_five_minutes" | "over_five_minutes" · default: "any"必填性选填
字段cursor类型string约束与默认值minLength: 1必填性选填
完整请求 JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "sort": {
      "default": "relevance",
      "type": "string",
      "enum": [
        "relevance",
        "most_liked",
        "latest"
      ]
    },
    "published_within": {
      "default": "any",
      "type": "string",
      "enum": [
        "any",
        "day",
        "week",
        "half_year"
      ]
    },
    "duration": {
      "default": "any",
      "type": "string",
      "enum": [
        "any",
        "under_minute",
        "one_to_five_minutes",
        "over_five_minutes"
      ]
    },
    "cursor": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}

静态响应样例

application/json
{
  "code": 200,
  "request_id": "req_example_douyin_search_01",
  "message": "success",
  "data": {
    "items": [
      {
        "id": "7677044917696469382",
        "caption": "Public video example",
        "created_at": "2026-08-01T12:00:00.000Z",
        "author": {
          "id": "creator-01",
          "sec_uid": "sec-creator-01",
          "unique_id": "example",
          "name": "Example creator",
          "avatar_url": "https://ci.douyin.com/avatar"
        },
        "media": {
          "video_url": "https://ci.douyin.com/video.mp4",
          "cover_url": "https://ci.douyin.com/cover",
          "duration_seconds": 19.412,
          "width": 720,
          "height": 1280
        },
        "music": {
          "id": "music-01",
          "title": "Example music",
          "author": "Example musician"
        },
        "metrics": {
          "likes": 44,
          "comments": 4,
          "collects": 27,
          "shares": 65,
          "plays": null
        }
      }
    ]
  },
  "page": {
    "next_cursor": "opaque-cursor"
  },
  "warnings": [
    "play_count_unavailable"
  ],
  "meta": {
    "result_status": "complete",
    "balance_after": "0.98",
    "listing_id": "douyin.videos.search",
    "version": "v1",
    "catalog_release_id": "catalog-production-2026-09-17.1",
    "price_book_version": "pricebook-production-2026-09-17.1",
    "charged_amount": "0.02",
    "currency": "CNY"
  }
}

当前不可运行

完整结果和空结果收费;部分结果和失败不收费。

响应 Contract

字段摘要用于快速浏览;完整 JSON Schema 是稳定输出 Contract。

字段code类型number约束与默认值const: 200必填性必填
字段request_id类型string约束与默认值无额外约束必填性必填
字段message类型string约束与默认值const: "success"必填性必填
字段data类型object约束与默认值无额外约束必填性必填
字段page类型object约束与默认值无额外约束必填性必填
字段warnings类型array约束与默认值无额外约束必填性必填
字段meta类型object约束与默认值无额外约束必填性必填
完整响应 JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "const": 200
    },
    "request_id": {
      "type": "string"
    },
    "message": {
      "type": "string",
      "const": "success"
    },
    "data": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "caption": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "author": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "sec_uid": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unique_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avatar_url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "sec_uid",
                  "unique_id",
                  "name",
                  "avatar_url"
                ],
                "additionalProperties": false
              },
              "media": {
                "type": "object",
                "properties": {
                  "video_url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "cover_url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "duration_seconds": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "width": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "height": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "video_url",
                  "cover_url",
                  "duration_seconds",
                  "width",
                  "height"
                ],
                "additionalProperties": false
              },
              "music": {
                "type": "object",
                "properties": {
                  "id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "title": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "author": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "title",
                  "author"
                ],
                "additionalProperties": false
              },
              "metrics": {
                "type": "object",
                "properties": {
                  "likes": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "comments": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "collects": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "shares": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "plays": {
                    "type": "null"
                  }
                },
                "required": [
                  "likes",
                  "comments",
                  "collects",
                  "shares",
                  "plays"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "caption",
              "created_at",
              "author",
              "media",
              "music",
              "metrics"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "items"
      ],
      "additionalProperties": false
    },
    "page": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "next_cursor"
      ],
      "additionalProperties": false
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "listing_id": {
          "type": "string",
          "const": "douyin.videos.search"
        },
        "version": {
          "type": "string",
          "const": "v1"
        },
        "catalog_release_id": {
          "type": "string",
          "minLength": 1
        },
        "price_book_version": {
          "type": "string",
          "minLength": 1
        },
        "result_status": {
          "type": "string",
          "enum": [
            "complete",
            "empty",
            "partial"
          ]
        },
        "charged_amount": {
          "type": "string"
        },
        "balance_after": {
          "type": "string"
        },
        "currency": {
          "type": "string",
          "const": "CNY"
        }
      },
      "required": [
        "listing_id",
        "version",
        "catalog_release_id",
        "price_book_version",
        "result_status",
        "charged_amount",
        "balance_after",
        "currency"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "code",
    "request_id",
    "message",
    "data",
    "page",
    "warnings",
    "meta"
  ],
  "additionalProperties": false
}

已知限制

  • 一页典型返回约 8 个视频卡片,实际数量取决于当前公开结果。
  • 翻页必须使用本 Listing 返回的 Cursor;V1 不保证全量召回。
  • 搜索结果的播放量字段已观测为遮蔽的 0,V1 返回 null。

接入示例

REST(cURL)

curl -X POST https://api.dataxapi.com/v1/douyin/videos/search \
  -H "Authorization: Bearer $DATAXAPI_API_KEY" \
  -H "Idempotency-Key: your-stable-intent-key" \
  -H "Content-Type: application/json" \
  -d '{"query":"AI","sort":"relevance","published_within":"week","duration":"any"}'

Exact MCP Preview(Codex 配置)

[mcp_servers.dataxapi]
url = "https://api.dataxapi.com/mcp"
bearer_token_env_var = "DATAXAPI_API_KEY"

同一个 API Key 只会暴露其 Scope 内的精确 Tool。请把 Key 放在环境变量中,不要写入配置文件。需要安全重试时,请显式复用 idempotency_key。

查看客户端兼容状态 →

目录发布物: catalog-production-2026-09-17.1 · PriceBook: pricebook-production-2026-09-17.1