Skip to content
Social media Apify Actor

TikTok Scraper for video search.

TikTok Scraper is a BatScrape Actor on Apify that searches TikTok by keyword. It returns one JSON record per unique video, with the description, creator profile, engagement counts, hashtags, and music and media URLs.

Runs in your Apify account. Export JSON or CSV.

  • Videos
  • Creator profiles
  • Engagement
  • Hashtags
TikTok in action Illustrative demo
01 / INPUT

Set the input

Choose a keyword to search on TikTok.

Search keywords Required
coffee Keyword
Result limit 20
Output format Structured JSON

Example configuration · Run your own search on Apify.

02 / RESULT

Preview a record

Each result includes the creator and engagement data.

Made-up values · Actual field names · No live request.

03 / EXPORT

Export JSON

Use the structured dataset in your research or automation.

dataset-item.json JSON
{
  "id": "0000000000000000001",
  "url": "https://www.tiktok.com/@example_creator/video/0000000000000000001",
  "description": "Example description #example",
  "createDate": "2026-09-01",
  "authorMeta": {
    "name": "example_creator",
    "nickname": "Example creator",
    "verified": false,
    "followerCount": 1200
  },
  "statistics": {
    "likeCount": 340,
    "commentCount": 12,
    "shareCount": 5,
    "playCount": 4800,
    "collectCount": 21
  },
  "hashtags": [
    "example"
  ],
  "searchKeyword": "coffee"
}
Download sample JSON

Use it for trend research, competitor and brand tracking, hashtag monitoring, influencer discovery, or structured datasets of short-form video content. It runs in your Apify account, and you do not need a TikTok account, login or cookies.

What it collects

  • Videos: ID, URL, description, and publish time and date.
  • Creators: the poster’s handle, display name, follower count and verification status, on every result at no extra charge.
  • Engagement: like, comment, share, play and collect counts.
  • Media: video dimensions and duration, cover images and a signed play URL, plus the sound’s title, author and play URL.
  • Hashtags on each video, and the keyword that found it.

How it works

TikTok Scraper searches TikTok by keyword and pushes the results to your dataset as structured JSON. There is no headless browser, no signing algorithm to maintain and no login wall to work around on your end. Give it one or more keywords and it queues exactly the searches needed, deduplicating across keywords and respecting your maxItems cap and pay-per-event budget as it goes.

Each keyword is searched on its own, and a video that two different keywords surface is stored, and charged, once. A sort order, a publish-time window and a region setting narrow the results without any extra cost. Every result carries the posting creator’s profile, so no separate profile lookup is needed.

Use cases

  • Social media marketers — track trending TikTok content under any keyword or campaign term.
  • Brands and competitors — monitor how competitor keywords or branded hashtags perform across creators.
  • Academic researchers — build structured datasets of short-form video data for consumption pattern analysis.
  • Influencer agencies — compare creators’ reach and engagement counts at scale before outreach.
  • Journalists and analysts — cover social media trends with structured data.
  • E-commerce teams — surface product-related user-generated content for campaigns and social proof.

Input

Set these in the Actor’s input form on Apify, or send them as JSON through the API.

  • keywords — Required: at least one, one per line. The search terms, entered without # (travel, not #travel). English words, brand names, product terms and emoji all work. Each keyword is searched on its own, and results are deduplicated across keywords, so you never pay twice for the same video.
  • maxItems — Maximum number of videos across all keywords combined, from 1 to 10,000. The default is 100.
  • sortType — Result order: RELEVANCE, the default, shown in the form as “Relevance”; or MOST_LIKED (“Most Liked”).
  • publishTime — Publish window: ALL (“All time”), the default; ONE_DAY (“Last 24 hours”); ONE_WEEK (“Last week”); ONE_MONTH (“Last month”); THREE_MONTHS (“Last 3 months”); or HALF_YEAR (“Last 6 months”).
  • region — An ISO 3166-1 alpha-2 country code that scopes the search, such as GB for the UK or DE for Germany. The default is US. The form takes the code as text and lists no supported countries.
  • customMapFunction — Optional synchronous (object) => object JavaScript function applied to every item. It may add or reshape fields but must not filter items. Leave it empty to store items unchanged.

Custom map function

Use customMapFunction only to add or reshape fields. The README’s example adds an isViral flag to videos with more than 50,000 likes:

(object) => {
  return { ...object, isViral: (object.statistics?.likeCount || 0) > 50000 };
};

The Actor enforces three rules. A violation is logged and the function is ignored; the run never crashes.

  • No filtering. Returning null, {} or a non-object falls back to the original item.
  • No date-based logic. A function whose source contains new Date, Date.now or 1970 is rejected.
  • Synchronous only. async and generator functions, and returned Promises, are rejected.

The input form adds that the function must not be used for filtering, and that accounts using it for filtering may be banned.

Input tips

Take a quick sample

Set maxItems to 10–20 and run a single keyword: a cheap, fast check that the Actor and your keyword return what you expect.

