HasData
Scraper API

TikTok Scraper API

for account videos and keyword search

Pull TikTok videos as clean JSON from a public account or a keyword or hashtag search. Captions, hashtags, engagement counters and playable URLs come back parsed, with proxies and rendering handled for you.

SUCCESS
99.5%

of requests succeed

P50
3.1s

median response

P95
4.7s

95% finish faster

PRICE
$0.83

per 1k scrapes at volume

Stop maintaining scrapers

TikTok changes weekly. Your code shouldn't notice.

  • Signed URLs that expire in an hour
  • Signing params you re-derive after every release
  • An interstitial instead of the JSON payload
  • Rotating residential IPs
  • Cursor formats that change without notice
One integration commit replaces a backlog you’ll never finish.
scraper | git log
✗ fix: signature params changed again
✗ hotfix: web app returns an interstitial, not JSON
✗ chore: rotate residential IPs
✗ fix: playUrl expires after an hour
✗ fix: hashtags moved to textExtra
✗ hotfix: rate-limit loop on every second request
✗ fix: pagination cursor format changed
✗ chore: keep the headless fleet warm
✗ fix: stats moved to statsV2, counts are strings
✗ chore: bump the request signing lib again
✗ fix: signature params changed again
✗ hotfix: web app returns an interstitial, not JSON
✗ chore: rotate residential IPs
✗ fix: playUrl expires after an hour
✗ fix: hashtags moved to textExtra
✗ hotfix: rate-limit loop on every second request
✗ fix: pagination cursor format changed
✗ chore: keep the headless fleet warm
✗ fix: stats moved to statsV2, counts are strings
✗ chore: bump the request signing lib again
✗ fix: signature params changed again
✗ hotfix: web app returns an interstitial, not JSON
✗ chore: rotate residential IPs
✗ fix: playUrl expires after an hour
✗ fix: hashtags moved to textExtra
✗ hotfix: rate-limit loop on every second request
✗ fix: pagination cursor format changed
✗ chore: keep the headless fleet warm
✗ fix: stats moved to statsV2, counts are strings
✗ chore: bump the request signing lib again
✗ fix: signature params changed again
✗ hotfix: web app returns an interstitial, not JSON
✗ chore: rotate residential IPs
✗ fix: playUrl expires after an hour
✗ fix: hashtags moved to textExtra
✗ hotfix: rate-limit loop on every second request
✗ fix: pagination cursor format changed
✗ chore: keep the headless fleet warm
✗ fix: stats moved to statsV2, counts are strings
✗ chore: bump the request signing lib again
✓ feat: integrate HasData API
Code Examples

One GET Request. That's the whole integration.

Start with just a query. Add more parameters when your use case needs them.

request example
curl -G 'https://api.hasdata.com/scrape/tiktok/search' \
	--data-urlencode 'keyword=dance' \
	--header 'x-api-key: <YOUR_API_KEY>' \
	--header 'Content-Type: application/json'
keyword * Keyword
The phrase to search for on TikTok.
type Result Type
What to search for — videos or users. Defaults to video.
nextPageToken Next Page Token
Defines the next page token. Use the `nextPageToken` value returned by the previous response. Omit it to fetch the first page.
TRY ALL 3 PARAMETERS FREE
AI Integration

Add TikTok Scraper API with your AI agent

Paste a ready-to-use integration prompt into your coding agent. It includes API references, setup requirements, and testing instructions.

tiktok-scraper-integration.md
# Integrate HasData TikTok Scraper API

## Task

Add the requested public-video discovery, account-post collection, or user-search workflow to this project using HasData TikTok Scraper API.
Inspect project instructions, the server-side runtime, existing HTTP client, and tests first.
Follow the project's conventions and preserve unrelated code. No new SDK is required.
Implement only the requested workflow. If the workflow is unclear, ask whether the user needs keyword video search, user search, account posts, or a specified combination.
Keep the integration as REST API calls; do not replace it with an MCP connection or a custom TikTok scraper.

## References

Read the endpoint documentation before implementing:

- Keyword video or user search: https://docs.hasdata.com/apis/tiktok/search.md
- Account posts: https://docs.hasdata.com/apis/tiktok/posts.md
- Error handling: https://docs.hasdata.com/api-codes.md
- Documentation index: https://docs.hasdata.com/llms.txt
- Full documentation (fallback): https://docs.hasdata.com/llms-full.txt

