Skip to main content
skill CX Codex

tiktok-api — Claude Code skill for TikTok data

Query TikTok posts, profiles, hashtags, sounds, and comment threads through fetcher.sh. Use it to gather content data without browser scraping.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add fetcher-sh/fetcher-skills --skill tiktok-api -a claude-code
Open on GitHub

What tiktok-api does

The skill gives an agent access to TikTok data through HTTP GET endpoints. It can search posts by keyword with sorting and date filters, resolve a post from its share URL or ID, and retrieve a profile’s posts, followers, or followings. Hashtag, sound, and location feeds are available too, along with comments and replies.

Requests use either a Bearer key backed by prepaid credits or x402 payments in USDC. Each call costs $0.004, and the MCP server can search endpoints or fetch data. Without a key, you’ll need to set up x402 payments; otherwise data requests won’t go through. The service does not require TikTok login or browser automation.

What it helps with

  • find posts by keyword and date range
  • retrieve a profile’s posts and followers
  • collect posts linked to a hashtag or sound
  • read a post’s comments and replies
  • track posts tagged at a location

Example prompts for the agent

  • Find TikTok posts about ai agent and sort them by likes for this month.
  • Look up @khaby.lame and get the profile’s posts.
  • Fetch posts for the fyp hashtag, then read comments on a post.

How to install tiktok-api

1Skills CLI (Vercel)

npx skills add fetcher-sh/fetcher-skills --skill tiktok-api -a claude-code

2Manually: put the files in place

~/.claude/skills/tiktok-api/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/tiktok-api/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about tiktok-api

How do I install tiktok-api in Claude Code?

Run npx skills add fetcher-sh/fetcher-skills --skill tiktok-api -a claude-code. The skill file is at ~/.claude/skills/tiktok-api/SKILL.md.

What does tiktok-api do?

It lets an agent query TikTok for posts, profile details, hashtag feeds, and comment threads.

What do I need to make requests with tiktok-api?

Use a Bearer key with prepaid credits, or pay through x402 in USDC. Each call costs $0.004.

Source text

SKILL.md · MIT
---
name: tiktok-api
description: >-
  A TikTok API alternative on fetcher.sh — pay-per-call in USDC via x402, or
  prepaid credits with a Bearer key, no login and no app review. Use when the
  user wants to search TikTok posts by keyword and sort by most-liked or most
  recent within a date range, look up a post by its share URL or ID, scrape a
  TikTok profile by @username, pull a user's posts, followers, or followings,
  fetch a hashtag's posts, pull posts using a specific sound/music track, get
  posts from a location, or read a post's comments and comment replies. Also
  covers TikTok trend tracking, hashtag monitoring, influencer discovery,
  competitor content analysis, and TikTok data pipelines without official
  TikTok API access or a scraping browser.
keywords:
  - tiktok
  - tiktok-api
  - tiktok-api-alternative
  - tiktok-data
  - social-media
  - social-listening
  - hashtag-tracking
  - x402
  - ai-agent
---

# TikTok API

TikTok data on demand: keyword post search with sort/date filters, profile
lookup by handle, followers and followings, hashtag and music/sound feeds,
location-based posts, and comment threads — one plain HTTP GET per call, paid
as you go. No login, no session cookies, no browser automation, no TikTok
developer app review.

Base URL: `https://tiktok.fetcher.sh`

## Quick reference

| | |
| --- | --- |
| Base URL | `https://tiktok.fetcher.sh` |
| Auth | `Authorization: Bearer bby_live_...` or x402 (USDC) |
| Price | $0.004/call (flat) |
| Endpoints | 13, all `GET` |
| MCP | `https://tiktok.fetcher.sh/mcp` |
| Machine-readable | `/openapi.json` · `/llms.txt` · `/skill.md` |

## Which endpoint do I need?

