TikTok API

TikTok Keyword search API

Search TikTok by keyword and get matching videos with captions and engagement (views, likes, comments, shares).

$0.60/1k req, pay per request, no subscription.

What the API returnedvideos[0]
{
"id": "7268287584244124971",
"caption": "My marathon training routine 🏃",
"region": "US",
"views": 1282645,
"likes": 481608,
"comments": 187,
"shares": 2721,
"author": string,
... 17 more fields
}
Uptime
99.86%
30d · 185,547 calls
Requests
186,596
30d · weekly, last 12 wks
Response
1.9s
median · 30d

Pricing and providers

TikTok Keyword search API pricing: one API, 4 interchangeable providers

The cheapest provider serves first. If it fails, the next one takes over in the same call.

A provider marked Not serving stopped answering reliably and was taken out of the rotation, so your calls go to the others. It is put back on its own once it answers reliably again.

You pay
$6.00
$0.60/1k req, only for what you use. No monthly plan.
Your first 166 requests are free with the $0.10 starting balance.

Try it

Get TikTok keyword search in one request

requireFieldsarray
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `nextCursor`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a record that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
Open in
Get a free key
Sample response
Free runs return only the first 3 results. Fund a key to get the full response.

This sample shows 10 of 30 fields. See every field

{
  "found": true,
  "data": {
    "videos": [
      {
        "id": "7268287584244124971",
        "caption": "My marathon training routine 🏃",
        "region": "US",
        "views": 1282645,
        "likes": 481608,
        "comments": 187,
        "shares": 2721
      }
    ]
  }
}

Full parameter and response reference - every field, type, and example for this endpoint.

Reference

One request, one response shape.

Every field you send and every field you get back, each with a real example.

Last verified 2026-11-05 · uptime and latency measured over 30d

Request body

JSON, posted to this endpoint.

  • querystring

    marathon training

    The keyword to search TikTok for.

  • cursorstring

    Pagination cursor from a previous response.

  • datePostedinteger

    Time frame filter, in days back from now. Use a canonical JSON integer that is nonnegative: 0 for any time, 1 for the past 24 hours, 7 for the past week, 30 for the past month, 90 for the past three months, or 180 for the past six months. Any other number is not guaranteed to filter anything. Legacy numeric strings remain accepted.

  • requireCursorboolean

    Deprecated: name `nextCursor` in `requireFields` instead, which is the field this flag is translated into. It stays accepted so callers that already send it keep working. Sending it routes you to a source that returns a pagination cursor, which can raise your price when the cheapest source cannot page.

  • requireFieldsarray

    Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `nextCursor`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a record that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.

  • sortByenum

    Sort order: relevance, most-liked, date-posted.

You send. A small JSON body. The values shown are examples to replace with your own.

Response

JSON, one example value per field.

datadata
  • nextCursorstringcan require

    Opaque cursor for the next page of videos, or null when this lane has no more. Pass it back as cursor to continue.

each videodata.videos[]

