# Integrate HasData TikTok Profile API
## Task
Add the requested public-profile lookup workflow to this project using HasData TikTok Profile 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 which handles and profile fields the application needs.
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:
- Public profile lookup, parameters, and response: https://docs.hasdata.com/apis/tiktok/profile.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
- Use `GET https://api.hasdata.com/scrape/tiktok/profile` with required `handle`. Accept the documented handle format, with or without `@`; encode it as a query parameter.
- Read the `profile` object. Preserve account IDs as strings and distinguish `username`, `nickname`, and `biography`.
- Treat `bioLink`, verification, business flags, and other optional fields as optional. An absent flag is unknown unless current documentation explicitly defines it.
- Keep follower, following, like, and video counts as separate observations. Follower counts are not follower lists; language and biographies do not establish audience demographics.
- If the requested workflow compares changes, store observation times and snapshots in the application. This endpoint does not return historical growth, schedules, alerts, or a computed engagement rate.
- Returned `hasdataLink` points to a separate posts request. Do not fetch it automatically or treat posts as part of this profile response.
- Handle absent or unavailable public accounts and expiring avatar URLs. Do not turn missing fields into invented contact details or zero values.
- 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 handle validation and encoding, success, missing optional fields, unavailable accounts, timeouts, and errors. Cover ID string preservation and any requested snapshot comparison. 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 only the requested profile handle.
- 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.TikTok Profile Scraper API
for any public account, by handle
Look up any public TikTok account by handle. One request returns the bio, the link in bio, follower and like counts, and the video count as clean JSON. No login, no access tokens, no headless browsers.
of requests succeed
median response
95% finish faster
per 1k profile lookups at volume
TikTok hides the counts. Your code shouldn't care.
- A redirect instead of the profile payload
- Counts abbreviated to 1.2M in the DOM
- Rate limits after a few dozen handles
- Rotating residential IPs
- Payload keys that move between releases
One GET Request. That's the whole integration.
Start with just a query. Add more parameters when your use case needs them.
TikTok Profile Scraper API
curl -G 'https://api.hasdata.com/scrape/tiktok/profile' \
--data-urlencode 'handle=nasa' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'handle * TikTok HandleAdd TikTok Profile 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.
What you can build with TikTok Profile API
Build creator shortlists, profile directories and audience reports with public account details and counters.
Find accounts that fit your creator brief
Compare public bios, verification and follower counts to shortlist TikTok creators for partnerships.
- @nasa
| Handle | Bio | Followers |
|---|---|---|
| nasa | Making the seemingly impossible, possible.✨ | 1,717,639 |
- API data
profile.usernameprofile.biographyprofile.verifiedprofile.followers- Your app
- Apply your topic and audience-size criteria to known handles, then review shortlisted accounts.
Connect account records to their public links
Keep a directory of links published in TikTok bios for brand and creator research.
- @nba
| Account | Bio link |
|---|---|
| NBA | https://nba.smart.link/wq8c68icm |
- API data
profile.usernameprofile.nicknameprofile.bioLink- Your app
- Save the returned bio link alongside the account; review the destination separately when your workflow requires it.
Track changes in public account counts
Build follower and activity reports by comparing profile snapshots your application saves over time.
- @nasa
- One saved snapshot
| Metric | Observed count |
|---|---|
| Followers | 1,717,639 |
| Total likes | 8,942,520 |
| Public videos | 44 |
- API data
profile.idprofile.followersprofile.likesprofile.videos- Your app
- Schedule lookups in your application, record observation times and calculate changes between snapshots for the same account ID.
Keep creator records consistent across tools
Enrich CRM or research records with public TikTok account IDs, handles, display names and verification status.
- @nasa
| Field | Value |
|---|---|
| Account ID | 7664638705177150477 |
| Handle | nasa |
| Display name | NASA |
| Verified | true |
- API data
profile.idprofile.usernameprofile.nicknameprofile.verified- Your app
- Match records by the returned account ID and update display fields using your existing CRM or database workflow.
The whole profile, one predictable schema
Explore profile identity, audience counts and links to account posts. Optional fields, including bioLink, depend on the account.
profile
{
"id": "134941634731003904",
"username": "nba",
"nickname": "NBA",
"biography": "Join us as we recap the best plays, performances and moments of …",
"bioLink": "https://nba.smart.link/wq8c68icm",
"verified": true,
"followers": 27193368,
"follows": 267,
"likes": 1134770282,
"videos": 22966,
"friends": 154,
"language": "en",
"createTime": "2016-08-30T08:01:48.000Z",
"avatarUrl": "https://p16-common-sign.tiktokcdn-eu.com/tos-maliva-avt-0068/8be…",
"hasdataLink": "https://api.hasdata.com/scrape/tiktok/posts?handle=nba"
}username stringHandle, as in the profile URL
nickname stringDisplay name
biography stringBio text
bioLink stringLink in bio, when the account has one
commerceUser booleanPresent on business accounts, which is how you tell a brand from a person
verified booleanVerified badge, present only on verified accounts
followers / follows numberFollower and following counts
likes numberTotal likes across the account
videos numberNumber of public videos
friends numberMutual follows
language stringAccount language
createTime stringAccount creation time, ISO 8601
avatarUrl / avatarThumbUrl stringAvatar CDN URLs
id / secUid stringNumeric and opaque account ids
hasdataLink stringReady-made call that returns this account's videos
The hard parts already happened
JS rendering, embedded-payload parsing and residential proxy rotation run on our side. Your code sends one GET and reads fields.
Discover similar
scrapers and APIs
to expand your projects.
TikTok Scraper API
Videos Data • $0.83 / 1k Request
Instagram Profile Scraper API
Social Media Intelligence • $0.83 / 1k Request
Fits right into your stack.
Works with the tools you already use.
View Documentation ->Teams that deleted their scraper
Now it's the part of the pipeline they don't think about
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.
We rely on HasData for search performance data and broader scraping needs. Their APIs deliver highly structured data that integrates directly into our platforms.
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.
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.
We were particularly impressed with how easily we could integrate HasData into our existing workflow.
Plans that get cheaper at scale
Fixed price, fixed volume, no surprises at the end of the month. Upgrade when you need more.
Free
Startup
Basic
RecommendedGrowth
Monthly profile lookup volume
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. Past 20M credits a month, or need terms the self-serve plans do not cover? We shape the contract, concurrency, and support around your workload.
HasData accesses publicly available data only. TikTok's terms may restrict automated access; you are responsible for compliance. Where data includes personal information, ensure a lawful basis under GDPR/CCPA.
Questions, answered
Per successful request. One request returns one full profile. A failed request costs nothing.
Yes. The free plan renews 1,000 credits every month, covering up to 100 profile lookups. No credit card required.
With monthly billing, paid plans start at $59 per month for up to 20,000 profile lookups and scale to 2,000,000 lookups a month. The unit price drops with volume, from $2.95 down to $0.83 per 1,000 lookups.
The nickname, bio, link in bio, verification status, follower and following counts, total likes, video count, account language, creation date, and avatar URLs. The link in bio and the business-account flag come back only when the account has them.
No. The response carries the follower and following counts as numbers, not the accounts behind them.
Yes. The response returns total likes, video count and follower count, so average likes per video divided by followers gives you the rate. HasData hands back the raw numbers rather than a computed rate, so the formula stays yours.
Not in this response. The profile comes back with a hasdataLink, a ready-made call to the videos endpoint for the same handle, and those videos live on the TikTok Scraper API.
Yes. Pass the handle from the URL. tiktok.com/@nasa becomes handle=nasa.
The API returns an error response, and you are not charged for it.
No. Requests run on HasData's infrastructure, so there's nothing to provision or maintain. You're responsible for using the results in line with each target site's terms and applicable law.
Your first TikTok profile snapshot
is minutes away
100 profile lookups free · no credit card