Start with the endpoint reference. Use `llms.txt` to find additional pages.
Use `llms-full.txt` only when needed; extract relevant sections instead of loading everything into context.
If a `.md` reference is unavailable, try its HTML URL without `.md`.
If it is still unavailable, ask for the missing documentation rather than guessing.

## Optional agent skill

If the official `hasdata` skill is already available, use its relevant guidance.
Otherwise, if this agent supports skills, ask before installing it in this project:

```sh
npx skills add hasdata/agent-skills --skill hasdata
```

Run from the project directory and select the coding agent in use.
The `hasdata-cli` skill is not required. If installation is declined or unsupported, continue with the docs.
Flag conflicts between skill guidance and current API docs rather than guessing.

## Implementation

- For keyword discovery, use `GET https://api.hasdata.com/scrape/tiktok/search` with required `keyword`. Use the documented `type=video` or `type=user` when mode selection is needed; video is the default.
- For account videos, use `GET https://api.hasdata.com/scrape/tiktok/posts` with required `handle`, with or without `@`. Implement only the modes the user requested.
- Encode query parameters with the project HTTP client. A literal hashtag must reach the API as part of `keyword`, not as a URL fragment. Exact hashtag matching is application filtering.
- Preserve the response modes: video search uses `videos`, account retrieval uses `posts`, and user search uses `users`. Do not assume all modes have the same record shape.
- Keep account, video, and sound IDs as strings. Handle absent captions, hashtags, mentions, music, and optional media URLs.
- For requested pagination, pass the returned `pagination.nextPageToken` as `nextPageToken` for the same query and mode when `pagination.hasMore` is true. Treat tokens as opaque strings and deduplicate by record ID. Do not invent offsets or automatically fetch all pages.
- Keep plays, likes, comment counts, shares, and saves distinct. Comment counts do not include comment text. Do not label plays as unique reach or infer conversions.
- Campaign selection, engagement formulas, publication calendars, sound grouping, scheduling, and historical comparisons belong to application code. Save query context and observation times when comparing results.
- Sound titles can repeat across distinct sound IDs. Attribution and returned media URLs do not grant reuse rights; signed media URLs may expire.
- Profile and posts links on search authors are separate API requests. Do not expand them automatically. Returned pages are not guaranteed exhaustive archives or platform-wide trend measurements.
- Handle timeouts and documented errors before reading data. Keep requests server-side. If no suitable runtime exists, discuss options before changing the architecture.

## Credentials

- Implement the integration and mocked tests without requiring a live API key.
- Read `HASDATA_API_KEY` from the project's existing environment or secret store and send it as `x-api-key`.
- If the key is missing before live verification, ask the user to configure it from https://app.hasdata.com/api-keys.
- Never ask the user to paste the key into chat. Check only that it is configured, without printing its value.
- Never put the key in browser code, logs, or version control. Add only a placeholder to the project's example configuration.
- If using a local `.env` file, make sure it is gitignored.
- Send the key only to `https://api.hasdata.com`. Never forward it to documentation, TikTok, media links, bio links, or redirects to another origin.

## Verification

- Add mocked tests for query encoding, mode-specific response parsing, pagination context, duplicate IDs, success, empty results, missing fields, timeouts, and errors. Include a literal hashtag and a terminal page without a continuation token. Include a usage example and run local checks.
- With a configured key and explicit user approval, including approval already given for this task, make one live verification request with agreed inputs. A successful TikTok request consumes 10 credits.
- Verify one requested endpoint and mode only; cover the remaining modes with mocked tests.
- Validate the HTTP status, documented API status, and response structure. An empty result set can be valid.
- Do not automatically repeat paid requests to obtain a nonempty response or follow pagination during this check.
- Report changed files, setup commands, and test results. State separately whether live verification passed, failed, or was skipped.
- Ask before deploying.

Use Cases

What you can build with TikTok Scraper API

Build content research, campaign reports and creator discovery tools from TikTok search results and account videos.

Find content ideas around a TikTok topic

Explore keyword search results and related hashtags to guide content briefs and topic research.

  • Keyword: dance