Populated whenever the provider has data for the entity.

  • authorstring

    Username (handle) of the account that posted, without the @ prefix.

  • authorFollowersintegercan require

    The author's follower count at the time of the request. Null when the serving source does not report it.

  • authorImagestring

    Author's avatar image URL. Signed and short-lived, so the query string is load-bearing and kept intact. Populated whenever the provider has data for the entity.

  • authorNamestring

    Author's display name. Populated whenever the provider has data for the entity.

  • authorUserIdstring

    Author's numeric TikTok user id. Populated whenever the provider has data for the entity.

  • authorVerifiedbooleancan require

    Whether the author's account carries a TikTok verification badge. Null when the serving source does not report it.

  • captionstring

    My marathon training routine 🏃

    Populated whenever the provider has data for the entity.

  • commentsinteger

    187

  • createdUtcnumber

    UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds.

  • durationSecondsnumber

    Video duration in seconds.

  • hashtagsstring[]

    Hashtags carried in the caption, without the leading #. Empty when the post uses none; @-mentions are excluded. Populated whenever the provider has data for the entity.

  • idstring

    7268287584244124971

    Populated whenever the provider has data for the entity.

  • imagestring

    URL of the video's cover/thumbnail image. A signed, short-lived TikTok CDN URL (typically expires within about a day; query params are load-bearing and kept intact), often served as HEIC rather than JPEG, so fetch it promptly and transcode if you need broad browser support. Populated whenever the provider has data for the entity.

  • likesinteger

    481608

  • locationNamestringcan require

    Name of the place the video is tagged at. Absent when the video has no location tag. Null when the serving source does not report it.

  • paidPartnershipbooleancan require

    Whether the video is labeled as a paid partnership. Null when the serving source does not report it.

  • regionstring

    US

  • savesinteger
  • sharesinteger

    2721

  • soundAuthorstringcan require

    Credited author of the sound. Null when the serving source does not report it.

  • soundClipIdstring

    Id of the sound the video uses. Pass it to tiktok.song or tiktok.song_videos as clipId. Populated whenever the provider has data for the entity.

  • soundTitlestringcan require

    Name of the sound. "original sound" means the creator's own audio rather than a licensed track. Null when the serving source does not report it.

  • urlstring

    Canonical TikTok URL of the video. Populated whenever the provider has data for the entity.

  • videoUrlstring

    Playable video URL. Signed and short-lived, so the query string is load-bearing and kept intact.

  • viewsinteger

    1282645

top level
  • foundboolean

    true

  • reason"not_found"

    Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.

You get back. Named, typed fields in the same shape whichever source answers.

Selling this API? See the full schema your endpoint must return.

FAQ

About the TikTok Keyword search API

The AnyAPI TikTok Keyword search API returns TikTok keyword search data as normalized JSON from one POST call to /v1/run/tiktok.search_keyword. Search TikTok by keyword and get matching videos with captions and engagement (views, likes, comments, shares). AnyAPI routes each request across 4 sources and falls back automatically when one fails. It costs from $0.60 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 99.9% of TikTok keyword search calls through AnyAPI succeeded, with a median response time of 1.9 seconds across 185,547 measured calls.

It costs from $0.60 per 1,000 requests, in US dollars with no subscription and no monthly minimum. You fund one USD wallet and each call draws it down. Some failed wallet-funded requests incur processing charges that we pass through at cost, with no markup; the error response shows the amount charged.

Search TikTok by keyword and get matching videos with captions and engagement (views, likes, comments, shares). The response is normalized JSON with the same envelope every AnyAPI endpoint returns, so parsing a second endpoint is a change of URL and nothing else.

Over the last 30 days, 99.9% of TikTok keyword search calls through AnyAPI succeeded, with a median response time of 1.9 seconds across 185,547 measured calls. These are AnyAPI's own measurements of traffic through the gateway, recomputed continuously, not a published service-level target.

Yes. A new AnyAPI account starts with $0.10 of free balance and no card required, which covers 166 TikTok Keyword search calls at $0.0006 each.

AnyAPI asks the next of its 4 sources in the same request, cheapest first, so one source going down does not fail your call.

Send a POST request to https://api.getanyapi.com/v1/run/tiktok.search_keyword with your AnyAPI key in an "Authorization: Bearer" header and the input as a JSON body. The same key and the same wallet work on every AnyAPI endpoint.

No. You add US dollars to one prepaid AnyAPI balance and each request draws it down. There is no monthly plan and no minimum, and the same balance pays for every AnyAPI endpoint.

Yes. Install @getanyapi/sdk from npm for TypeScript or getanyapi from pip for Python. Both call every AnyAPI endpoint with the same key, and any HTTP client works too.

Yes. An agent can connect to the AnyAPI MCP server at https://api.getanyapi.com/mcp, or create its own free-trial key with one unauthenticated POST to https://api.getanyapi.com/agent/signup and call this endpoint over HTTP.