1. Platforms
  2. TikTok Scraper API
  3. TikTok video search API

TikTok video search API

Video search across TikTok.

GET api.socialscrape.dev/v1/tiktok/search/keyword

Cost
1 credit
Cached repeats
0 creditssend max_age_days, results kept 30 days
Failed requests
0 credits

TikTok ignores sort and date filters: sort other than relevance is refused, and date_posted drops videos older than the window from each page (pages can be short or empty; follow has_more). region is TikTok's region hint, not a proxy country. TikTok now asks for a login on keyword search: when it does, the list is the public videos under the hashtag of your query instead, which are not keyword matches, and parent is that hashtag with the explanation as its description and extra.fallback set to hashtag.

You send query.

Part of the TikTok Scraper API: 24 TikTok endpoints on one key.

Request

Send your key in the x-api-key header.

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

Parameters

NameTypeRequiredDescription
querystringyesSearch terms. Also accepted as keyword, q.
sortstringOrder of results. Changing it restarts the cursor chain. Also accepted as sort_by, sortBy, order.
date_postedstringPosted within. Also accepted as datePosted.
cursorstringOpaque cursor from the previous page; pass it back unchanged. Also accepted as continuationToken, continuation_token, next_max_id, max_id, max_cursor, min_time, after, page_token, pageToken, paginationToken, next_page_id, page.
regionstringTwo-letter country code (ISO 3166-1) for results that vary by country. Also accepted as country, geo.

Every request also accepts trim, raw and max_age_days.

Response

