Douyin Search Fetch Music Search

20.65 credits/call
ae_douyin_search_fetch_music_search

## Purpose Search music content on Douyin by keyword, with optional sorting and filters. This tool focuses on music results rather than general searches for videos, images, articles, or users. ## Inputs Provide a required `request_body` object. All fields inside this object are optional and have defaults: - `keyword` (string): Search phrase, such as "game background music". Default: "猫咪". - `cursor` (integer): Pagination cursor. Use `0` for the first request; use the value returned by the previous response for the next page. - `search_id` (string): Search identifier for pagination. Default: `""`; reuse the returned value for later pages. - `backtrace` (string): Pagination backtrace value. Default: `""`; reuse the returned value when available. - `sort_type` (string): `"0"` comprehensive sorting (default), `"1"` most likes, `"2"` latest publication. - `publish_time` (string): `"0"` unrestricted (default), `"1"` last day, `"7"` last week, `"180"` last half year. - `filter_duration` (string): Video-duration filter: `"0"` unrestricted (default), `"0-1"` within one minute, `"1-5"` one to five minutes, `"5-10000"` over five minutes. - `content_type` (string): `"0"` all (default), `"1"` video, `"2"` image, `"3"` article. This is a filter for the music-search operation, not a switch to a general content-search tool. For the first page, use `cursor: 0`, `search_id: ""`, and `backtrace: ""`. For later pages, reuse pagination values from the preceding response when supplied. ## Results Returns a response object with status information and a `data` payload. The documented music list (`music`) may contain music ID (`id_str`), title, author, album, duration in seconds, playback URLs (`play_url.url_list`), cover image URLs, usage count (`user_count`), originality and commercial-music flags, tags, and associated artists. Lyrics and beat-timing links may also be available. The detailed structure of `data` is not fixed by the response schema; fields and pagination information depend on the actual response. Missing optional metadata should not be interpreted as a confirmed negative. Playback links, when provided, are URLs rather than downloaded audio files.

AudioSocial
20.65 credits/call

Pricing

20.65 credits/call
ConditionCharge
Each call20.65 credits/call

20.65 credits/call Charges are per query. A successful query is billed even if it returns no results.

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYes音乐搜索请求体对象,用于通过 keyword 指定搜索关键词,通过 sort_type、publish_time、filter_duration 和 content_type 设置排序与筛选条件,并通过 cursor、search_id 和 backtrace 传递分页信息。 / Music search request body object containing keyword for the search phrase, sort_type, publish_time, filter_duration and content_type for sorting and filtering, and cursor, search_id and backtrace for pagination.—
request_body.cursorintegerNo偏移游标,用于翻页,从上一次请求返回的响应中获取 / Offset cursor for pagination, obtained from the last response0
request_body.keywordstringNo关键词 / Keyword猫咪
request_body.backtracestringNo翻页回溯标识,用于翻页,从上一次请求返回的响应中获取 / Backtrace for pagination, obtained from the last response""
request_body.search_idstringNo搜索ID,用于翻页,从上一次请求返回的响应中获取 / Search ID for pagination, obtained from the last response""
request_body.sort_typestringNo排序方式:0=综合排序 1=最多点赞 2=最新发布 / Sort type: 0=Comprehensive, 1=Most Likes, 2=Latest0
request_body.content_typestringNo内容类型:0=不限 1=视频 2=图片 3=文章 / Content type: 0=All, 1=Video, 2=Picture, 3=Article0
request_body.publish_timestringNo发布时间筛选:0=不限 1=最近一天 7=最近一周 180=最近半年 / Publish time filter: 0=Unlimited, 1=Last day, 7=Last week, 180=Last half year0
request_body.filter_durationstringNo视频时长过滤:0=不限 0-1=一分钟以内 1-5=一到五分钟 5-10000=五分钟以上 / Video duration filter: 0=Unlimited, 0-1=Within 1 minute, 1-5=1 to 5 minutes, 5-10000=More than 5 minutes0

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_douyin_search_fetch_music_search' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "backtrace": "",
      "content_type": "0",
      "cursor": 0,
      "filter_duration": "0",
      "keyword": "孤高曼波",
      "publish_time": "0",
      "search_id": "",
      "sort_type": "1"
    }
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "code": 200,
  "data": {
    "cursor": 10,
    "extra": {
      "logid": "20261116235820AD630CCA1498CDD8F5B8",
      "now": 1794844701000
    },
    "global_doodle_config": {
      "keyword": "孤高曼波"
    },
    "has_more": 1,
    "log_pb": {
      "impr_id": "20261116235820AD630CCA1498CDD8F5B8",
      "stab_extra": {
        "traffic_identification": "normal"
      }
    },
    "music": [
      {
        "audition_duration": 26,
        "author": "darkness",
        "author_deleted": false,
        "binded_challenge_id": 0,
        "can_background_play": true,
        "collect_stat": 0
      }
    ]
  },
  "docs": "https://api.tikhub.io/#/Douyin-Search-API/fetch_music_search_api_v1_douyin_search_fetch_music_search_post",
  "message": "Request successful. This request will incur a charge.",
  "message_zh": "请求成功,本次请求将被计费。",
  "request_id": "b44da545-c56d-4d11-8759-881b31c07316"
}

This example shows part of the response. Copied content is valid JSON.