# TikTok search API for your agent

TikTok search API for an agent: it sends a keyword to a catalog endpoint and reads video caption, views and likes back. Several providers sell the call, so the agent tries the cheapest first. You pay per call, and a failed call costs nothing.

## What this does

TikTok search shows what is moving right now. Your agent sends a keyword and reads back the videos with captions, views, likes, comments and shares. For a content team it is a view of what a topic looks like this week. For a brand it shows who is talking about the product.

Four endpoints search videos by keyword, from three providers. They differ in the filters. One takes a sort order and a posting-date window. One takes a count and an offset and pages with a search ID. One takes a region and a publish time. One bills a flat price per request regardless of how many videos come back.

You give: a keyword. Example: home workout.

## What differs between providers

- AnyAPI (anyapi-run-tiktok-search-keyword): returns videos with caption, views, likes, comments and shares as normalized JSON, with sort and posting-date filters and a flat price per request.
- Any Site API (anysite-api-tiktok-videos-search): searches videos by keyword with a count, and bills per result.
- TikHub (tikhub-api-tiktok-web-fetch-search-video): takes a keyword, a count and an offset, and pages with a search ID.
- TikHub (tikhub-api-tiktok-app-fetch-video-search-result): takes a keyword with a region, a sort type and a publish-time filter.

## Before you start

- Set the sort. Most-liked and newest answer different questions, and the default may not be the one you need.
- Keep the search ID when you page. One provider needs it for the second page and later.
- Note the region. TikTok serves different results per market, and one endpoint takes a region parameter to set it.

## Prompt

Use looot to search TikTok for home workout and return the caption, author, views, likes, comments and shares of the top videos, sorted by views. 1. Set up https://looot.ai/skill.md. 2. Search the catalog for each step and check its price before you call. 3. Run the cheapest endpoint that fits. 4. Show the results as a table and the total cost.

## Steps and providers

- Search TikTok videos: anyapi, anysite, tikhub. 1 call per search.

## What comes back

- Video caption
- Views
- Likes and comments
- Shares
- Author

## The request and what comes back

Each run is one POST to /v1/runs with an endpoint id and an input. These are illustrative calls with generic values. The run's result holds the provider's own fields.

- AnyAPI: {"endpointId":"anyapi-run-tiktok-search-keyword","input":{"query":"home workout"},"wait":30}
- Any Site API: {"endpointId":"anysite-api-tiktok-videos-search","input":{"keyword":"home workout","count":20},"wait":30}

## What can I learn from the results?

Which hooks and formats a topic uses, how many views a typical post earns and who posts most. Your agent can rank by views and list the phrases that repeat in the captions.

## How do I search TikTok videos by keyword?

Send the keyword to a TikTok search endpoint. Your agent reads back the videos with their caption, views, likes, comments and shares.

## Can I sort by views or date?

On the providers that support it. One takes a sort and a posting-date window, and another takes a sort type and a publish-time filter.

## Can I search hashtags too?

The catalog has hashtag endpoints from the same providers. Ask your agent to search the catalog for TikTok hashtag results and show the price first.

## How do I get more than the first page?

Page with the cursor, the offset or the search ID the first call returns. Each page is billed as a call.

## How much does one search cost?

You pay per call, and the price depends on the provider your agent picks. This page reads the cheapest live price from the catalog and shows no number when the catalog is unreachable.

## Do I pay when a tiktok search call fails?

No. A call that fails at the provider costs nothing, and your agent can retry it or send it to another provider.

## Do I need an account with each tiktok search provider?

No. One looot key reaches every provider in the catalog. You top up once, and each call is billed at the price shown before it runs.

## How do I call tiktok search from code?

Send a POST to /v1/runs with the endpoint id, the input and a new idempotency key, and your looot token in the Authorization header. With wait set to 30, the answer comes back in the response when the run ends within 30 seconds. Otherwise poll GET /v1/runs/<runId>.

## Can I run tiktok search on a schedule?

That needs scheduled runs, not available yet. Run it by hand whenever you want fresh results.

## Do I pay while my agent is idle?

No. looot bills per call, and nothing runs while your agent is idle.

## Related pages

- /use-cases/find-creators-by-keyword
- /use-cases/tiktok-ads-library-api
- /use-cases/tiktok-shop-api

## Last reviewed

2026-10-04. The cost per 1,000 search runs is read live from the catalog on the web page.
