TikTok Data Scraper · Apify
Tiktok Hashtag Scraper avatar

Tiktok Hashtag Scraper

Pricing

from $0.30 / 1,000 dataset items

Go to Apify Store
Tiktok Hashtag Scraper

Tiktok Hashtag Scraper

Experience the power of our state-of-the-art TikTok scraper, meticulously designed to fetch videos, hashtags, shares, followers, hearts, names, posts, URLs, and music data. Obtain comprehensive insights with ease, and choose your preferred data format: be it HTML, JSON, CSV, Excel, or XML.

Pricing

from $0.30 / 1,000 dataset items

Rating

5.0

(7)

Developer

epctex

epctex

Maintained by Apify Partner

Actor stats

17

Bookmarked

499

Total users

4

Monthly active users

4 hours ago

Last modified

Features

Limited permissions

Share

Actor - TikTok Hashtag Scraper

TikTok Hashtag Scraper

Extract videos from any TikTok hashtag by keyword or URL with transparent, event-based pricing.

The TikTok Hashtag Scraper supports the following features:

  • Search any hashtag by keyword or provide hashtag URLs directly.

  • Extract full video data including descriptions, stats, author info, and music details.

  • Limit output by page count or total item count for cost control.

💰 Pricing

This actor uses event-based pricing — you only pay for what you use.

EventPriceNotes
Tag Query$0.006 per hashtagFirst ~20 videos included FREE
Dataset Item$0.0003 per itemCharged for each video beyond the free ~20

Cost Examples

ScenarioChargesCalculationTotal
1 hashtag, 20 videos1 tag query$0.006$0.006
1 hashtag, 100 videos1 tag query + 80 items$0.006 + ($0.0003 × 80)$0.030
5 hashtags, 100 videos each5 tag queries + 400 items($0.006 × 5) + ($0.0003 × 400)$0.150
10 hashtags, 50 videos each10 tag queries + 300 items($0.006 × 10) + ($0.0003 × 300)$0.150

Demo Mode

The Free plan lets you test this scraper in demo mode. You can start up to 5 runs a month, each returning at most 10 items. API access is reserved for paid plans. Subscribe here to use it without limits.

Bugs, fixes, updates, and changelog

This scraper is under active development. If you have any feature requests you can create an issue from here.

Input Parameters

