TikTok Scraper - Search, User Posts & Stories
Pricing
from $0.00005 / actor start
TikTok Scraper - Search, User Posts & Stories
Scrape TikTok videos by keyword search, or fetch all posts/stories from one or more usernames. No login required for search and public posts.
Pricing
from $0.00005 / actor start
Rating
0.0
(0)
Developer
Muhamad Wildan
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
0
Monthly active users
a month ago
Last modified
Categories
Share
TikTok Scraper (Search, User Posts & User Stories)
Scrape TikTok videos by keyword/hashtag search, or pull every post/story from one or more usernames — no TikTok login required for search and public posts.
This Actor is an Apify wrapper around the tiktok-end-to-end-crawler engine:
the same async TikTokAPI client (pagination, retries, rate-limiting) that
already powers the original CLI tool / Kafka+Elasticsearch pipeline, just
re-pointed at the Apify dataset and Apify Proxy instead of Kafka/ES/argparse.
Input
| Field | Type | Notes |
|---|---|---|
operation | search | userPosts | userStory | What to scrape |
searchQuery | string | Required for search |
usernames | array of strings | Required for userPosts / userStory. Multiple usernames run in one job. |
resultsPerPage | int (1-50) | Items requested per page, default 12 |
maxPagesPerQuery | int | Pages to paginate per keyword/username, default 1 |
maxItems | int | Hard stop for the whole run, default 50 (0 = unlimited) |
hd | bool | Request HD video links, default true |
proxyConfiguration | object | Apify Proxy — recommended, the upstream API rate-limits by IP |
cookies | string (secret) | Only needed if userPosts/userStory return HTTP 403 |
rateLimitRps | int | Requests/second cap for this run, default 5 |
Output (one dataset row per video)
Each row is the full TikTokPost model (id, title, description, author,
music, video, stats, hashtags) plus a few flattened convenience fields:
authorUsername, playUrlNoWatermark, playUrlWatermark, diggCount,
playCount, commentCount, shareCount, operation, queryValue,
scrapedAt.
What changed vs. the original CLI project
- Dropped: Kafka/Elasticsearch output drivers, the
Controllers/Input/Outputabstraction layer, env/YAML settings loading. Apify's dataset + input schema already cover that role, so keeping them would just add unused dependencies (slower builds = more compute cost on every run). - Kept as-is:
TikTokAPI(tiktok_api.py) and the Pydantic schemas (schemas.py) — same pagination/retry/backoff logic, same field aliases, samemodel_dump(by_alias=True, exclude_none=True)shape.KafkaEventwas renamedScrapeEventsince there's no Kafka here. - Added: Apify Proxy wiring (
proxy_urlwas already a config field in the originalCrawlerSettings— it just wasn't connected to anything before), and PPE charging viaActor.push_data(item, charged_event_name=...).
Monetizing this Actor
- Push this folder to a GitHub repo (or use
apify pushfrom the Apify CLI). - In Apify Console → Actor → Monetization, set up Pay per event (PPE)
and define an event named
post-scraped(matchesCHARGED_EVENT_NAMEinsrc/main.py) — e.g. price it somewhere in the $1–10 per 1,000 results range, in line with typical Store pricing. - You don't need to touch the code further —
Actor.push_data(..., charged_event_name="post-scraped")only actually charges once that event exists in Console; until then it's a no-op.
Possible follow-ups (not built into v1, to keep the build light)
- Optional second output: also forward each item to your own Kafka topic or
Elasticsearch index (you already have working drivers for both in the
original project's
helpers/output/driver/) — could be pitched as an "enterprise" / advanced-input toggle on top of the free dataset output. - A 4th
postDetailoperation that re-usesfetch_post()to grab a single video by ID/URL.