Get the most-liked videos for a keyword

Use sortType: MOST_LIKED to surface the highest-engagement content. This input searches one keyword for travel content, most-liked first:

{
  "keywords": [
    "travel"
  ],
  "sortType": "MOST_LIKED",
  "maxItems": 100
}

Track a trend or campaign term

Use publishTime: ONE_WEEK with sortType: RELEVANCE to focus on recently posted videos relevant to your keyword. This input tracks one trend term over the last week:

{
  "keywords": [
    "summer fashion"
  ],
  "sortType": "RELEVANCE",
  "publishTime": "ONE_WEEK",
  "maxItems": 50
}

Research several brands or competitors in one run

List every keyword up front. Cross-keyword dedup means an overlapping result is never charged twice, so batching keywords into one run costs the same as running them separately, minus the duplicates:

{
  "keywords": [
    "nike",
    "adidas",
    "puma"
  ],
  "sortType": "MOST_LIKED",
  "publishTime": "ONE_MONTH",
  "region": "US",
  "maxItems": 500
}

Get region-specific content

Set region to the relevant ISO country code, such as GB for the UK or DE for Germany. The default is US.

Output

Each run writes its results to an Apify dataset. Each item is one unique TikTok video. A keyword that returns no matches adds no items; it isn’t stored as a placeholder row. In Apify Console, the dataset’s Overview shows the ID, URL, Description, Author, Likes, Plays, Shares and Published columns.

These are the main fields of an item.

  • id url — The video ID and its TikTok URL, which carries the creator’s handle.
  • description — The video’s description.
  • createTime createDate — The publish time as a number, and the publish date.
  • authorMeta — The creator’s handle (name), display name (nickname), follower count and verification status.
  • statistics — likeCount (likes), commentCount, shareCount (shares), playCount (plays) and collectCount.
  • videoMeta musicMeta — Video dimensions, duration, cover images and a signed play URL; the sound’s ID, title, author and play URL.
  • hashtags — The video’s hashtags, as plain strings without the #.
  • searchKeyword inputKeyword — The keyword that returned the video.
{
  "id": "0000000000000000001",
  "url": "https://www.tiktok.com/@example_creator/video/0000000000000000001",
  "description": "Example description #example",
  "createDate": "2026-09-01",
  "authorMeta": {
    "name": "example_creator",
    "nickname": "Example creator",
    "verified": false,
    "followerCount": 1200
  },
  "statistics": {
    "likeCount": 340,
    "commentCount": 12,
    "shareCount": 5,
    "playCount": 4800,
    "collectCount": 21
  },
  "hashtags": [
    "example"
  ],
  "searchKeyword": "coffee"
}
Illustrative record: real field names, made-up values, trimmed.

Field reference

Every documented key of a dataset item, with its JSON type. A dot marks a key inside an object.

FieldTypeMeaning
id string The video ID.
url string The video’s TikTok URL, as https://www.tiktok.com/@<handle>/video/<id>.
description string The video’s description.
createTime number The publish time. The README does not state its unit.
createDate string The publish date, as YYYY-MM-DD in the README’s sample.
region string or null Scoped by the region input; it is not the creator’s country. The search endpoint does not reliably return it, so it may be null.
authorMeta.name string The creator’s @username handle, as used in the URL.
authorMeta.nickname string The creator’s display name, as TikTok shows it.
authorMeta.id authorMeta.secUid string The creator’s IDs.
authorMeta.verified boolean Whether the creator is verified.
authorMeta.followerCount number The follower count.
authorMeta.avatar string An avatar image URL.
authorMeta.heartCount authorMeta.videoCount number Not reliably populated by the search endpoint: they may be 0 for every item. The README does not describe them further.
videoMeta.width videoMeta.height number The video’s dimensions.
videoMeta.duration number The video’s length. The README does not state its unit.
videoMeta.coverUrl videoMeta.dynamicCoverUrl string Cover image URLs.
videoMeta.playUrl string A CDN-signed play URL that expires within about 24 hours, so fetch the video promptly if you need it.
statistics.likeCount number Likes.
statistics.commentCount number Comments.
statistics.playCount number Plays.
statistics.shareCount statistics.collectCount number The share and collect counts.
musicMeta.id musicMeta.title musicMeta.author musicMeta.playUrl string The sound’s ID, title, author and play URL.
hashtags array The video’s hashtags, a flat array of strings without the #, taken from its challenge list.
searchKeyword inputKeyword string The keyword that returned the video. The README describes both as that keyword.
descriptionLanguage videoMeta.ratio string In the README’s sample, as en and 540p; the README does not describe them. Check a run of your own before relying on them.
awemeType authorMeta.followingCount number In the README’s sample; the README does not describe them. Check a run of your own before relying on them.
isAiGenerated boolean In the README’s sample, as false; the README does not describe it. Check a run of your own before relying on it.

