# Search TikTok: agent skill

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.

## When it starts

- find TikTok videos about home workouts
- what is trending on TikTok for this keyword
- show the top videos and their view counts

## What it asks for

- A keyword
- How many videos

## How it runs

- looot discover finds the endpoint
- looot inspect shows the price and the input schema
- looot run executes it, billed per call
- Endpoints in order: anyapi-run-tiktok-search-keyword, anysite-api-tiktok-videos-search, tikhub-api-tiktok-web-fetch-search-video, tikhub-api-tiktok-app-fetch-video-search-result

## What comes back

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

## Answer rule

List caption, author, views, likes and link, sorted by views. Say the keyword and the date of the search.

## Install

Save the skill file as /agent-skills/tiktok-search/SKILL.md, or tell your agent: set up looot, then use /agent-skills/tiktok-search/SKILL.md.

## Difficulty

easy

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