社媒数据助手 社媒数据助手 免费登录
SocialDataX API

搜索抖音作品

按关键词搜索抖音作品,查看请求参数、作品列表返回字段、分页方式和在线调用示例。

搜索抖音作品

按关键词和筛选条件搜索公开抖音作品,返回视频或图文作品摘要和下一页分页令牌。

POST /socialdatax/api/v1/douyin/video/search

1 积分 = 0.01 元;成功调用扣减 10 积分,失败不扣费。

请求参数

  • keyword(必填):搜索关键词。
  • page_token:分页令牌。首次请求留空;继续翻页时使用上一次返回的 next_page_token。只能用于同一搜索链路,不能跨能力、关键词或筛选条件复用。
  • sort_type:搜索排序方式,可选:general(综合,默认)、time_descending(最新发布优先)、like_count_descending(最多点赞优先)。综合或默认排序请传 general,最新发布请传 time_descending,最多点赞请传 like_count_descending。hot、latest、time、relevance、relevance_desc、default、综合、general_desc、liked、like_count、liked_desc、most_liked、most_hot、popularity_descending 等写法均不是可接受值,请直接使用上述三个标准值。
  • publish_time_range:发布时间范围筛选。
  • duration_range:视频时长筛选。
  • content_type:内容形式筛选。

请求示例

{
  "keyword": "露营",
  "page_token": "",
  "sort_type": "general",
  "publish_time_range": "all",
  "duration_range": "all",
  "content_type": "all"
}

返回字段

  • items:当前页搜索结果中的作品列表
  • next_page_token:下一页分页令牌;为空表示没有更多结果。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回。只能用于同一搜索链路,不能跨能力、关键词或筛选条件复用。
  • points:本次成功调用的积分消耗与调用完成时的账户积分余额。

响应示例(仅说明结构)

{
  "items": [
    {
      "aweme_id": "7648208200076573925",
      "content_type": "video",
      "description": "我的露营入坑全过程 从露营小白到装备齐全,坑越来越大。你们是不是也正在入坑?\n#露营\n#露营装备 \n#露营入坑 \n#户外露营\n#露营报告",
      "publish_time": 1780737239,
      "cover_image_url": "https://example.invalid/cover.webp",
      "images": [],
      "video": {
        "play_url": "https://example.invalid/douyin-video.mp4",
        "duration_ms": 289334,
        "width": 1080,
        "height": 1920,
        "media_type": "video"
      },
      "share_url": "https://www.douyin.com/video/7648208200076573925",
      "topic_tags": [
        {
          "name": "露营",
          "id": "1580532647418893"
        },
        {
          "name": "露营装备",
          "id": "1629063161894920"
        },
        {
          "name": "露营入坑",
          "id": "1725909323877464"
        },
        {
          "name": "户外露营",
          "id": "1601409194763277"
        },
        {
          "name": "露营报告",
          "id": "1706866801920072"
        }
      ],
      "author": {
        "user_id": "1234567890",
        "sec_user_id": "MS4wLjABAAAAVbcQXT1UykaJ9ceFzkeTICuowUGwD57JWzQTd5UjN2A",
        "name": "社媒研究员",
        "avatar_url": "https://example.invalid/avatar.webp",
        "profile_url": "https://www.douyin.com/user/MS4wLjABAAAAVbcQXT1UykaJ9ceFzkeTICuowUGwD57JWzQTd5UjN2A",
        "bio": "记录内容趋势和创作者案例。",
        "verification_label": "",
        "verified": false,
        "follower_count": 12000,
        "following_count": 80,
        "received_like_count": 300000
      },
      "like_count": 51740,
      "comment_count": 6089,
      "collect_count": 5483,
      "share_count": 75290
    }
  ],
  "next_page_token": "",
  "points": {
    "cost": 10,
    "balance": 990
  }
}

请求 Schema

