Introducing the Instagram APIRead more →

TikTok Search API. Videos matching your search.

Videos for a keyword, by country. We handle the proxies, blocks and platform changes.

TikTok Search API at a glance

Returns TikTok videos for a keyword, a page at a time, in TikTok's relevance order for a country. Each has its caption, hashtags, mentions, publish time, duration, cover, sound, engagement counts and author with the verification badge.

GET /v1/tiktok/search_posts

Read the API reference
  • 1 credit per page, $0.75–$1.97 per 1,000 pages
  • 22 typed fields null when unknown
  • 30 videos per page, TikTok's relevance order for the keyword
  • query is all it needs, e.g. cooking

Send one request. Get up to 30 videos back.

Copy the request in your language, or hand it to your agent. Sign up for an API key and your first 100 credits are free.

$ npm install socialtap
query = cooking
GET /v1/tiktok/search_postsTry in
const params = new URLSearchParams({
  query: "cooking",
});
const res = await fetch(`https://socialtap.dev/v1/tiktok/search_posts?${params}`, {
  headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, page, meta } = body;
console.log(data, meta.credits_charged);
200 OK · GET https://socialtap.dev/v1/tiktok/search_postsLong arrays and strings are shortened here. Real responses are complete.Docs

One schema on 21 platforms.

The response reference lists every field, its type and when it is null. See the full schema.

  • Null means unknown

    A field TikTok doesn't show is null, never zero or an empty string, so a real zero always means zero.

  • What it accepts

    Keywords: TikTok's videos for them, as its Discover page for the words shows them (case, a leading # or @ and punctuation ending a word are ignored).

  • Write one parser

    TikTok, Instagram, Facebook and 18 more platforms answer in these fields, so the code that reads one reads them all.

platformstring
Platform ID (tiktok, youtube, …).
idstring
Platform-native post ID (string; Instagram shortcode, Reddit with its t3_ prefix).
urlstring
Canonical post URL.
typestring
Normalized content shape. New values may be added; treat unknown values as other.
platform_typestring
The platform's own product label, lowercase (reel, short, story, live, tweet, …).
titlestring
Headline (YouTube title, Reddit title); null on caption-only platforms.
textstring
Caption, description or body as plain text.
languagestring
BCP-47 language of text, when the platform states it.

What teams build with the TikTok Search API.

  • Find videos about a topic or brand

  • Research creators in a niche

  • Compare a keyword's videos across countries

  • Build keyword datasets of TikTok videos

Good to know before you build.

  • Results are the videos on TikTok's public Discover page for the keyword, because TikTok's own search shows nothing to logged-out visitors.
  • TikTok has a Discover page for most searched words but not for all of them, popular single words included: a query without one returns an empty page with end_reason platform_limit.
  • TikTok lists a limited number of videos per keyword logged out, and a walk that reaches it ends with end_reason platform_limit.
  • TikTok rounds large view, like, comment and share counts (approximate_fields lists them). Save counts are exact.
  • Results come in TikTok's relevance order only: since and until filter that order, so a walk doesn't stop at them.
  • media[].url is null for videos, because TikTok serves video files only with its player's cookie.

1 credit per page. Failed requests are free.

Buy credits once and spend them on any endpoint, on any platform.

SourcePrice per successful pagePer 1,000 pages
Platform API api1 credit$0.75–$1.97
  • Cache hits are free.
  • Credits from packs and top-ups never expire.
  • A monthly plan's credits are spent first, and what is left of them ends at each renewal.
  • Prices exclude tax: sales tax is added at checkout where it applies.
  • Outside the US, plans and packs are sold to businesses: checkout asks for your VAT, GST or other business tax ID.

Questions about the TikTok Search API.

More in the API reference.

How much does the TikTok Search API cost?
A page of up to 30 videos costs 1 credit. Every successful page is charged, empty pages included. SocialTap credits cost $0.75–$1.97 per 1,000, depending on the plan or pack.
How do I get the next page?
Repeat the same request with cursor set to page.next_cursor from the previous response, keeping the other parameters. When page.has_more is false there are no more pages. Cursors expire after 1 hour.

Try it with your own search.

Type it in the playground, or copy the request into your code.

100free credits
  • No credit card
  • Failed requests are free
  • Works on all 218 endpoints
Start for free Read the docs