How to run it

  1. Open the Actor on Apify, listed as “Tiktok Scraper”, and sign in. You need an Apify account.
  2. Fill in the Input tab, then click Start.
  3. When the run finishes, open the Output tab and click Export to download the dataset as JSON, CSV or another format.

Or send the same input to the Apify API. This call runs the Actor and returns its dataset items. Replace $APIFY_TOKEN with the API token from your Apify Console.

curl -X POST \
  "https://api.apify.com/v2/actors/batscrape~tiktok-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords":["coffee"],"maxItems":20}'

The call waits up to 300 seconds. For a longer run, start it asynchronously and read the dataset when it finishes. Read the Apify API reference.

New to Apify? See how BatScrape Actors run on Apify. To run it on a schedule, or send results on when a run finishes, see schedules and webhooks.

Pricing

Pay per event. A run is charged when it starts, then one result event for every unique video saved to your dataset, with no separate per-keyword or per-page fee. A video found by more than one keyword is charged only once, and a search that returns nothing adds no result charges. Every result is checked against the run’s charge budget before it’s stored, so a run stops cleanly instead of overspending. See current rates on Apify .

Limitations

  • It returns video metadata and media URLs, including a signed play URL. It does not download or store video files.
  • The play URL expires within about 24 hours, so fetch a video promptly if you need the file.
  • A run stops when it reaches maxItems, at most 10,000 videos across all keywords, or can’t afford another result within your charge budget.
  • A narrow or rare keyword may return only a few videos, and one with no matches adds no rows. A very narrow publishTime window combined with a niche keyword can return none.
  • Keywords are plain-text search terms, entered without #. sortType offers relevance and most-liked order only, with no newest-first option.
  • The search endpoint does not reliably return every field: the output region may be null, and authorMeta.heartCount and authorMeta.videoCount may be 0 for every item.
  • customMapFunction may only add or reshape fields. A null, {} or non-object return falls back to the original item, and a function with date-based logic or asynchronous code is logged and ignored, so items are stored unchanged.

FAQ

Answers from the Actor’s README on Apify.

Do I need a TikTok account or login?

No. Searches run through a backend service using only public data, and no TikTok account, login or cookies are required on your end.

Should keywords include the # symbol?

No. Enter keywords without # (travel, not #travel). The search endpoint treats them as plain-text search terms.

Is creator data included in the price?

Yes, at no extra charge: every result includes the creator’s profile, with their handle, display name, follower count and verification status.

Does it download videos?

No. It returns each video’s metadata and a signed play URL, but does not download or store video files itself. The play URL expires within about 24 hours, so fetch the file promptly if you need it.

Can I get results for a specific country?

Yes. Set region to an ISO 3166-1 alpha-2 country code, such as GB, DE or JP, to scope search results to that region.

Why did a run return few or no results?

Check these first:

  • maxItems: the run stops once it’s reached.
  • The charge budget: a run that can’t afford another result stops cleanly rather than erroring.
  • The keyword: a very narrow one may simply have little content on TikTok, so try a broader or more common one.
  • keywords itself: at least one keyword is required.
  • publishTime: a very narrow window combined with a niche keyword can return zero results.

How do I keep the cost of a run down?

Three settings help:

  • Set maxItems to only what you actually need.
  • Use publishTime to narrow results to the relevant window: fewer pages to fetch means faster runs.
  • Batch related keywords into one run: cross-keyword dedup means overlaps are never charged twice.

Other BatScrape Actors

  • TikTok Shop Scraper — Scrape US TikTok Shop products by keyword or store, and full product pages and buyer reviews from product URLs. Export prices, discounts, ratings, units sold, SKU stock and shipping.
  • Reddit Scraper — Search Reddit posts or comments by keyword across all subreddits. Export titles, text, subreddits, authors, scores and comment counts, sorted by relevance, newest, top or most comments.
  • Threads Scraper — Search Threads by keyword or collect a public account’s latest posts. Export text, authors, engagement, topics, mentions, links and media URLs without a Threads login.
  • Realtor.com Scraper — Scrape Realtor.com for-sale, rental and sold listings by city, ZIP code or URL. Export price, beds, baths, photos, sale and tax history, schools and agents.
  • Douyin Scraper — Search Douyin (抖音), also known as TikTok China, by keyword. Export unique posts with creator profiles, engagement stats, music and media URLs.
  • FollowScores Scraper — Extract live football fixtures, results and team profiles for 11 European competitions and 214 teams.

Every published Actor is on the scrapers hub.

YOUR NEXT DATASET STARTS HERE

Scrape at scale. Build with better data.

Discover our scraping actors on Apify. Configure your source and connect the results to your workflow.

  • Run actors on Apify
  • Export JSON or CSV
FROM SOURCE TO DATASET
Apify 02 / Run

03 / Use your data

JSON Apps & APIs
CSV Sheets & analysis
Ready for your workflow

Your source. Your Apify account. Your data.

Purpose-built actors. One place to start. Explore the scraper collection