A pay-per-request TikTok scraper API powered by the Machine Payments Protocol (MPP) and Apify.
AI agents and clients pay in Tempo/PathUSD stablecoins on each request — no subscriptions, no API keys.
| Endpoint | Price | Description |
|---|---|---|
GET /health |
Free | Service info & endpoint list |
GET /api/tiktok/user |
$0.05 | Scrape user profile + recent videos |
GET /api/tiktok/hashtag |
$0.10 | Scrape posts under a hashtag |
GET /api/tiktok/video |
$0.02 | Single video metadata |
GET /api/tiktok/search |
$0.05 | Search TikTok by keyword |
# User scrape
GET /api/tiktok/user?handle=@charlidamelio&limit=10
# Hashtag scrape
GET /api/tiktok/hashtag?tag=fyp&limit=20
# Single video
GET /api/tiktok/video?url=https://www.tiktok.com/@user/video/123456789
# Search
GET /api/tiktok/search?q=funny+cats&limit=10- Client makes a normal HTTP request
- Server responds with 402 Payment Required + payment instructions
- Client pays with Tempo/PathUSD (stablecoin)
- Client retries with
Authorizationheader containing payment proof - Server verifies payment → returns TikTok data + receipt
bun installcp .env.example .envEdit .env:
APIFY_TOKEN=apify_api_your_token_here
RECIPIENT_ADDRESS=0xYourWalletAddress
PORT=3000- APIFY_TOKEN — get at apify.com
- RECIPIENT_ADDRESS — your EVM wallet address for receiving payments
# Development (hot reload)
bun run dev
# Production
bun run start| Layer | Tool |
|---|---|
| Runtime | Bun |
| Framework | Hono |
| Payments | mppx — MPP TypeScript SDK |
| Stablecoin | Tempo PathUSD (testnet → Base mainnet) |
| Scraper | Apify TikTok Scraper |
In src/index.ts, update:
testnet: false,And update RECIPIENT_ADDRESS in .env to your mainnet wallet.
MIT