Douyin modelsapi generation api

douyin/search/music-search

Fetch music content search results from Douyin App. Supports filtering by keyword, sort type, etc.

Input
Idle

Example output — click Run to generate your own

API README

Fetch music search

Purpose:

  • Fetch music content search results from Douyin App.
  • Supports filtering by keyword, sort type, etc.

Notes:

  • This API focuses on music content search, excluding other types.
  • Set cursor to 0 and search_id to an empty string for the first request.
  • Response includes music basic info, artist info, covers, play URLs, tags, etc.

Parameters:

  • keyword: Search keyword, e.g., "game background music"
  • cursor: Pagination cursor (0 for first request)
  • sort_type: Sorting method
    • 0: Comprehensive
    • 1: Most likes
    • 2: Latest
  • publish_time: Publish time filter
    • 0: Unlimited
    • 1: Last day
    • 7: Last week
    • 180: Last half year
  • filter_duration: Video duration filter
    • 0: Unlimited
    • 0-1: Under 1 minute
    • 1-5: 1 to 5 minutes
    • 5-10000: Over 5 minutes
  • content_type: Content type filter
    • 0: Unlimited
    • 1: Video
    • 2: Image
    • 3: Article
  • search_id: Search ID for pagination

Request Body Example:

payload = {
    "keyword": "game background music",
    "cursor": 0,
    "sort_type": "0",
    "publish_time": "0",
    "filter_duration": "0",
    "content_type": "0",
    "search_id": ""
}

Response (common fields, actual response may contain more fields):

  • music: List of music search results
    • id_str: Music ID (as string)
    • title: Music title
    • author: Music author's nickname
    • album: Album name (if any)
    • play_url.url_list: List of music play URLs
    • duration: Duration in seconds
    • cover_thumb.url_list: List of thumbnail cover URLs
    • cover_medium.url_list: List of medium-sized cover URLs
    • cover_large.url_list: List of large-sized cover URLs
    • user_count: Number of videos using this music
    • is_original: Whether it is original music
    • is_commerce_music: Whether it is commercial music
    • lyric_url: Lyrics file URL (if available)
    • strong_beat_url.url_list: Beat timing file URLs
    • tags: Music tags
      • Themes (e.g., Game, Vlog), Moods (e.g., Funny), Genres (e.g., 8-bit, Electronic)
    • artists: List of associated artists (if any)
      • artist_name: Artist name
      • uid: Artist UID
    • cover_color_hsv: Dominant HSV color of the cover
    • can_background_play: Whether background playback is supported

Imported from a validated TikHub OpenAPI document. Pricing must be reviewed before enabling.

Related Models

douyin/search/challenge-search-v1Fetch hashtag/challenge search results from Douyin App. Returns related hashtag topics including name, view count, participants, and cover images.douyin/search/challenge-search-v2Fetch hashtag/challenge search results from Douyin App using V2 API. Supports searching by keyword and returns detailed challenge information, including name, cover image, view count, and participant count.douyin/search/challenge-suggestFetch hashtag/challenge suggestions from Douyin App based on the input keyword. Returns a list of related hashtags including name and view count.douyin/search/discuss-searchFetch discussion/Q&A search results from Douyin App. Supports filtering by keyword, sort type, publish time, content type, etc.douyin/search/experience-searchFetch experience (knowledge/tutorial) content search results from Douyin App. Retrieves video results related to knowledge sharing, tutorials, or tips based on the input keyword.douyin/search/general-search-v1Fetch search results from Douyin App's general search tab (not standalone video search). Supports filtering by keyword, sort type, publish time, video duration, and content type. Supports pagination through `cursor`, `search_id`, and `backtrace`.douyin/search/general-search-v2Fetch search results from Douyin App's general search tab (not standalone video search). This API may be less stable than V1, serving as a backup. Supports filtering by keyword, sort type, publish time, video duration, and content type. Supports pagination through `cursor`, `search_id`, and `backtrace`.douyin/search/image-searchFetch image-based search results from Douyin App. Mainly returns posts containing image collections.