{
  "additionalProperties": false,
  "properties": {
    "keyword": {
      "title": "Keyword",
      "type": "string",
      "description": "搜索关键词。"
    },
    "page_token": {
      "default": "",
      "title": "Page Token",
      "type": "string",
      "description": "分页令牌。首次请求留空;继续翻页时使用上一次返回的 next_page_token。只能用于同一搜索链路,不能跨能力、关键词或筛选条件复用。"
    },
    "sort_type": {
      "default": "general",
      "description": "搜索排序方式,可选:general(综合,默认)、time_descending(最新发布优先)、like_count_descending(最多点赞优先)。综合或默认排序请传 general,最新发布请传 time_descending,最多点赞请传 like_count_descending。hot、latest、time、relevance、relevance_desc、default、综合、general_desc、liked、like_count、liked_desc、most_liked、most_hot、popularity_descending 等写法均不是可接受值,请直接使用上述三个标准值。",
      "enum": [
        "general",
        "time_descending",
        "like_count_descending"
      ],
      "title": "Sort Type",
      "type": "string",
      "x-socialdatax-enum-labels": {
        "general": "综合",
        "time_descending": "最新发布优先",
        "like_count_descending": "最多点赞优先"
      }
    },
    "publish_time_range": {
      "default": "all",
      "enum": [
        "all",
        "day",
        "week",
        "half_year"
      ],
      "title": "Publish Time Range",
      "type": "string",
      "description": "发布时间范围筛选。",
      "x-socialdatax-enum-labels": {
        "all": "不限",
        "day": "一天内",
        "week": "一周内",
        "half_year": "半年内"
      }
    },
    "duration_range": {
      "default": "all",
      "enum": [
        "all",
        "under_1_minute",
        "one_to_five_minutes",
        "over_5_minutes"
      ],
      "title": "Duration Range",
      "type": "string",
      "description": "视频时长筛选。",
      "x-socialdatax-enum-labels": {
        "all": "不限",
        "under_1_minute": "1 分钟以下",
        "one_to_five_minutes": "1-5 分钟",
        "over_5_minutes": "5 分钟以上"
      }
    },
    "content_type": {
      "default": "all",
      "enum": [
        "all",
        "video",
        "image"
      ],
      "title": "Content Type",
      "type": "string",
      "description": "内容形式筛选。",
      "x-socialdatax-enum-labels": {
        "all": "不限",
        "video": "视频",
        "image": "图文"
      }
    }
  },
  "required": [
    "keyword"
  ],
  "title": "PublicSearchVideosRequest",
  "type": "object"
}

响应 Schema

