---
title: "TikTok Top Search API"
method: GET
path: "/v1/tiktok/top-search"
tags: ["TikTok"]
---

# TikTok Top Search API

`GET /v1/tiktok/top-search`

## Request

- Base URL: `https://api.captapi.com`
- URL: `https://api.captapi.com/v1/tiktok/top-search`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

TikTok Top/General search — videos and photo carousels when TikTok includes them, with contentType + images[].

Hits TikTok's Top/General search tab (not video-only keyword search). Results can mix videos and photo carousels: each item has mediaType (video | photo); carousels additionally carry contentType: multi_photo + images[] (contentType is omitted when it would just repeat mediaType). Hashtags come from TikTok text_extra (canonical names — no caption-regex emoji bleed) and are lowercase-deduped; mentions[{userId,secUid,username}] when present. Engagement carries per-counter *IsApproximate flags — TikTok's web search display-rounds big counters (18.0M), so each of views/likes/comments/shares/saves is flagged from its own value instead of stamped; exact counters (typical for saves/comments) read false. Supports cursor pagination via nextCursor. TikTok may return duplicate ids across pages — we drop duplicates within a page. Availability ladder: a transient native blip is retried in-request; a longer outage serves the same query's 6h last-good page labelled stale + cached at 0 credits (fetchedAt = scrape time, servedAt = handover); a first-seen query during an outage is 502 UPSTREAM_UNAVAILABLE (retryable, 0 credits). Flat 2 credits on live pages. Not yet: sort_by / publish_time / region filters (use other endpoints or ask).

Docs: https://captapi.com/apis/tiktok-top-search

## Query parameters

- `q` string, required
- `limit` integer
- `cursor` integer
- `cache` boolean

## Response `200`

Success. The data object for this endpoint.

- object
  - `success` unknown, required
  - `data` object, required
    - `query` string: The search query you sent.
    - `totalReturned` integer: Number of items returned in this response.
    - `results` object[]
      - `platform` string: Platform identifier for this response (matches the endpoint's platform).
      - `url` string: Canonical URL of the item.
      - `id` string: Id of this results item.
      - `caption` string: Post or creative caption when the platform exposes one.
      - `publishedAt` string: Publish date (ISO 8601) when the platform exposes an absolute timestamp.
      - `durationSeconds` integer: Length in seconds for this item (full media length, or a segment span when the endpoint documents a start/end).
      - `thumbnailUrl` string: Thumbnail image URL.
      - `author` object: Author name or handle.
        - `username` string
        - `displayName` string
        - `url` string: Canonical URL of the item.
        - `followers` integer
        - `verified` boolean
        - `profileImage` string
        - `id` unknown
        - `secUid` unknown
      - `engagement` object: Engagement metrics for the item.
        - `views` integer
        - `likes` integer
        - `comments` integer
        - `shares` integer
        - `saves` integer
        - `viewsIsApproximate` boolean
        - `likesIsApproximate` boolean
        - `commentsIsApproximate` boolean
        - `sharesIsApproximate` boolean
        - `savesIsApproximate` boolean
      - `hashtags` string[]: Hashtags extracted from the text.
      - `musicName` string: Name of the soundtrack used.
      - `mediaType` string: Media type label for this item (platform-specific enum).
      - `isAd` boolean: Whether the item is a paid promotion.
      - `mentions` unknown[]: Accounts mentioned in the text.
        - unknown
      - `isPaidPartnership` boolean: Is paid partnership. Example: false.
    - `hasMore` boolean: Whether more results are available beyond this page. When true, pass nextCursor to fetch the next page.
    - `nextCursor` integer: Cursor to pass for the next page of results. May be null when the platform does not expose deep pagination (e.g. some Facebook Ad Library searches).

## Other responses

- `400`: Bad request: wrong platform URL, unknown endpoint, or an invalid parameter value. Not billed.
- `401`: Missing, invalid or revoked API key. Not billed.
- `402`: Not enough credits for this request. Not billed.
- `404`: The resource does not exist or is not public. Not billed.
- `422`: A required parameter is missing or has the wrong type. Not billed.
- `429`: Rate limit reached. Wait for Retry-After seconds. Not billed.
- `502`: The platform could not be reached or returned nothing usable. Retryable, not billed. 503 and 504 use the same envelope.

---

[API](https://skmtc.dev/captapi/apis/captapi-api.md) · [All operations](https://skmtc.dev/captapi/apis/captapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/captapi/apis/captapi-api/revisions/c9b9ac5ff1bd?raw)
