← Blog

How to Scrape TikTok Hashtags with an API

By Nikhil Kumar. Last updated October 2026.

TikTok used to tell anyone how many times a hashtag had been watched. In early 2024 it quietly stopped.

To scrape TikTok hashtags with an API, point a data API at TikTok’s public hashtag page: you pass the tag, and it returns the videos under it as JSON, with views, likes, comments, shares, saves, caption, creator, music, and every other hashtag on each post. TikTok’s own Research API can query hashtags too, but only approved academics get access. This guide covers both routes, and the limits neither one will tell you about up front.

How to scrape TikTok hashtags with an API: pull the videos under any public hashtag as JSON with views, likes, shares, saves, and co-occurring hashtags.

Can you get TikTok hashtag data from the official API?

Only if you are an approved academic researcher. TikTok’s Research API can filter videos by hashtag_name, but access is limited to non-profit academic institutions in the US, EEA, UK, and Switzerland, plus some EU research bodies, per TikTok’s Research Tools page. Approved teams get 1,000 requests a day at up to 100 records each, and each query covers at most a 30-day window. Brands, agencies, and startups cannot apply.

For most people reading this, then, the official route closes before it opens.

Even approved access is slow. A research institute in Slovakia, KINIT, reported waiting about 21 months, from December 2023 to September 2025, before it had working data access.

On paper, the quota looks generous. TikTok’s Research API FAQ puts it at 1,000 requests and up to 100,000 records a day, reset at midnight UTC.

Getting the data out is a different matter.

A 2024 study by Corso, Pierri, and De Francisci Morales, What we can learn from TikTok through its Research API, found the API delivered at most 65% of the videos their queries asked for.

TikTok’s totals still counted the missing videos. They just never arrived.

People tend to forget a third option.

TikTok’s Creative Center Trends page shows trending hashtags by industry, with a trendline and related tags for each. You need a login, and it’s handy for spotting a rising tag, but it won’t give you the videos as data.

Research APICreative CenterData API
Who can use itApproved non-profit academicsAnyone with a loginAnyone with a key
Commercial useNoBrowse onlyYes
Hashtag videos as JSONYes, 100 per requestNoYes
Date filterYes, 30 days maxTime frame presetsNo, filter after
Time to first callMonthsMinutesMinutes

I wrote up the full academic-versus-commercial split in TikTok Research API vs a data API. Short version: outside a university, your choice is between data APIs.

Three routes to TikTok hashtag data: the Research API is academic-only with 1,000 requests a day and a 30-day window, the Creative Center shows trending tags but no raw videos, and a data API returns hashtag videos as JSON to anyone with a key.
Three routes to hashtag data. Only one is open to a commercial team today.

How do you scrape TikTok hashtags with an API?

A data API does the reading for you. It loads TikTok’s public hashtag page, the same one a logged-out visitor sees, and hands back the videos as structured JSON. On ScraperSocial the call is a single GET against /v1/tiktok/hashtag-search with query set to the tag. You don’t need a TikTok login or an app review. Billing is 1 credit per video returned, so a 20-video pull costs 20 credits, about 10 cents.

The hashtag search endpoint takes two inputs that matter.

query is the tag. Send skincare rather than #skincare. Forget, and the endpoint strips one leading # for you, though the bare word keeps your cache keys clean.

limit is how many videos you want. It defaults to 20.

Treat 50 as the ceiling for one call. Up to that, the videos come back in the same response.

My advice is to start at 20. Most hashtag questions boil down to “what is working on this tag right now?”, and the top 20 answers that for 20 credits.

A two-video test call looks like this:

Terminal window
curl "https://api.scrapersocial.com/v1/tiktok/hashtag-search?query=booktok&limit=2" \
-H "Authorization: Bearer sk_live_..."

What does a TikTok hashtag API return for each video?

Each item is one video with its engagement already parsed: views, likes, comments, shares, and saves, plus the caption, duration_sec, posted_at, the creator’s handle and display name, the music title, and a hashtags array listing every tag on the post. Items arrive in the standard { data, meta, request_id } envelope, with meta.count and meta.limit telling you how many came back against how many you asked for.

And here’s what comes back:

