Answers / TikTok

How can I search TikTok videos with an API?

Send GET /v1/tiktok/search?query=pour+over+coffee with Authorization: Bearer YOUR_API_KEY. Each video comes back with its caption, plays, likes, comments, shares, the creator and a tiktok.com link. Use the post ID with /v1/tiktok/comments to read what viewers said.

TikTok · search posts · $0.003 a call · one verified website trial · updated 2026-11-13

Run it live

Calls run only when you press Run. Opening this page does not spend credit.

Loading…

Your results will appear here. Choose a platform and action, then press Run.

Real API calls require verification for one trial, or a signed-in account with prepaid credit.

From code

curl
curl "https://posttodata.com/v1/tiktok/search?query=pour+over+coffee&limit=5" -H "Authorization: Bearer YOUR_API_KEY"
Python
import requests

r = requests.get(
    "https://posttodata.com/v1/tiktok/search",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={"query": "pour over coffee", "limit": 5},
)
for item in r.json()["data"]["items"]:
    print(item["url"], item.get("text") or item.get("title"))

From your AI

Claude and ChatGPT clients that support OAuth can sign in without pasting a key. Follow the client setup guide. The command below is the API-key option for Claude Code.

Add the MCP server once
claude mcp add --transport http posttodata https://posttodata.com/mcp --header "Authorization: Bearer YOUR_API_KEY"

Then ask

“Find the most-played TikTok videos about pour-over coffee and summarize what the top comments complain about, with links.”

The model calls search_posts with platform tiktok.

Good to know

  • TikTok calls list at $0.003 per successful call.
  • Pass page.next_cursor back as cursor for the next page.
  • TikTok has no post titles; that field is null and named in meta.unavailable.

Full reference in the docs. All TikTok endpoints are on the TikTok API page.

More answers