| I want to... | Call |
| --- | --- |
| Search posts by keyword (optionally most-liked/recent) | `GET /api/post/search` |
| Look up a post by its share URL | `GET /api/post?url=...` |
| Look up a profile by @username | `GET /api/user/handle/{username}` |
| Get a user's posts, followers, or followings | `GET /api/user/{id}/posts` / `/followers` / `/followings` |
| Get a post's comments | `GET /api/post/{id}/comments` |
| Find posts under a hashtag | `GET /api/hashtag/{id}/posts` |
| Find posts using a specific sound | `GET /api/music/{id}/posts` |

Full param details for every row: [`references/endpoints.md`](references/endpoints.md).

## Authentication

Two ways to pay, same data — full mechanics in the [`fetcher`
skill](../fetcher/SKILL.md):

```bash
# 1. Prepaid credits (recommended — get a key at https://fetcher.sh/topup
#    or via POST /api/credits/topup, see the fetcher skill)
export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://tiktok.fetcher.sh/api/post/search?keyword=hello"

# 2. x402 pay-per-call — omit the header; a GET with no payment returns 402
#    with machine-readable payment requirements (USDC on Base, Polygon,
#    Arbitrum, Monad, or Solana). @x402/fetch signs and retries automatically.
```

Every response is `{ "status": number, "message": string, "data": ... }`; the
HTTP status mirrors `status`.

## Endpoints (13 — all GET, $0.004/call)

| Endpoint | What it returns |
| --- | --- |
| `/api/post/search` | Posts matching a keyword; sort and date-range filters |
| `/api/post` | A single post resolved from its share URL |
| `/api/post/{id}` | A single post by ID |
| `/api/post/{id}/comments` | A post's comments |
| `/api/post/{id}/comments/{commentId}/replies` | Replies to a comment |
| `/api/user/handle/{username}` | Profile by @username |
| `/api/user/{id}/posts` | A user's posts |
| `/api/user/{id}/followers` | A user's followers |
| `/api/user/{id}/followings` | Accounts a user follows |
| `/api/hashtag/handle/{name}` | Hashtag metadata by name |
| `/api/hashtag/{id}/posts` | Posts under a hashtag |
| `/api/music/{id}/posts` | Posts using a sound/music track |
| `/api/location/{locationId}/posts` | Posts tagged at a location |

`{id}` / `{username}` / `{name}` are path parameters. Optional query params
(`cursor`, `region`) paginate or geo-scope results; `keyword` (search) and
`url` (post lookup) are required where they appear.

## Scenarios

**Most liked posts this month:**

```bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  --data-urlencode "keyword=ai agent" -G \
  --data-urlencode "sortType=MOST_LIKED" \
  --data-urlencode "dateRange=THIS_MONTH" \
  "https://tiktok.fetcher.sh/api/post/search"
```

**Posted yesterday, most recent first:**

```bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  --data-urlencode "keyword=crypto payments" -G \
  --data-urlencode "sortType=DATE_POSTED" \
  --data-urlencode "dateRange=YESTERDAY" \
  "https://tiktok.fetcher.sh/api/post/search"
```

Other `sortType` values: `RELEVANCE`. Other `dateRange` values: `ALL_TIME`,
`THIS_WEEK`, `LAST_THREE_MONTHS`, `LAST_SIX_MONTHS`.

**Look up a post by its share URL, or directly by ID:**

```bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" -G \
  --data-urlencode "url=https://www.tiktok.com/@username/video/1234567890123456789" \
  "https://tiktok.fetcher.sh/api/post"

curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://tiktok.fetcher.sh/api/post/1234567890123456789"
```

**A post's comments and comment replies:**

```bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://tiktok.fetcher.sh/api/post/1234567890123456789/comments"

curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://tiktok.fetcher.sh/api/post/1234567890123456789/comments/9876543210/replies"
```

**A profile by @handle, then its posts, followers, and followings:**

```bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://tiktok.fetcher.sh/api/user/handle/khaby.lame"

curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://tiktok.fetcher.sh/api/user/6935741396776976390/posts"

curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://tiktok.fetcher.sh/api/user/6935741396776976390/followers"
```

