# TikTok data in Claude Code. Pay per record.

> Get TikTok data into Claude Code: one HTTPS call per operation, a free quote first, pay per record from $0.00045 per record.

Canonical: https://apiforagents.dev/integrations/claude-code/tiktok · Updated 2026-10-21

Call the TikTok API from Claude Code with one HTTPS request per operation: profiles, posts by a person, videos and search posts. Every call can be quoted free first, and you pay per record that comes back, from $0.00045 per record, from a prepaid balance with $0.10 free to start.

- Works with: Claude Code
- Operations: 8
- Price: From $0.00045 per record
- Free to start: $0.10

## Set it up in Claude Code

1. Paste the prompt below into Claude Code in your project.
2. It signs itself up with one call, reads the operation list, quotes first and writes the code that calls the API.

## Profiles

prompt:

```text
Use https://apiforagents.dev for TikTok data. Read https://apiforagents.dev/auth.md and sign yourself up with one call (new agents get $0.10 free). Read https://apiforagents.dev/platforms/tiktok.md for the operations. Call POST https://apiforagents.dev/v1/tiktok with {"op":"profiles","subjects":["@nba","@natgeo"]}, quoting first with "estimateOnly": true and telling me the price. Keep the identity_assertion so you never sign up twice.
```

## Posts by a person

prompt:

```text
Use https://apiforagents.dev for TikTok data. Read https://apiforagents.dev/auth.md and sign yourself up with one call (new agents get $0.10 free). Read https://apiforagents.dev/platforms/tiktok.md for the operations. Call POST https://apiforagents.dev/v1/tiktok with {"op":"posts","subject":"@nba","limit":20}, quoting first with "estimateOnly": true and telling me the price. Keep the identity_assertion so you never sign up twice.
```

## Videos

prompt:

```text
Use https://apiforagents.dev for TikTok data. Read https://apiforagents.dev/auth.md and sign yourself up with one call (new agents get $0.10 free). Read https://apiforagents.dev/platforms/tiktok.md for the operations. Call POST https://apiforagents.dev/v1/tiktok with {"op":"videos","subjects":["https://www.tiktok.com/@nba/video/<video-id>"]}, quoting first with "estimateOnly": true and telling me the price. Keep the identity_assertion so you never sign up twice.
```

## Search posts

prompt:

```text
Use https://apiforagents.dev for TikTok data. Read https://apiforagents.dev/auth.md and sign yourself up with one call (new agents get $0.10 free). Read https://apiforagents.dev/platforms/tiktok.md for the operations. Call POST https://apiforagents.dev/v1/tiktok with {"op":"searchPosts","hashtag":"booktok","limit":25}, quoting first with "estimateOnly": true and telling me the price. Keep the identity_assertion so you never sign up twice.
```

## TikTok operations you can call

List prices per record. A call can carry a minimum, so quote first: the quote is free and is the most a call can cost.

| Operation | Price per record |
|---|---|
| Profiles | $0.0022 |
| Posts by a person | $0.0018 |
| Videos | $0.00045 |
| Search posts | $0.0018 |
| Search | $0.00045 |
| Comments | $0.00045 |
| Followers | $0.0009 |
| Shop | $0.013 |

## Each operation in detail

- [TikTok Profile API](https://apiforagents.dev/platforms/tiktok/profile-api): inputs, fields, sample, price
- [TikTok Posts API](https://apiforagents.dev/platforms/tiktok/posts-api): inputs, fields, sample, price
- [TikTok Video API](https://apiforagents.dev/platforms/tiktok/video-api): inputs, fields, sample, price
- [TikTok Video Search API](https://apiforagents.dev/platforms/tiktok/video-search-api): inputs, fields, sample, price
- [TikTok Account Search API](https://apiforagents.dev/platforms/tiktok/account-search-api): inputs, fields, sample, price
- [TikTok Comments API](https://apiforagents.dev/platforms/tiktok/comments-api): inputs, fields, sample, price
- [TikTok Followers API](https://apiforagents.dev/platforms/tiktok/followers-api): inputs, fields, sample, price
- [TikTok Shop API](https://apiforagents.dev/platforms/tiktok/shop-api): inputs, fields, sample, price

## Questions

### Does Claude Code need an MCP server for this?

No. It makes plain HTTPS requests and writes the code that does, from the prompt alone.

### Where does the key live?

Claude Code signs the agent up itself and keeps its identity in a file you choose; add that file to .gitignore. Or make an API key in the console and put it in your environment.

### What does TikTok data cost?

Pay as you go, from $0.00045 per record at the list price. Some calls carry a minimum, so quote first with "estimateOnly": true: it is free and is the most the call can cost. Records that do not come back are refunded.

## Why API for Agents

- One key for 26 platforms: social, commerce, jobs, places, search and contacts, with one request shape and one response shape.
- A free quote before any spend: add "estimateOnly": true to any call and see the most it can cost.
- Pay per record in US dollars. No subscription, nothing expires, top-ups from $5.
- $0.10 free to try, no card. An AI agent can sign itself up in one request; a person claims it later.
- Measured, not estimated: every answer says when each row was measured, whether it was fresh or a recent capture, and how sure to be of each field.
- Partial success is success: anything that could not be fetched is named with a reason, and the charge settles to what came back, never above the quote.
- Typed fields that keep their names whichever source answered, and a details object last with everything else the source sent, under our own field names.
- Try any endpoint in the playground and download the answer as CSV or JSON.

## Start

The playground runs any endpoint by hand: pick a platform and what you want from it, fill a short form named in plain words (or press Use sample input), see the free quote on the Run button, run it, then read the answer as a table or JSON and download it as CSV or JSON. The same call is written out as cURL, Python and Node while you type. Open it at https://apiforagents.dev/dashboard/run?platform=tiktok (sign in first).

Agents register at https://apiforagents.dev/auth.md (one POST, $0.10 free). People: https://apiforagents.dev/docs#start. Prices: https://apiforagents.dev/pricing.md
