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

TikTok user search API

TikTok user search: GET /v1/tiktok/search/users. 1 credit per request.

GET /v1/tiktok/search/users

GET /v1/tiktok/search/users

TikTok user search.

  • 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.

Every request also accepts:

  • cursor: the cursor from the previous page (Pagination).
  • 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/users" \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_c83ed80b25d3cb6833c4958f",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://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/e5143212a59c09a008bf50f487d54d1f~tplv-tiktokx-cropcenter:100:100.webp?biz_tag=tiktok_user.user_cover&dr=9640&idc=useast5&ps=13740610&refresh_token=9a678828&shcp=c1333099&shp=3...",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": 11436616,35          "views": null36        },37        "extra": {38          "sec_uid": "MS4wLjABAAAAU9BRVzC8oCaegVnia8IbqWhPb_-dbU7s00Y3wS1_Nx8g5RUaYvyXrpejgjdxTwd6",39          "verification_reason": "institution account"40        }41      },42      {43        "object": "profile",44        "platform": "tiktok",45        "id": "7064838657300251654",46        "handle": "𝑛𝑎𝑠𝑎",47        "name": "NASA_Editor",48        "headline": null,49        "url": "https://www.tiktok.com/@𝑛𝑎𝑠𝑎",50        "kind": "creator",51        "bio": "I'm Editor space 🚀😀",52        "avatar_url": "https://p19-common-sign.tiktokcdn-us.com/tos-maliva-avt-0068/8854cd9becb41a377a03e7a61f908fd8~tplv-tiktokx-cropcenter:100:100.webp?biz_tag=tiktok_user.user_cover&dr=9640&idc=useast5&ps=13740610&refresh_token=69b8a325&shcp=c1333099&shp=30310...",53        "banner_url": null,54        "verified": null,55        "is_private": null,56        "external_url": null,57        "links": null,58        "location": null,59        "category": null,60        "created_at": null,61        "stats": {62          "followers": 55,63          "following": null,64          "posts": null,65          "likes": 0,66          "views": null67        },68        "extra": {69          "sec_uid": "MS4wLjABAAAAqGlRomrFFt4-_sBFjST6nDj6DP0bbhyoiS8y2cBQczhJutoWloS-FMKKv_F9hA8F"70        }71      }72    ],73    "cursor": "c10",74    "has_more": true,75    "parent": null76  },77  "cursor": "c10",78  "has_more": true79}

Response#

A list of Profile 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.