Sample from a recorded response, shortened. Values are examples, not your data.

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_aa89e5c529d004ce97548d55",8  "data": {9    "object": "list",10    "items": [11      {12        "object": "post",13        "platform": "tiktok",14        "id": "7701783685640604950",15        "url": "https://www.tiktok.com/@whatifshow/video/7701783685640604950",16        "type": "video",17        "author": {18          "id": "6812191996213429253",19          "handle": "whatifshow",20          "name": "WHAT IF",21          "url": "https://www.tiktok.com/@whatifshow",22          "avatar_url": "https://p19-common-sign.tiktokcdn-us.com/tos-maliva-avt-0068/677cdf3a43f86f3d59f6fefc497731f0~tplv-tiktokx-cropcenter:100:100.jpeg?dr=9640&refresh_token=245f...",23          "verified": true24        },25        "title": null,26        "text": "What Did Scientists Discover on Jupiter #whatif #spacethings #fyp #projecthailmary #planet",27        "published_at": "2026-10-28T18:14:20Z",28        "duration_seconds": 561,29        "language": "en",30        "hashtags": [31          "whatif",32          "spacethings",33          "fyp"34        ],35        "mentions": null,36        "stats": {37          "views": 496600,38          "likes": 29900,39          "comments": 358,40          "shares": 1315,41          "saves": 3953,42          "dislikes": null43        },44        "media": {45          "thumbnail_url": "https://p16-common-sign.tiktokcdn-us.com/tos-no1a-p-0037-no/oUqAkGEPvC7IjAFVpFzQIlfAA4CQgofHVMZDEM~tplv-tiktokx-origin.image?dr=9636&x-expires=1793498400&x-s...",46          "video_url": "https://v16-webapp-prime.us.tiktok.com/video/tos/no1a/tos-no1a-ve-0068-no/oIuI5wAx8AAcPYuJFMrVW4DZeQLIXEnulGfifO/?a=1988&bti=ODszNWYuMDE6&&bt=698&ft=aEeq8qT0...",47          "audio_url": null,48          "image_urls": null,49          "width": 576,50          "height": 102451        },52        "song": {53          "id": "7701783943456099094",54          "title": "original sound - WHAT IF",55          "artist": "WHAT IF",56          "url": "https://www.tiktok.com/music/original-sound-WHAT-IF-7701783943456099094"57        },58        "location": null,59        "is_pinned": null,60        "is_sponsored": false,61        "extra": {62          "author_followers": 2600000,63          "caption_languages": [64            "eng-US"65          ],66          "category_type": 116,67          "comments_disabled": false,68          "is_private": false,69          "music_is_original": true70        }71      },72      {73        "object": "post",74        "platform": "tiktok",75        "id": "7702163104536300814",76        "url": "https://www.tiktok.com/@nbcnews/video/7702163104536300814",77        "type": "video",78        "author": {79          "id": "6652774777768427525",80          "handle": "nbcnews",81          "name": "nbcnews",82          "url": "https://www.tiktok.com/@nbcnews",83          "avatar_url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/25eb446f0c8924ffab98c35960b0491e~tplv-tiktokx-cropcenter:100:100.jpeg?dr=9640&refresh_token=...",84          "verified": true85        },86        "title": null,87        "text": "NASA astronauts mark the 100th spacewalk at the International Space Station.",88        "published_at": "2026-10-29T18:46:45Z",89        "duration_seconds": 21,90        "language": "en",91        "hashtags": null,92        "mentions": null,93        "stats": {94          "views": 8419,95          "likes": 323,96          "comments": 21,97          "shares": 16,98          "saves": 20,99          "dislikes": null100        },101        "media": {102          "thumbnail_url": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-tx/o0CqCAHEVSufCSHUKgA5WQA4IAtqqsDxfSSDFC~tplv-tiktokx-origin.image?dr=9636&x-expires=1793498400&...",103          "video_url": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast5/tos-useast5-ve-0068c002-tx/oEIgjvQl4OCEXzhUUgBiyiMKSRBaJuA4AGUDl/?a=1988&bti=ODszNWYuMDE6&&bt=1173&f...",104          "audio_url": null,105          "image_urls": null,106          "width": 720,107          "height": 1280108        },109        "song": {110          "id": "7702163131555990286",111          "title": "original sound - nbcnews",112          "artist": "nbcnews",113          "url": "https://www.tiktok.com/music/original-sound-nbcnews-7702163131555990286"114        },115        "location": null,116        "is_pinned": null,117        "is_sponsored": false,118        "extra": {119          "author_followers": 12600000,120          "caption_languages": [121            "eng-US"122          ],123          "category_type": 114,124          "comments_disabled": false,125          "duet_enabled": true,126          "is_private": false127        }128      }129    ],130    "cursor": "c20",131    "has_more": true,132    "parent": null133  },134  "cursor": "c20",135  "has_more": true136}

Fields

A page of results. Each entry in items is a Post. cursor and has_more page through the rest.

A field the platform does not give is null, never made up. Extra platform details are in extra.

FieldTypeAlwaysNotes
object"post"
platformPlatformyes
idstringyes
urlstring or null
type"video" or "short" or "reel" or "image" or "carousel" or "story" or "live" or "clip" or "text" or "link" or "tweet" or "pin" or "community_post" or "episode" or "unknown"
authorAuthor or null
titlestring or null
textstring or null
published_atstring (ISO 8601 date-time) or null
duration_secondsnumber or null
languagestring or null
hashtagsstring[] or null
mentionsstring[] or null
statsStats
Show the other 6 fields
FieldTypeAlwaysNotes
mediaMedia
songSongRef or null
locationPlace or null
is_pinnedboolean or null
is_sponsoredboolean or null
extraobject or null

Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.

Questions

Which errors can it return?

invalid_params (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.

How do I get more than one page?

Send the same request with cursor set to the cursor you received, until has_more is false. Each page costs its own price. See pagination.

Is there an SDK call for it?

The Python client has client.tiktok.search_keyword(...) and the TypeScript client client.tiktok.searchKeyword(). Both return the same envelope as the HTTP API. Install them from PyPI (socialscrape-sdk) or npm (socialscrape); plain HTTP works in any language.

Can an AI agent call it?

Yes. The MCP server, which you run on your own machine, reaches every built endpoint, with the same prices.