**A hashtag's metadata, then its posts:**

```bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://tiktok.fetcher.sh/api/hashtag/handle/fyp"

curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://tiktok.fetcher.sh/api/hashtag/1234567890/posts"
```

**Posts using a specific sound, and posts from a location:**

```bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://tiktok.fetcher.sh/api/music/1234567890123456789/posts"

curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://tiktok.fetcher.sh/api/location/1234567890123456789/posts"
```

## MCP

```json
{
  "mcpServers": {
    "tiktok": {
      "url": "https://tiktok.fetcher.sh/mcp",
      "headers": { "Authorization": "Bearer bby_live_..." }
    }
  }
}
```

Free: `search_endpoints`, `describe_endpoint`, `check_balance`. Paid:
`fetch_data` (any endpoint above), `topup_credits`, plus the named shortcut
`tiktok_post_search`. Drop the `headers` block to pay per call with x402
instead — see the [`fetcher` skill](../fetcher/SKILL.md) for the full flow.

## Errors

- `400` — missing/invalid parameter (message names it)
- `401` — unknown or rotated key
- `402` — payment required (x402 challenge) or `topup_required` (credits
  exhausted)
- `404` — not a priced path
- No rate limits; no refunds on upstream failures (settlement precedes
  delivery)

## Reference

- Deep dives: [`references/endpoints.md`](references/endpoints.md) (every
  param) · [`references/scenarios.md`](references/scenarios.md) (one `curl`
  per endpoint) · [`references/faq.md`](references/faq.md) ·
  [`references/comparison.md`](references/comparison.md) (vs. the official
  TikTok API and a browser scraper)
- Task guides: [viral post search](../../task-guides/tiktok-viral-post-search.md) ·
  [profile and followers](../../task-guides/tiktok-profile-and-followers.md)
- Slash command: [`/tiktok-search`](../../commands/tiktok-search.md)
- Full agent setup: <https://tiktok.fetcher.sh/skill.md>
- OpenAPI 3.1 contract: <https://tiktok.fetcher.sh/openapi.json>
- Condensed catalog: <https://tiktok.fetcher.sh/llms.txt>
- Payment, credits, and MCP deep dive: [`fetcher` skill](../fetcher/SKILL.md)
- Site: <https://tiktok.fetcher.sh>

© fetcher-sh · MIT · fetcher-sh/fetcher-skills

Similar skills

All skills for Backend and APIs →

From the same set11

twitter-api This skill gives agents access to Twitter/X search and public account data through fetcher.sh. Use it for account, hashtag, and tweet monitoring. CX Codex +1 8,000installs instagram-api This skill hands your agent 16 Instagram endpoints on fetcher.sh: profiles, posts, reels, hashtags. Pay per call or from a prepaid balance. CX Codex +1 6,700installs google-news This skill queries Google News through an HTTP API, covering keyword search, section headlines, and article-link decoding. Use it for topic or press monitoring. CX Codex +1 3,700installs google-maps This skill hands your agent place search, business details and reviews through fetcher.sh. Useful when a project needs points-of-interest data without a Google Cloud setup. CX Codex +1 3,700installs youtube-api This skill gives an agent YouTube search and data access through fetcher.sh. Use it for channel monitoring, video research, and trend tracking. CX Codex +1 3,700installs fetcher Shared payment and setup skill for fetcher.sh: API keys, credits, x402 micropayments and MCP server config. Meant to run before or alongside the per-service skills. CX Codex +1 3,700installs google-play The skill gives your agent HTTP access to Android app search, details, reviews and permissions. Useful for ASO research and competitor monitoring. CX Codex +1 3,600installs x-api Query posts, profiles, followers, and trends on X without OAuth handshakes or developer reviews. The skill routes requests through 15 pay-per-call GET endpoints. CX Codex +1 3,600installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor