sangtao.ai
API key

Publishing

TikTok music

Trending TikTok tracks for photo posts — for musicSoundId.

GEThttps://api.sangtao.ai/v2/publishing/tiktok/music

Authorization

None — this endpoint is public, call it without an API key.

Trending tracks from TikTok's commercial music library, for TikTok photo posts (carousels). No key, no credits. Send a track's songClipId as platforms[].musicSoundId in Publish a post. Leave it out and TikTok picks the music itself; video posts and other networks ignore it.

The list is cached for 1 hour.

Query parameters

  • genrestring

    Music genre. Default POP; the valid values come back in genres

  • dateRangestring

    Trending over the last day, 7 days or 30 days. Default 7DAY

    Available options:1DAY7DAY30DAY

Response

  • genrestringrequired

    The genre of this list

  • dateRangestringrequired

    The date range of this list

    Available options:1DAY7DAY30DAY

  • tracksobject[]required

    The tracks

    Show child attributes
    • songClipIdstringrequired

      Send it as platforms[].musicSoundId in Publish a post

    • titlestring | null

      Track title

    • artiststring | null

      Artist

    • thumbnailUrlstring | null

      Cover image

    • previewUrlstring | null

      Link to a preview to listen to

    • durationSecnumber | null

      Length, in seconds

    • genresstring[]required

      Its genres

    • rankstring | null

      Its trending rank

  • genresstring[]required

    Valid values of the genre query, to build a filter

  • dateRangesstring[]required

    Valid values of the dateRange query, to build a filter

Errors

StatuserrorCodeWhen
400INVALID_GENREgenre is not one of the values in genres
400INVALID_DATE_RANGEdateRange is not 1DAY, 7DAY or 30DAY
404NO_PUBLISHING_TEAMThe system has no publishing group yet (hardly ever happens)
GET/publishing/tiktok/music
curl "https://api.sangtao.ai/v2/publishing/tiktok/music?genre=POP&dateRange=7DAY"
{
  "success": true,
  "data": {
    "genre": "POP",
    "dateRange": "7DAY",
    "tracks": [
      {
        "songClipId": "7301234567890123456",
        "title": "Song title",
        "artist": "Artist",
        "thumbnailUrl": "https://…",
        "previewUrl": "https://…",
        "durationSec": 60,
        "genres": [
          "POP"
        ],
        "rank": "1"
      }
    ],
    "genres": [
      "ROCK",
      "POP",
      "LATIN",
      "…"
    ],
    "dateRanges": [
      "1DAY",
      "7DAY",
      "30DAY"
    ]
  }
}