Hashtags on returned videos Search result excerpts
Hashtags on returned videos — Search result excerpts
CreatorHashtags
ghhmg56154466#dancechallenge, #dailyvibes, #danceedit, #trendingnow
byronbrunerie#dance, #dancer, #dancers, #danseur, #danseurs
41_huh_67#dance, #colorfulhair, #birthday, #fyp
API data
videos[].idvideos[].hashtags[]videos[].author.usernamevideos[].url
Your app
Group returned videos by hashtag and review examples relevant to your brief within the collected search results.
Explore response fields

Search results are a sample for the requested keyword. Hashtag frequency here does not measure platform-wide popularity.

Compare performance across campaign videos

Compare plays, likes, comments and shares on selected account videos to build campaign performance reports.

  • @tiktok
  • #songsofthesummer2026
Videos carrying the same campaign hashtag Account video counters
Videos carrying the same campaign hashtag — Account video counters
Video IDPlaysLikesShares
7680721699171601694280,10012,1001,182
7680996287877008670394,10051,8003,670
7681309378095353118181,5006,8791,080
API data
posts[].idposts[].hashtags[]posts[].playsposts[].likesposts[].commentsposts[].shares
Your app
Select campaign posts in your application and compare their returned counters using the same observation window.
Explore response fields

Campaign grouping is application logic. Plays and reactions do not establish unique reach, conversions or revenue.

Review an account’s publishing cadence

Arrange account videos by publication time and duration to plan content calendars and review posting patterns.

  • @tiktok
Publication times and video lengths Publication record excerpts
Publication times and video lengths — Publication record excerpts
Video IDPublished at (UTC)Seconds
76807216991716016942026-09-02T00:03:08.000Z56
76809962878770086702026-09-02T17:48:58.000Z59
76813093780953531182026-09-03T14:03:39.000Z67
API data
posts[].idposts[].createTimeposts[].durationposts[].url
Your app
Sort collected posts by timestamp, choose a display timezone and calculate publishing intervals in your application.
Explore response fields

These are three saved posts, not a complete account history. Fetch additional pages only when the workflow needs them.

Compare sounds used in discovered videos

Use sound IDs, titles and author names to organize audio research across collected TikTok videos.

  • Keyword: dance
Audio attached to returned videos Sound metadata excerpts
Audio attached to returned videos — Sound metadata excerpts
Sound IDTitleAuthor
7685287918411205389original soundghhmg56154466
7614989103603436310son originalByron.brn
7654387739047938049YOP1K NAE & ASN JAYBOOG
API data
videos[].idvideos[].music.idvideos[].music.titlevideos[].music.authorName
Your app
Group videos by sound ID in your application and count occurrences within your collected dataset.
Explore response fields

Sound attribution does not grant reuse rights or measure platform-wide trends. Identical titles can have different sound IDs.

Build a creator list from relevant videos

Collect author handles from topic searches to find creators whose published content matches your research.

  • Keyword: dance
Creators in the collected search results Authors from search results
Creators in the collected search results — Authors from search results
Account IDHandleDisplay name
7615310982085280781ghhmg56154466ghhmg56154466
126093087860252672byronbrunerieByron.brn
727767933771194475041_huh_67bug
API data
videos[].author.idvideos[].author.usernamevideos[].author.nicknamevideos[].author.hasdataLink
Your app
Deduplicate authors by account ID; make separate profile requests only when your creator research needs more detail.
Response

Search videos or explore an account

Explore search videos, account posts, sound attribution and engagement counts. Use returned pagination tokens to continue collecting results.

videos.json

From the search endpoint: keyword or hashtag results from across TikTok.

[
  {
    "id": "7675122879293410591",
    "description": "Have you ever wondered what each shoe is made for? 🤭🏃‍♀️ should …",
    "hashtags": [
      "runner",
      "running",
      "runningshoes",
      "marathontraining",
      "runningshoesexplained"
    ],
    "createTime": "2026-08-17T21:56:58.000Z",
    "url": "https://www.tiktok.com/@saramontoyar/video/7675122879293410591",
    "duration": 36,
    "ratio": "720p",
    "coverUrl": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/…",
    "playUrl": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast8/tos-use…",
    "downloadUrl": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast5/tos-use…",
    "author": {
      "id": "7330816931056845866",
      "username": "saramontoyar",
      "nickname": "Sara🏃‍♀️Runner&Gym Girl",
      "hasdataLink": "https://api.hasdata.com/scrape/tiktok/profile?handle=saramontoya…",
      "hasdataPostsLink": "https://api.hasdata.com/scrape/tiktok/posts?handle=saramontoyar"
    },
    "music": {
      "id": "7128257885397583874",
      "title": "Naughty Girl",
      "authorName": "Beyoncé",
      "playUrl": "https://sf19.tiktokcdn-us.com/obj/tos-alisg-ve-2774/cbe9585cb0eb…"
    },
    "likes": 495,
    "comments": 31,
    "shares": 36,
    "plays": 10600,
    "collects": 137,
    "reposts": 0
  }
]
Fields in videos
id string

