How to Scrape TikTok Hashtag Pages
To scrape a TikTok hashtag, put its page URL, such as https://www.tiktok.com/tag/booktok, in the startUrls input of apidojo's TikTok Scraper on Apify, set maxItems, and run it.

To scrape a TikTok hashtag, put its page URL, such as https://www.tiktok.com/tag/booktok, in the startUrls input of apidojo’s TikTok Scraper on Apify, set maxItems, and run it. It returns the hashtag’s videos with views, likes, comments, shares, saves, upload time, sound and creator profile, at $0.30 per 1,000 posts.
Hashtag data shows how big a topic is, who drives it and whether it’s growing. This guide covers inputs, country targeting, measuring a hashtag’s growth, and costs. Choosing hashtags in the app is covered in how to use hashtags on TikTok. Every other collection task is mapped in how to scrape TikTok data. For a topic without a fixed hashtag, how to scrape TikTok search results covers keyword searches, and the sounds inside a hashtag’s videos lead to how to scrape TikTok sounds and music data.
How Do You Scrape a TikTok Hashtag?
You scrape a hashtag by giving the actor the hashtag’s page URL. Listed below are the 4 steps.
- Build the URL:
https://www.tiktok.com/tag/followed by the hashtag without #. - Paste one or more URLs into
startUrlsin TikTok Scraper. - Set
maxItemsand, if needed, alocationcountry code. - Run it and export the videos as JSON, CSV or Excel.
{
"startUrls": [
"https://www.tiktok.com/tag/booktok",
"https://www.tiktok.com/tag/bookrecommendations"
],
"location": "US",
"maxItems": 2000
}
Hashtag URLs are one of the URL types the actor accepts, and each URL should return at least 10 posts (Apify).
Should You Use a Hashtag URL or a Keyword Search?
Use the hashtag URL for videos tagged with that exact hashtag, and a keyword search for videos about a topic whether or not they’re tagged. Keyword searches can be sorted by likes or date with sortType; hashtag URLs return the hashtag page’s own order. Keyword collection is covered in how to scrape TikTok search results.
How Do You Measure a Hashtag’s Growth?
Measure growth by counting how many of a hashtag’s videos were posted each day and how many views they gathered. The uploadedAtFormatted field makes this a simple group-by.
import pandas as pd
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("apidojo/tiktok-scraper").call(run_input={
"startUrls": ["https://www.tiktok.com/tag/booktok"],
"maxItems": 2000,
})
df = pd.json_normalize(list(client.dataset(run.default_dataset_id).iterate_items()))
df["day"] = pd.to_datetime(df["uploadedAtFormatted"]).dt.date
daily = df.groupby("day").agg(videos=("id", "count"), views=("views", "sum"))
print(daily.tail(14))
print(df.groupby("channel.username")["views"].sum().nlargest(10))
The second print lists the creators driving the hashtag. Repeating this on a schedule turns it into a trend monitor; see how to monitor TikTok trends with an API.
What Can You Learn From Hashtag Data?
Hashtag data answers 4 practical questions. The table maps each question to the fields that answer it.
| Question | Fields |
|---|---|
| Is the hashtag still active? | uploadedAtFormatted counts per day |
| Which videos win? | views, likes, shares, bookmarks |
| Who are the top creators? | channel.username, channel.followers |
| Which sounds and formats go with it? | song, video.duration, hashtags |
What Does Scraping TikTok Hashtags Cost?
At $0.30 per 1,000 posts, 5 hashtags with 2,000 videos each cost $3. The free Apify plan runs the actor in demo mode, 5 runs a month with 10 items each (Apify).
Questions people ask
Can you scrape a hashtag's total view count?
The hashtag page shows its total in the app; scraped results give you each video's views, which you can sum for the videos collected.
Can you scrape hashtags by country?
Yes, set location to an ISO country code.
Can you scrape hashtag data for older videos?
You get what the hashtag page serves; very old videos may not all appear.