{
"data": [
{
"id": "7423351890114317575",
"url": "https://www.tiktok.com/@readwithmaya/video/7423351890114317575",
"caption": "3 books that ruined every other book for me #booktok #fantasybooks",
"views": 1840211,
"likes": 203114,
"comments": 2871,
"shares": 9410,
"saves": 31208,
"duration_sec": 41,
"posted_at": "2026-09-28T19:12:44.000Z",
"author": { "handle": "readwithmaya", "name": "Maya Reads" },
"music": "original sound",
"hashtags": ["booktok", "fantasybooks"]
}
],
"meta": { "count": 1, "limit": 2 },
"request_id": "req_01K7C2X9HG4TQ0"
}

The values above are illustrative. The field names are exactly what the endpoint returns.

Two of these fields are more useful than they look.

I watch saves first. A save means “I want to come back to this,” and that says more about buying intent than a like does. On product tags, a video with a high save-to-view ratio is usually the one worth studying.

hashtags is the other. Every video carries the full list of tags its creator used, so one pull on booktok also tells you which tags travel with it. You get that research for free, and the Python section shows how to count it.

What is not in the payload matters too.

You won’t find the creator’s follower count, any comment text, or the video file. Creator numbers come from a profile endpoint, and comments come from the comments endpoint, which takes the video URL.

When TikTok doesn’t expose a count, the field is null. Write your code to expect that.

Two options help when you feed this into other tools. Add fields=id,views,saves,hashtags and the response carries only those keys. Add format=csv and you get a spreadsheet-ready file instead of JSON.

Fields returned for each TikTok hashtag video: id and url, caption, views, likes, comments, shares, saves, duration, posted_at, author handle and name, music, and the full hashtags array. Creator follower counts, comment text, and video files are not included.
One object per video. Engagement is parsed; follower counts and comments need their own calls.

Why can’t you get every video under a TikTok hashtag?

Because TikTok’s public hashtag page never shows every video, so no API reading it can either. The page serves a ranked feed, a popularity-weighted mix TikTok does not document, and it stops well short of the tag’s total. One TikTok-Api user asked for 10,000 videos and got slightly under 1,000; the maintainer called it “a TikTok web limit.” Plan for a sample of the tag, never the whole thing.

Most hashtag API pages skip this part.

Another developer reported in July 2024 that a tag TikTok listed at 7.1 million posts returned only 30 to 50 videos. Their follow-up question is the one everyone asks next: is there a way to search by time range?

No. TikTok’s public hashtag page has no date filter, so nothing that reads it can ask for one.

A few things follow from that.

Results are not newest first. If you want recency, sort on posted_at after the call. If you want the biggest videos, sort on views.

A niche tag can return fewer videos than your limit. That’s normal.

Billing follows what comes back, so a tag that returns 7 videos costs 7 credits, not your full limit. A tag that returns nothing is free, up to 25 empty results a day.

Repeated pulls on the same tag overlap, too. The ranked feed changes slowly, so yesterday’s top videos are often today’s. Dedupe on id and you only store what is new.

For fuller coverage of a topic, combine routes. Pull the hashtag, then run a keyword search on the same term. Keyword search reaches videos that mention the topic in the caption without carrying the tag.

Why a TikTok hashtag API returns a sample: a tag listed at 7.1 million posts returned 30 to 50 videos in one developer's test, and a 10,000-video request returned under 1,000, because TikTok's public hashtag feed is ranked and capped.
What a tag claims versus what its public feed serves. Sources: TikTok-Api issues #1175 and #851.

Can you still see how many views a TikTok hashtag has?

No, not from TikTok itself. TikTok removed total view counts from hashtag pages in early 2024 and now shows the number of posts instead. The Center for Countering Digital Hate documented the change on February 7, 2024, noting that 21 eating-disorder hashtags it tracked had shown a combined 11 billion views before the figure vanished. Any tool quoting an all-time hashtag view total today is estimating.

TikTok told The New Arab in February 2024 that showing post counts “brings us in line with industry standards.” It also broke a lot of hashtag research built before 2024.

The old habit was to compare two tags by view totals and pick the bigger one. You can’t do that anymore.

What you can measure instead is the reach of the sample.

