GET/desearch/tiktok/trending

    Retrieve TikTok Trending Posts

    Retrieve normalized trending TikTok posts for a region where supported by the public TikTok integration. Billing metadata: successful billable responses include the `X-Desearch-Cost-Usd`, `X-Desearch-Usage-Count`, `X-Desearch-Service`, and `X-Desearch-Currency` headers. JSON object responses also include optional `cost_usd`, `usage_count`, `service`, and `currency` fields. Current prices are at https://desearch.ai/pricing. JSON arrays, text, and streaming responses keep their body shape and expose billing metadata only through headers.

    Base URL

    https://api.desearch.ai

    Implementation guidance

    Use Retrieve TikTok Trending Posts when your application needs search-grounded AI results without maintaining its own crawler, social-data pipeline, or retrieval infrastructure. Get normalized trending TikTok posts for a requested region where the public TikTok integration supports it. The optional query string region is a two-letter code, constrained to exactly two characters, and defaults to US. The other declared query control is count: an optional integer from 1 to 100, with 20 as its default maximum. Results may be fewer than the requested count. Trending declares no cursor parameter or next-cursor response header, so the pagination instructions for account and hashtag routes do not apply to this request. The HTTP 200 body can be an array of TikTokPost values or a JSON object. Some response fields have route-specific availability: trending payloads do not provide structured mentions, and their mentions array therefore contains only @handles parsed from the caption. That array is always present, becoming empty when no handles are found. Trending records also exclude the music object. Tags in hashtags can come from cha_list, text_extra, or caption #tags, and that array is empty when no tags exist. Do not confuse the requested region with a post's nullable region property: the latter describes the country where the video was posted, when TikTok shows it. A nullable pinned flag describes profile placement, with true meaning a video is pinned at its profile's top. For a photo entry reached by a /photo/ link, imageCount can report how many images it contains; videos omit that property. Nullable strings on a trending post include the caption text, the record identifiers id and providerId, its url, and createTime. The media locations thumbnailUrl and mediaUrl also allow null. Video dimensions and duration are typed as nullable integers in videoWidth, videoHeight, and videoDuration; this schema does not specify a duration unit. A nullable stats value references the counters collectCount, commentCount, shareCount, playCount, and digCount, all integer-or-null. The nullable author record uses TikTokAuthor: verified accepts boolean or null; heart, followers, and following accept integer or null; nickname, avatar, username, and id accept string or null. Billing information is separate from the requested region and result cap. On successful billable calls, X-Desearch-Cost-Usd carries the US-dollar request cost and X-Desearch-Usage-Count carries billable usage units, with X-Desearch-Service and X-Desearch-Currency identifying service and currency. Objects may contain optional cost_usd, usage_count, service, and currency metadata as well. A returned array is not wrapped for billing; its metadata is in the headers. For a particular topic, see TikTok hashtag retrieval. Other public TikTok operations appear in the TikTok API overview. The endpoint returns structured data that can be consumed by agents, research tools, dashboards, and retrieval-augmented generation workflows. Keep the request focused on the minimum fields your workflow needs so responses remain fast and easy to validate.

    Send requests to GET /desearch/tiktok/trending with your Desearch API key in the authorization header. Treat the key as a server-side secret, validate all required parameters before sending the request, and handle non-2xx responses explicitly. Production integrations should use sensible timeouts, retry only transient failures with backoff, and record the response status and request identifier for troubleshooting.

    Test the example request below before integrating it into a larger workflow. Confirm that the returned fields, links, and timestamps meet your freshness requirements, then add schema validation at the application boundary. For agentic systems, preserve source URLs with the generated answer so users can inspect evidence and your application can avoid presenting unsupported claims.

    Query Parameters

    regionstring

    Two-letter region code

    Default: US

    countinteger

    Maximum number of items to return. A page may hold fewer.

    Default: 20

    Responses

    200A list of normalized TikTok posts.
    301Moved Permanently
    304Not Modified
    401Unauthorized
    422Validation Error
    429Too Many Requests
    500Internal Server Error
    Authorization

    Your API key is sent in the Authorization header.

    Request
    curl -X GET "https://api.desearch.ai/desearch/tiktok/trending" \
      -H "Authorization: YOUR_API_KEY" \
      -H "Content-Type: application/json"
    GET /desearch/tiktok/trending
    ResponseSchema
    [
      {
        "id": "7620891413932166433",
        "providerId": "string",
        "url": "https://www.tiktok.com/@tiktok/video/7620891413932166433",
        "text": "caption text",
        "createTime": "2024-01-15T10:30:00Z",
        "author": {
          "id": "12345",
          "username": "desearch",
          "nickname": "Desearch",
          "avatar": "https://example.com/avatar.jpg",
          "verified": true,
          "following": 1200,
          "followers": 50000,
          "heart": 300000
        },
        "stats": {
          "playCount": 120000,
          "digCount": 5000,
          "commentCount": 120,
          "shareCount": 45,
          "collectCount": 10
        },
        "music": {
          "id": "67890",
          "title": "Song Name",
          "authorName": "Artist"
        },
        "hashtags": [
          "string"
        ],
        "mentions": [
          "string"
        ],
        "region": "GE",
        "pinned": true,
        "imageCount": 0,
        "videoDuration": 15000,
        "videoWidth": 1080,
        "videoHeight": 1920,
        "thumbnailUrl": "https://example.com/thumb.jpg",
        "mediaUrl": "https://example.com/video.mp4"
      }
    ]
    Status codes200301304401422429500