Video id, the number after /video/ in the URL

description string

Caption text as posted, absent when the video has no caption

hashtags string[]

Tags parsed out of the caption, without the #. Absent when the caption has none

mentions string[]

@-mentions parsed from the caption, present when the caption has one

createTime string

Upload time, ISO 8601

url string

Video URL

duration number

Length in seconds

ratio / width / height string, number

Quality label as TikTok reports it, such as 720p, with the pixel size. The label is missing on some videos

coverUrl / dynamicCoverUrl string

Still and animated thumbnails

playUrl / downloadUrl string

Playable and downloadable video URLs, when TikTok exposes them for that video

author object

id, username and nickname, plus verified when the account carries the badge

music object

id and title always, plus authorName, original and playUrl when TikTok returns them

likes / comments / shares number

Engagement counters

plays / collects / reposts number

Views and saves. reposts is present but comes back 0

author.hasdataLink / hasdataPostsLink string

Ready-made calls for that account's profile and its videos. Search results only

What We Offer

The hard parts already happened

JS rendering, signed URL refresh and residential proxy rotation run on our side. Your code sends one GET and reads fields.

Loved by developers

Teams that deleted their scraper

Now it's the part of the pipeline they don't think about

4.8 ★★★★★
across 100+ reviews on 5 platforms
Trustpilot Trustpilot ★★★★★

HasData delivers exactly what we need: speed and comprehensive search features. It's the fastest API we've used in this space. Plus, their customer support is fantastic.

Denver Sinclair
Denver Sinclair
Capterra Capterra ★★★★★

We rely on HasData for search performance data and broader scraping needs. Their APIs deliver highly structured data that integrates directly into our platforms.

JN
Jacob N.
Trustpilot Trustpilot ★★★★★

Great web scraping API which is incredibly easy to use. It requires minimal effort to get up and running, and the documentation is very clear and helpful.

Arnold Foster
Arnold Foster
Trustpilot Trustpilot ★★★★★

I needed to scrape some information they didn't already support, and they wrote the code for me right away, which was super nice of them.

Hussein Ali
Hussein Ali
Clutch Clutch ★★★★★

We were particularly impressed with how easily we could integrate HasData into our existing workflow.

TB
Taras Bazyshyn
CEO at BAZTDL Sp. z o.o
Pricing

Plans that get cheaper at scale

Fixed price, fixed volume, no surprises at the end of the month. Upgrade when you need more.

Free
$0 /mo
Free forever
100 scrapes / month
1,000 credits / month
1 concurrent request
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Community support
Start free
Startup
$49 /mo
$2.46 / 1k scrapes
20K scrapes / month
200K credits / month
5 concurrent requests
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Email support
Get started
Basic
Recommended
$99 /mo
$0.99 / 1k scrapes
100K scrapes / month
1M credits / month
15 concurrent requests
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Priority email support
Get started
Growth
$208 /mo
$0.69 / 1k scrapes
3M credits / month
50 concurrent requests
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Dedicated account manager
Get started
Monthly scrape volume
Free 100K 500K 2M
Best fit
Basic
scrapes / mo
100K
Concurrency
15
$ / 1k scrapes
$0.99
$99 /mo
Get Started
Enterprise
Custom price based on required volume

Past 20M credits a month, or terms the self-serve plans do not cover. We shape the contract around your workload.

Credits rollover
Unused credits carry into the next billing period.
Concurrency 2000+
Parallel request limits set to your peak load.
#1 request priority
Highest speed, always first in the queue.
Personal manager
A direct line to the founding team.
SSO
SAML single sign-on for the whole team.
Security review
Security questionnaire, DPA, and controls overview.
Talk to sales Quote within one business day
FAQ

Questions, answered

1 Grab your API key 2 Send a GET request 3 Get structured JSON

Your first scrape
is minutes away

100 scrapes free · no credit card