Pull the top 50 videos on each tag, sum their views, and compare. You lose the lifetime total, but you get a live read on how much attention the tag’s best current videos are pulling in. Honestly, for picking between two tags, I think that’s the better number anyway.

I prefer the median to the sum, because one viral video can make a dead tag look busy. If the median video in a 50-video pull has 4,000 views, that is what a normal post on that tag can expect.

Track it over time and you get a trend line TikTok no longer gives you. Run the same pull weekly, store the median and the sum, and a rising tag shows itself within a few weeks.

Cross-check against the Creative Center trendline. It shows whether TikTok itself thinks a tag is growing, even if it won’t hand you the videos.

TikTok hashtag view counts before and after February 2024: hashtag pages used to show a total view count and now show a post count, so the replacement metric is the summed and median views of a pulled sample of videos.
The lifetime total is gone. The median views of a 50-video sample is the number to track now.

How do you scrape TikTok hashtags in Python?

You call the hashtag endpoint with requests and do the sorting and counting on your side. The whole script is about 20 lines: one GET with the tag and a limit, a sort on views, and a Counter over the hashtags arrays to find the tags that travel with yours. There is no OAuth flow and no pagination loop to write.

This is roughly the script I start every hashtag project with:

import requests
from collections import Counter
from statistics import median
r = requests.get(
"https://api.scrapersocial.com/v1/tiktok/hashtag-search",
params={"query": "booktok", "limit": 50},
headers={"Authorization": "Bearer sk_live_..."},
timeout=120,
)
r.raise_for_status()
videos = r.json()["data"]
top = sorted(videos, key=lambda v: v["views"] or 0, reverse=True)
for v in top[:10]:
print(v["views"], v["saves"], v["author"]["handle"], v["url"])
print("median views:", median(v["views"] or 0 for v in videos))
tags = Counter(t for v in videos for t in (v["hashtags"] or []) if t != "booktok")
print(tags.most_common(15))

A couple of details in there are worth copying.

The or 0 guards handle null counts, so one odd video does not crash the sort.

The timeout=120 matches a hashtag read, which can take longer than a cached call. A cache hit comes back fast. A miss goes out to TikTok, and the caching and freshness docs explain how long each result stays cached before the next call goes out again.

The Counter is the research step. On a tag like booktok, the co-occurring list is where the narrower genre and trope tags show up, and those are the ones a smaller creator can actually rank in.

To turn it into a weekly tracker, run it on a schedule, keep a set of seen id values, and append only new videos. Storage stays small and your trend numbers stay honest.

How much does a TikTok hashtag API cost?

On ScraperSocial a hashtag video is 1 credit, so the 20-video pull above costs 20 credits, about 10 cents, which the 25 credits you get at signup already cover, no card needed; a free key returns 5 videos a call, so that first pull is four calls. Beyond that, $5 buys a month of 1,000 credits, roughly 1,000 hashtag videos, and you can cancel whenever. Other providers bill per video plus run fees, per record, or per page of results.

The rate is only part of the bill. What each option asks you to set up is the rest of it.

OptionBillingGetting startedWhat you get, and what you set up
TikTok Research APIFreeAcademic approval, often monthsNon-profit academics only, 1,000 requests/day
Apify hashtag actorsPer video, from $0.49 per 1,000 as publishedApify account and an actor to configurePlus a start fee and platform usage per run
Bright DataPer record, $1.50 per 1,000 as publishedPay-as-you-go tier, no monthly minimumBilled on successful records
ScrapeCreatorsPer request (one page)$10 for 5,000 requestsYou walk pages with a cursor
ScraperSocial1 credit per video returnedFree signup credits, then the $5 monthly planOne call up to 50 videos, no paging, same key for TikTok profiles, comments and other platforms

Prices checked October 2026 against each provider’s page.

Three things keep a hashtag bill small here.

You pay for videos that arrive. A call that errors out isn’t billed at all, and a niche tag that comes back short is charged for what it returned, not for the limit you sent.

There’s no paging code. You set limit and the videos come back in one response, so there is no cursor loop to write, retry, and dedupe when TikTok changes its feed.

One schema covers the rest of the job. The same key and field names work for TikTok profiles, comments, and keyword search, plus Instagram, YouTube, X, and the rest. If hashtags feed a multi-platform tool, you write the parser once.