{
  "$defs": {
    "DouyinDetailImageData": {
      "properties": {
        "url": {
          "description": "图片展示资源链接;用于查看或分析图片内容",
          "title": "Url",
          "type": "string"
        },
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "图片宽度,像素;当前不可用时为 null",
          "title": "Width"
        },
        "height": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "图片高度,像素;当前不可用时为 null",
          "title": "Height"
        },
        "live_photo": {
          "anyOf": [
            {
              "$ref": "#/$defs/DouyinDetailLivePhotoData"
            },
            {
              "type": "null"
            }
          ],
          "description": "图片动效视频资源;普通静态图片为 null,不表示作品主视频或背景音乐"
        }
      },
      "required": [
        "url",
        "width",
        "height",
        "live_photo"
      ],
      "title": "DouyinDetailImageData",
      "type": "object"
    },
    "DouyinDetailLivePhotoData": {
      "properties": {
        "play_url": {
          "description": "图片动效视频资源链接;用于还原图文作品中单张图片的动态效果,通常为 mp4",
          "title": "Play Url",
          "type": "string"
        },
        "duration_ms": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "图片动效视频资源时长,毫秒;当前不可用时为 null",
          "title": "Duration Ms"
        },
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "图片动效视频资源宽度,像素;当前不可用时为 null",
          "title": "Width"
        },
        "height": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "图片动效视频资源高度,像素;当前不可用时为 null",
          "title": "Height"
        },
        "format": {
          "description": "图片动效视频资源格式,例如 mp4",
          "title": "Format",
          "type": "string"
        }
      },
      "required": [
        "play_url",
        "duration_ms",
        "width",
        "height",
        "format"
      ],
      "title": "DouyinDetailLivePhotoData",
      "type": "object"
    },
    "DouyinDetailVideoData": {
      "properties": {
        "play_url": {
          "description": "抖音平台播放器资源链接;视频作品通常为 mp4,图文作品可能为音频播放资源;不同于作品页面或分享链接,不用于查询作品详情或评论",
          "title": "Play Url",
          "type": "string"
        },
        "duration_ms": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "播放器资源时长,毫秒;当前不可用时为 null",
          "title": "Duration Ms"
        },
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "播放器资源宽度,像素;当前不可用时为 null",
          "title": "Width"
        },
        "height": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "播放器资源高度,像素;当前不可用时为 null",
          "title": "Height"
        },
        "media_type": {
          "description": "播放器资源类型:video 表示视频,audio 表示音频,unknown 表示未知",
          "enum": [
            "video",
            "audio",
            "unknown"
          ],
          "title": "Media Type",
          "type": "string",
          "x-socialdatax-enum-labels": {
            "video": "视频",
            "audio": "音频",
            "unknown": "未知"
          }
        }
      },
      "required": [
        "play_url",
        "duration_ms",
        "width",
        "height",
        "media_type"
      ],
      "title": "DouyinDetailVideoData",
      "type": "object"
    },
    "DouyinSearchItemData": {
      "properties": {
        "aweme_id": {
          "description": "作品 aweme_id",
          "title": "Aweme Id",
          "type": "string"
        },
        "content_type": {
          "description": "作品类型:video 表示视频,image 表示图文",
          "enum": [
            "video",
            "image"
          ],
          "title": "Content Type",
          "type": "string",
          "x-socialdatax-enum-labels": {
            "video": "视频",
            "image": "图文"
          }
        },
        "description": {
          "description": "作品文案",
          "title": "Description",
          "type": "string"
        },
        "publish_time": {
          "description": "作品发布时间,秒级 Unix 时间戳",
          "title": "Publish Time",
          "type": "integer"
        },
        "cover_image_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "封面图链接;当前不可用时为 null",
          "title": "Cover Image Url"
        },
        "images": {
          "description": "图文图片资源列表;图文作品按顺序返回所有图片,视频作品为空数组",
          "items": {
            "$ref": "#/$defs/DouyinDetailImageData"
          },
          "title": "Images",
          "type": "array"
        },
        "video": {
          "anyOf": [
            {
              "$ref": "#/$defs/DouyinDetailVideoData"
            },
            {
              "type": "null"
            }
          ],
          "description": "作品播放器资源;视频作品通常为视频,图文作品可能为音频播放资源"
        },
        "share_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "作品页面或分享链接;可继续按 url 查询作品详情或评论;当前不可用时为 null",
          "title": "Share Url"
        },
        "topic_tags": {
          "description": "作品话题标签列表;无话题标签时为空数组",
          "items": {
            "$ref": "#/$defs/DouyinTopicTagData"
          },
          "title": "Topic Tags",
          "type": "array"
        },
        "author": {
          "$ref": "#/$defs/DouyinUserSummaryData",
          "description": "作品作者信息"
        },
        "like_count": {
          "description": "点赞数",
          "title": "Like Count",
          "type": "integer"
        },
        "comment_count": {
          "description": "评论数",
          "title": "Comment Count",
          "type": "integer"
        },
        "collect_count": {
          "description": "收藏数",
          "title": "Collect Count",
          "type": "integer"
        },
        "share_count": {
          "description": "分享数",
          "title": "Share Count",
          "type": "integer"
        }
      },
      "required": [
        "aweme_id",
        "content_type",
        "description",
        "publish_time",
        "cover_image_url",
        "images",
        "video",
        "share_url",
        "topic_tags",
        "author",
        "like_count",
        "comment_count",
        "collect_count",
        "share_count"
      ],
      "title": "DouyinSearchItemData",
      "type": "object"
    },
    "DouyinTopicTagData": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "description": "话题标签名称",
          "title": "Name",
          "type": "string"
        },
        "id": {
          "description": "话题标签 ID;当前不可用时为空字符串",
          "title": "Id",
          "type": "string"
        }
      },
      "required": [
        "name",
        "id"
      ],
      "title": "DouyinTopicTagData",
      "type": "object"
    },
    "DouyinUserSummaryData": {
      "properties": {
        "user_id": {
          "description": "用户 user_id;当前不可用时为空字符串",
          "title": "User Id",
          "type": "string"
        },
        "sec_user_id": {
          "description": "用户 sec_user_id;当前不可用时为空字符串",
          "title": "Sec User Id",
          "type": "string"
        },
        "name": {
          "description": "用户昵称",
          "title": "Name",
          "type": "string"
        },
        "avatar_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "用户头像链接;当前不可用时为 null",
          "title": "Avatar Url"
        },
        "profile_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "用户主页链接;当前不可用时为 null",
          "title": "Profile Url"
        },
        "bio": {
          "description": "用户简介;当前不可用时为空字符串",
          "title": "Bio",
          "type": "string"
        },
        "verification_label": {
          "description": "用户认证文案;当前不可用时为空字符串",
          "title": "Verification Label",
          "type": "string"
        },
        "verified": {
          "description": "用户是否为认证账号",
          "title": "Verified",
          "type": "boolean"
        },
        "follower_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "平台展示的粉丝数;当前不可用时为 null",
          "title": "Follower Count"
        },
        "following_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "关注数;当前不可用时为 null",
          "title": "Following Count"
        },
        "received_like_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "用户内容累计收到的点赞数;当前不可用时为 null",
          "title": "Received Like Count"
        }
      },
      "required": [
        "user_id",
        "sec_user_id",
        "name",
        "avatar_url",
        "profile_url",
        "bio",
        "verification_label",
        "verified",
        "follower_count",
        "following_count",
        "received_like_count"
      ],
      "title": "DouyinUserSummaryData",
      "type": "object"
    }
  },
  "properties": {
    "items": {
      "description": "当前页搜索结果中的作品列表",
      "items": {
        "$ref": "#/$defs/DouyinSearchItemData"
      },
      "title": "Items",
      "type": "array"
    },
    "next_page_token": {
      "description": "下一页分页令牌;为空表示没有更多结果。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回。只能用于同一搜索链路,不能跨能力、关键词或筛选条件复用。",
      "title": "Next Page Token",
      "type": "string"
    },
    "points": {
      "type": "object",
      "description": "本次成功调用的积分消耗与调用完成时的账户积分余额。",
      "properties": {
        "cost": {
          "type": "integer",
          "description": "本次请求最终确认消耗的积分。",
          "minimum": 0
        },
        "balance": {
          "type": "integer",
          "description": "本次接口完成时看到的当前积分余额。",
          "minimum": 0
        }
      },
      "required": [
        "cost",
        "balance"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "items",
    "next_page_token",
    "points"
  ],
  "title": "DouyinSearchResult",
  "type": "object"
}

鉴权与在线测试

业务 API 使用 API Key 鉴权。公开文档无需登录;在线测试可手动输入 API Key,登录后也可选择账户已有 Key。手动输入的 Key 仅在当前页面使用,curl 示例始终引用 SOCIALDATAX_API_KEY 环境变量。

机器可读入口

开发工具和 AI 可以通过以下公共入口读取最新文档,接口数据由后端统一生成。

公共 API Catalog

结构化接口目录、参数、响应字段、计费与平台能力。

https://mcp.socialdatax.com/socialdatax/api/v1/docs/catalog

OpenAPI JSON

用于代码生成、API 客户端和支持 OpenAPI 的开发工具。

https://mcp.socialdatax.com/socialdatax/api/v1/docs/openapi.json

Docs MCP

让支持 MCP 的 AI 工具直接检索 SocialDataX API 文档。

https://mcp.socialdatax.com/docs/mcp

Docs MCP Server Card

Docs MCP 的机器可读服务描述和能力入口。

https://mcp.socialdatax.com/.well-known/mcp/docs-server-card.json