GET/desearch/tiktok/profile/{username}/posts

    Retrieve TikTok Profile Posts

    Retrieve normalized public posts for a TikTok username. 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 Profile Posts when your application needs search-grounded AI results without maintaining its own crawler, social-data pipeline, or retrieval infrastructure. Read a TikTok account's public posts by supplying its username in the path, leaving off @. This route returns normalized posts for that account; the 200 schema allows either a TikTokPost array or a JSON object. To cap the page, set the optional count query value to an integer between 1 and 100; its default is 20, and fewer posts may be returned. Start without a cursor. If the response supplies x-desearch-next-cursor, copy the complete header value into the next request's cursor, keeping this profile-posts route and the original username. A missing next-cursor header marks the last page. Pagination tokens expire after 24 hours, and a token issued for another account or route is invalid here. Invalid or expired tokens produce 422 before the search and incur no charge. Within a post, author can contain the account's username, nickname, id, and avatar as nullable strings. Its verified flag is a nullable boolean, while followers, following, and heart permit an integer or null. The post's stats can likewise be null; when populated, its integer-or-null counters are digCount, playCount, collectCount, shareCount, and commentCount. A true pinned field indicates a video fixed at the top of the profile. Photo entries identified by a /photo/ link can carry imageCount; video entries omit that image count. The response's region reports the video's posting country when TikTok exposes it. That property belongs to a returned post, and this account route declares no region query filter. Captions appear in the nullable string text. The string arrays hashtags and mentions represent tags and mentioned handles: tags can originate in cha_list, text_extra, or the caption, while mentions come from text_extra or caption @handles. Mentions are always included, with an empty array when no handle is found. A music value can hold nullable title, authorName, and id strings; the music property is omitted if TikTok provides no music object. Nullable post identifiers and links include providerId, id, and url; createTime, mediaUrl, and thumbnailUrl also allow null. The three video properties videoHeight, videoWidth, and videoDuration each accept a nullable integer. For a successful billable profile request, read cost, usage, service, and currency from X-Desearch-Cost-Usd, X-Desearch-Usage-Count, X-Desearch-Service, and X-Desearch-Currency. Optional object-body metadata uses cost_usd, usage_count, service, and currency; post arrays retain their existing shape, with billing in headers. To find posts by topic instead, open TikTok hashtag posts. Related routes are listed 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/profile/{username}/posts 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.

    Path Parameters

    usernamestringrequired

    TikTok username without @

    Query Parameters

    countinteger

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

    Default: 20

    cursorstring

    Opaque pagination cursor. Omit it for the first page. For the next page, send the `x-desearch-next-cursor` response header from the previous page back unchanged, on the same route with the same target (username, tag, post, or search query). A cursor is valid for 24 hours. Any other value, including an expired cursor or one issued by a different route or target, returns 422 and is not charged.

    Responses

    200A list of normalized TikTok posts.
    301Moved Permanently
    304Not Modified
    401Unauthorized
    422Validation Error, or the `cursor` is not one this route issued for this target, or it has expired. An invalid cursor is rejected before any search runs and is not charged.
    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/profile/tiktok/posts" \
      -H "Authorization: YOUR_API_KEY" \
      -H "Content-Type: application/json"
    GET /desearch/tiktok/profile/{username}/posts
    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