TikTok

TikTok Top Search API

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

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

Query parameters

qstring required

Search query or keywords (min 2 characters).

limitinteger

Max items to return (default 20, max 200). Flat 2 credits per call.

cursorinteger

Pagination cursor. Leave 0 for the first page; then pass nextCursor from the previous response. TikTok may return duplicates across pages.

cacheboolean

Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.

Response

Success. The data object for this endpoint.

successunknown required

Changes

No recorded changes to this operation across all 3 revisions of this API.