The input of this scraper should be JSON containing the list of hashtags or URLs to scrape. Possible fields are:

  • search: (Optional) (Array) List of TikTok hashtag keywords to search (e.g. anime, music).

  • startUrls: (Optional) (Array) List of TikTok hashtag URLs to scrape directly.

  • endPage: (Optional) (Number) Final page number to scrape. Default is Infinite. Applies to each search/URL individually.

  • maxItems: (Optional) (Number) Maximum number of videos to retrieve in total.

  • customMapFunction: (Optional) (String) JavaScript function to transform each output item. Ignored with a warning if it is not a usable function. See Custom Map Function.

  • outputConnector: (Optional) (String) MCP connector to deliver the results to — pick one (see Send Results to Notion, Todoist and More).

  • deliverTarget: (Optional) (String) Where the connector writes — paste the URL or ID (Notion example: https://www.notion.so/My-Posts-24f8a1b2c3d44e5f8a9b0c1d2e3f4a5b); some services need none.

  • deliverMode: (Optional) (String) perPost (one record per video) or summary (one roll-up per run). Default is perPost.

  • deliverMaxItems: (Optional) (Number) Cap on how many records perPost delivers (ignored in summary).

Input Example

{
"search": ["anime", "tiktok"],
"startUrls": [
"https://www.tiktok.com/search?q=%23music&t=1670685477846"
],
"maxItems": 100,
"endPage": 2
}

Custom Map Function

Transform output using the customMapFunction parameter. This JavaScript function receives each post object and returns your desired format—flatten nested data, extract specific fields, or restructure for your pipeline.

Important: Custom map function is for data transformation—not for filtering. Filtering items may result in automatic restrictions. Returning an empty object does not remove the item from the dataset—it is saved as { "noResults": true } instead.

Example: Simplified Output

(object) => ({
id: object.id,
url: object.url,
desc: object.desc,
views: object.stats?.playCount,
author: object.nickname
})

Requirements & Error Handling

The value must be a single JavaScript function that takes one item and returns the transformed item. Arrow functions and regular functions both work; async and generator functions are not supported.

Limits: the function runs in an isolated sandbox. It must be synchronous and finish within about 1 second per item, and only plain JavaScript is available (no network requests, require or console). Each item is passed in as plain JSON data.

An unusable function never stops your run. The actor logs a warning, ignores the function, and saves the original, unmodified items instead—so you still get your data:

SituationWhat happens
Not valid JavaScript (for example, plain text pasted into the field)Rejected before the first request; original items are saved
Valid JavaScript but not a function (for example, an object)Rejected before the first request; original items are saved
async or generator functionRejected before the first request; original items are saved
Returns a Promise (for example, (object) => Promise.resolve(object))Rejected at that point; the remaining items are saved unmodified
Returns something other than an object (for example, a number or null)Rejected at that point; the remaining items are saved unmodified
Throws while transforming an itemRejected at that point; the remaining items are saved unmodified
Takes longer than about 1 second on one item (for example, an endless loop)Rejected at that point; the remaining items are saved unmodified

If your output does not look transformed, check the run log for a warning that starts with Your "customMapFunction" input was rejected:—it explains exactly what was wrong.

If you do not need to transform the output, simply leave this field empty.

Send Results to Notion, Todoist and More

Skip the manual exports — the TikTok Hashtag Scraper can deliver its results directly into the tools you already work in, through Apify MCP Connectors:

  1. Authorize a connector (Notion, Todoist, or any service whose MCP server offers non-destructive write tools) once in Console → Settings → API & Integrations → MCP connectors.
  2. Pick it from the Send results to Notion, Todoist, … dropdown.
  3. Fill in where and how to write:
    • Destination target — paste the URL or ID (Notion example: https://www.notion.so/My-Posts-24f8a1b2c3d44e5f8a9b0c1d2e3f4a5b); share it with your connector first via Notion's ••• → Connections menu. For structured columns use a page URL (the Actor builds the database for you) or a database that already has columns — an empty database only receives titles. (Some services need no target.)
    • Write mode — perPost writes one record per video; summary writes a single roll-up for the run.
    • Max records to deliver (optional) — cap on how many records perPost delivers.

Notion, structured like a spreadsheet: for a table of typed columns, point the target at a Notion page — the Actor auto-creates a database from the data, one matching, correctly-typed column per field (URL, number, date, text). Pointing at an existing database fills the columns it already has (matched by name); an empty database receives only the title, and the rest of each record goes to the row body — the connector can't add columns to an existing database without destructive access it never requests. Nested fields are flattened into columns too — an object like stats becomes stats.diggCount, stats.shareCount, … — so everything is sortable and filterable in the grid. Fields that don't fit a column go to the row's page body, so nothing is lost.

Your credentials stay yours: the Actor talks to your services exclusively through your own authorized connector and only ever uses non-destructive write tools — it cannot delete or overwrite anything you already have. Delivery is best-effort and runs after the scrape: if a connector is misconfigured or a delivery fails, your run still finishes normally with all results intact — the failure is reported in the run log, never by failing the run. If the run is about to hit its timeout, delivery stops early so the run still succeeds, and the log tells you how many records were delivered.

During the Run

During the run, the actor will output messages letting you know what is going on. Each message always contains a short label specifying which page from the provided list is currently specified. When items are loaded from the page, you should see a message about this event with a loaded item count and total item count for each page.

If you provide incorrect input to the actor, it will immediately stop with a failure state and output an explanation of what is wrong.

Tiktok Hashtag Export

During the run, the actor stores results into a dataset. Each item is a separate item in the dataset.

You can manage the results in any language (Python, PHP, Node JS/NPM). See the FAQ or our API reference to learn more about getting results from this Tiktok Hashtag actor.

Other Tiktok Scrapers

If you need different functionalities or all at once, we have solutions for each of them. You can check;

Scraped Tiktok Hashtag Properties

The structure of each item in the Tiktok Hashtag looks like this:

Item Detail

{
"inputSource": "https://www.tiktok.com/search?q=%23music&t=1670685477846",
"url": "https://www.tiktok.com/@444talen/video/7600210239350246687",
"id": "7600210239350246687",
"desc": "thanks mikaela for catching this #fyp #niche #music #relatable ",
"createTime": 1769561852,
"video": {
"id": "7600210239350246687",
"width": 720,
"height": 1280,
"ratio": "720p",
"duration": 7.3,
"cover": "https://p16-pu-sign-useast8.tiktokcdn-us.com/tos-useast8-p-0068-tx2/oAfu01GOQE6FK6aIVwSIyDNCeQRsquDfAACFTj~tplv-tiktokx-origin.image?dr=1370&refresh_token=36560718&x-expires=1773496800&x-signature=UPDEoRkwPuXID2ysMt6N3Wl%2FIdE%3D&t=bacd0480&ps=933b5bde&shp=d05b14bd&shcp=c0f880ed&idc=my&biz_tag=tt_video&s=CHALLENGE_AWEME&sc=cover",
"playAddr": "https://v45-eu-p.tiktokcdn.com/1b379ea8d0fe4a1dd3aa852e93c8ca39/69b56a1a/video/tos/maliva/tos-maliva-ve-0068c799-us/oQAiUHXBRiEw1Mh5LaBWAVvd3E6XQl3VBidIC/?a=1233&bti=NXYpNDs8QGo6OjZAOm00NTAuYCMxNDNg&ch=0&cr=13&dr=0&er=0&lr=all&net=0&cd=0%7C0%7C0%7C&cv=1&br=3466&bt=1733&cs=0&ds=3&ft=XsdJYqgmmklPD12Kfk.s3wUlNa3qjeF~O5&mime_type=video_mp4&qs=0&rc=aGg1ZjM0Mzs8PDNpPDM8N0Bpandlb3Q5cmVvODMzaTczNEA0Ly1hXjEuXjAxMzU0MDBiYSMwYmRkMmRrbnBhLS1kMTJzcw%3D%3D&vvpl=1&l=202603132200502DB1BDA27DE8B10E5951&btag=e000b5000",
"originCover": "https://p16-pu-sign-useast8.tiktokcdn-us.com/tos-useast8-p-0068-tx2/oAfu01GOQE6FK6aIVwSIyDNCeQRsquDfAACFTj~tplv-tiktokx-origin.image?dr=1370&refresh_token=36560718&x-expires=1773496800&x-signature=UPDEoRkwPuXID2ysMt6N3Wl%2FIdE%3D&t=bacd0480&ps=933b5bde&shp=d05b14bd&shcp=c0f880ed&idc=my&biz_tag=tt_video&s=CHALLENGE_AWEME&sc=cover"
},
"author": "talen",
"music": {
"id": 7390491186387357000,
"title": "I LOVE IT",
"authorName": "pixie!! ★ goofy goober",
"album": null,
"duration": 16,
"coverThumb": "https://p19-common-sign-useastred.tiktokcdn-eu.com/tos-useast2a-avt-0068-euttp/f8cce3d0438f7d221b82adb692826338~tplv-tiktokx-cropcenter-q:1080:1080:q70.heic?dr=10796&idc=my&ps=87d6e48a&refresh_token=6462b45e&s=CHALLENGE_AWEME&sc=avatar&shcp=c0f880ed&shp=d05b14bd&t=223449c4&x-expires=1773496800&x-signature=%2FK8buLTy6lKZodM%2BDRFHEaxaOFM%3D"
},
"authorStats": {
"followerCount": null,
"followingCount": null,
"videoCount": null
},
"adAuthorization": true,
"nickname": "444talen",
"authorId": "7063947703336387631",
"avatarThumb": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/1f93a4adb4d67eacdd9f7c7bcdd8ef52~tplv-tiktokx-cropcenter-q:1080:1080:q70.heic?dr=10796&idc=my&ps=87d6e48a&refresh_token=08dc580c&s=CHALLENGE_AWEME&sc=avatar&shcp=c0f880ed&shp=d05b14bd&t=223449c4&x-expires=1773496800&x-signature=S82lfhZIoGmIPnRar56%2FPH278TU%3D",
"stats": {
"diggCount": 296878,
"shareCount": 19042,
"commentCount": 498,
"playCount": 1311627
}
}

Contact

Please visit us through epctex.com to see all the products that are available for you. If you are looking for any custom integration or so, please reach out to us through the chat box in epctex.com. In need of support? business@epctex.com is at your service.