TikTok top search API
  1. Docs
  2. TikTok
  3. TikTok top search API

TikTok top search API

TikTok's 'Top' tab: videos, photo carousels and a card of matching accounts (keyword search returns videos only).

GET /v1/tiktok/search/top

GET /v1/tiktok/search/top

TikTok's 'Top' tab: videos, photo carousels and a card of matching accounts (keyword search returns videos only). Same filter limits as keyword search: relevance order only; publish_time drops older items from each page. While TikTok asks for a login on search, the list is the public videos under the hashtag of your query (no accounts card), and parent is that hashtag with the explanation as its description and extra.fallback set to hashtag.

  • Cost: 1 credit
  • Cache: Results are kept up to 30 days; send max_age_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
querystringyesSearch terms. Also accepted as keyword, q.
publish_timestringnoPosted within. One of any, day, week, month, three_months, six_months. Also accepted values: yesterday for day, this-week for week, this-month for month, last-3-months for three_months, last-6-months for six_months, all-time for any.
sortstringnoOrder of results. Changing it restarts the cursor chain. One of relevance, likes, latest. Default relevance. Also accepted as sort_by, sortBy, order. Also accepted values: most-liked for likes, date-posted for latest.

Every request also accepts:

  • cursor: the cursor from the previous page (Pagination).
  • region: two-letter country code for results that vary by country. Changing it restarts the cursor chain.
  • trim: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).

Example request#

Set your key in the environment first (see Authentication).

1curl -G "https://api.socialscrape.dev/v1/tiktok/search/top" \2  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3  --data-urlencode "query=nasa"

Example response#

This is a sample from a recorded response, lists and long text are shortened. Status 200.

200 OKSample response
1{2  "ok": true,3  "credits_charged": 1,4  "credits_remaining": 4999,5  "cached": false,6  "cached_at": null,7  "request_id": "req_2e82adf0c17efa40fa196909",8  "data": {9    "object": "list",10    "items": [11      {12        "object": "profile",13        "platform": "tiktok",14        "id": "7664638705177150477",15        "handle": "nasa",16        "name": "NASA",17        "headline": null,18        "url": "https://www.tiktok.com/@nasa",19        "kind": "creator",20        "bio": "Making the seemingly impossible, possible.✨",21        "avatar_url": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/e5143212a59c09a008bf50f487d54d1f~tplv-tiktokx-cropcenter:100:100.webp?dr=9640&refresh_token=b012eef3&x-expires=1793412000&x-signature=2VwATs9CMRe7debIQD7k65EOglU%3D&t=4d5b0474...",22        "banner_url": null,23        "verified": true,24        "is_private": null,25        "external_url": null,26        "links": null,27        "location": null,28        "category": null,29        "created_at": null,30        "stats": {31          "followers": 2100000,32          "following": null,33          "posts": null,34          "likes": 11436619,35          "views": null36        },37        "extra": {38          "sec_uid": "MS4wLjABAAAAU9BRVzC8oCaegVnia8IbqWhPb_-dbU7s00Y3wS1_Nx8g5RUaYvyXrpejgjdxTwd6",39          "verification_reason": "institution account"40        }41      },42      {43        "object": "post",44        "platform": "tiktok",45        "id": "7702253392705441054",46        "url": "https://www.tiktok.com/@iknowtaz/video/7702253392705441054",47        "type": "video",48        "author": {49          "id": "7679888811509498894",50          "handle": "iknowtaz",51          "name": "Evil Susan Dell",52          "url": "https://www.tiktok.com/@iknowtaz",53          "avatar_url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/4eeea2047866d1ebcaaafc1bf6a07ec3~tplv-tiktokx-cropcenter:100:100.jpeg?dr=9640&refresh_token=194894aa&x-expires=1793498400&x-signature=gLIx6aEll2Cm9%2FAxXH4qH85OSiE%3D&t=4d5b0...",54          "verified": false55        },56        "title": null,57        "text": "EXPOSING UNSEEN ALIEN FOOTAGE AT 10K👀 #alien #whitehouse",58        "published_at": "2026-10-30T00:37:09Z",59        "duration_seconds": 11.0,60        "language": "en",61        "hashtags": [62          "alien",63          "whitehouse"64        ],65        "mentions": null,66        "stats": {67          "views": 626,68          "likes": 34,69          "comments": 3,70          "shares": 0,71          "saves": 6,72          "dislikes": null73        },74        "media": {75          "thumbnail_url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/o8VfQjrIADEiAARMA5gCfFr8WIqVYQGnjexojF~tplv-tiktokx-origin.image?dr=9636&x-expires=1793498400&x-signature=8uvJI9H3MSHkNBmTuJcAM24szX0%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shc...",76          "video_url": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast8/tos-useast8-pve-0068-tx2/oAG54gCAVbIgErojC8FEAWDYIxAjF8fIQnfAqe/?a=1988&bti=ODszNWYuMDE6&&bt=1025&ft=4KJMyMzm8Zmo09SSla4jV2sedpWrKsd.&mime_type=video_mp4&rc=PDU5ZDdmNDZkPGk4OjpkNkBpM2...",77          "audio_url": null,78          "image_urls": null,79          "width": 720,80          "height": 128081        },82        "song": {83          "id": "7681390189306006303",84          "title": "original sound",85          "artist": "Capone",86          "url": "https://www.tiktok.com/music/original-sound-7681390189306006303"87        },88        "location": null,89        "is_pinned": null,90        "is_sponsored": false,91        "extra": {92          "author_followers": 6667,93          "caption_languages": [94            "eng-US"95          ],96          "category_type": 120,97          "comments_disabled": false,98          "duet_enabled": true,99          "is_private": false,100          "music_is_original": true,101          "reposts": 0,102          "stitch_enabled": true,103          "video_definition": "720p"104        }105      }106    ],107    "cursor": "c20",108    "has_more": true,109    "parent": null110  },111  "cursor": "c20",112  "has_more": true113}

Response#

A list of Post or Profile or Collection or Community objects in data.items, with data.cursor and data.has_more.

See Data models for every field. The envelope around data is described in Responses.

Errors#

Failures are free: credits_charged is 0. Branch on error.code, never on the message.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
not_found404noThe platform says this profile, post or item does not exist.

Every request can also fail with the account and platform errors listed on the Errors page.