Now the arithmetic for real hashtag work. Watching one tag at 30 videos a day uses about 30 credits daily, roughly 900 a month, which is about $4.50 at half a cent per credit; the pricing page lists the annual rate, which brings it nearer $4. A one-off sweep of 50 videos from each of a dozen tags is 600 videos, 600 credits, or $3.

At hundreds of thousands of TikTok videos a month, get a bulk per-record quote too and compare.

What three TikTok hashtag jobs cost on ScraperSocial at 1 credit per video: a 20-video test is 20 credits, about 10 cents and covered by the 25 free credits; a dozen tags at 50 videos each is 600 credits, $3; one tag at 30 videos a day is about 900 credits a month, about $4.50.
Real hashtag jobs, priced in credits. Failed calls are free, and there is no paging code to maintain.

Collecting what TikTok shows logged-out visitors carries less risk than touching private data, though nothing here is legal advice. In January 2024 a US federal court ruled in Meta v. Bright Data that logged-off scraping of public data did not breach Meta’s terms. That was one district court ruling on contract claims, so don’t read it as a nationwide rule, and privacy law still covers whatever you store.

Privacy law is the part that can actually bite.

A hashtag pull returns public videos, but each one carries a creator’s handle and display name. Those are personal data under GDPR and CCPA. Store only what the analysis uses, put an expiry date on it, and honor deletion requests.

What you do with the data matters as much as reading it. Watching a tag is topic research. Building a long-term file on specific creators from their hashtag activity is a heavier obligation, and worth a lawyer’s look before you build it.

Videos from private accounts are never in the results. A data API reads only what TikTok shows logged-out visitors, which is also why it needs no TikTok account.

Pull one hashtag before you build the pipeline

Pick one tag from your niche and pull 20 videos from the TikTok hashtag search endpoint. Sort by saves, read the top five, and count the co-occurring tags. That pull, about 20 credits across four calls on a free key, will tell you whether the tag is worth tracking weekly. Get a key in two minutes from the quickstart, and the 25 free signup credits cover the first pull.

Frequently asked questions

How do I search TikTok by hashtag with an API?

Use a data API that reads TikTok’s public hashtag pages for you. ScraperSocial exposes this as GET /v1/tiktok/hashtag-search, with query set to the tag and limit set to the number of videos you want. You get back an array of videos with views, likes, comments, shares, saves, caption, author, music, and every hashtag on the post, billed at 1 credit per video returned.

Do I include the # symbol in the hashtag parameter?

No. Send the bare word, like skincare rather than #skincare. The ScraperSocial endpoint strips one leading # if you include it, so either form works, but the bare word is cleaner for caching and logs. Spaces are not allowed inside a TikTok hashtag, so a multi-word tag is one joined word, like booktok or smallbusiness.

Does it return the hashtag’s total view count?

No. TikTok removed total view counts from hashtag pages in early 2024 and now shows a post count instead, so no public read can return a reliable all-time view total. What you get is per-video views for the videos returned. Summing those gives you the reach of the sample you pulled, which is useful for comparing tags, but it is not the tag’s lifetime total.

Are the results sorted by views?

Not strictly. TikTok’s public hashtag page serves a ranked feed, a popularity-weighted ranking TikTok does not document, and results come back in that order. They are not sorted by views and not newest first. If you need a strict order, sort the array yourself on the views or posted_at field after the call.

How many videos can I get per hashtag?

As many as TikTok’s public feed exposes, which is far fewer than the tag’s total. One TikTok-Api user asked for 10,000 videos and got slightly under 1,000, and another got 30 to 50 from a tag TikTok listed at 7.1 million. On ScraperSocial, plan around 50 videos per call, which comes back in a single response.

Is there a way to search hashtag videos by time range?

Not on TikTok’s public hashtag page, which has no date filter, so no scraper can ask it for a time window. You filter after the call: pull the videos, then keep the ones whose posted_at falls inside your range. The official Research API does accept start and end dates, but only for approved academic researchers and only 30 days per query.

Keep reading

Try it on your own URLs

25 trial credits on signup, no card. Enough to see real responses before you decide.