mcpField
S
scraping-tiktok-profile-data

scraping-tiktok-profile-data

github.com/apidojo-ioData & databases1866 installsUpdated 24w ago
Repository

About scraping-tiktok-profile-data

A skill for collecting profile statistics from batches of TikTok usernames, intended for social media research. It runs an Apify scraper and returns account metadata and video-related counts.

Key features

  1. 01Batch TikTok profile lookup
  2. 02Follower and following counts
  3. 03Likes, bio, and video count
  4. 04Date and post limits
  5. 05JSON or CSV output

Use cases

  1. 01Compare statistics across creator accounts
  2. 02Build a TikTok profile dataset
  3. 03Review profile details for selected usernames

MCP support

Can run the Apify scraper through the Apify MCP server when available; it can also use the provided script or REST API.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/apidojo-io/apidojo-skills --skill scraping-tiktok-profile-data

After installing, type/scraping-tiktok-profile-datain Claude Code to confirm it loaded.

Details

From the project README

Scraping TikTok Profile Data

Bulk account-level statistics for any set of TikTok usernames. Returns follower counts, engagement totals, bio, and video count.

Prerequisites

  • APIFY_TOKEN environment variable set
  • Optional: Apify MCP server installed

Inputs

ParameterTypeRequiredDefaultNotes
startUrlsarrayOptional[]TikTok profile URLs
usernamesarrayOptional[]TikTok usernames (without @)
sincestringOptional—Return posts after this date (YYYY-MM-DD)
untilstringOptional—Return posts before this date (YYYY-MM-DD)
maxItemsnumberOptionalUnlimitedMaximum posts to return
customMapFunctionstringOptional—JavaScript function to transform each output object

Workflow

Progress:
- [ ] Step 1: Normalize username list
- [ ] Step 2: Run tiktok-profile-scraper
- [ ] Step 3: Poll for SUCCEEDED
- [ ] Step 4: Deliver profile dataset
Step 2: Run the Actor

Recommended — run_actor.js (handles waiting, output, and file saving automatically):

# Quick answer (prints table to chat)
node scripts/run_actor.js \
  --actor "apidojo~tiktok-profile-scraper" \
  --input '{"param": "value"}'

# Save as CSV
node scripts/run_actor.js \
  --actor "apidojo~tiktok-profile-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.csv --format csv

# Save as JSON
node scripts/run_actor.js \
  --actor "apidojo~tiktok-profile-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.json --format json

APIFY_TOKEN must be set in environment or .env file.

If Apify MCP is available:

Tool: apify:run-actor
Actor: "apidojo~tiktok-profile-scraper"
Input:
{
  "usernames": ["creator1", "creator2"]
}

REST API fallback:

curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~tiktok-profile-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"usernames": ["creator1", "creator2"]}'

Save id as RUN_ID. Poll until status = SUCCEEDED:

curl "https://api.apify.com/v2/actor-runs/$RUN_ID?token=$APIFY_TOKEN" | grep '"status"'

Fetch results:

curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN&format=json"
Step 3: Handle Edge Cases
  • Account not found: Username banned, deleted, or changed. Flag in output.
  • Private account: Returns 0 video count with profile metadata — mark isPrivate: true.
  • Batch > 500: Split into smaller batches for reliability.

Output Format

# TikTok Profile Dataset
Accounts requested: N | Returned: N | Not found: N

| Username | Followers | Following | Total Likes | Videos | Bio (truncated) | Verified |
|----------|-----------|-----------|-------------|--------|-----------------|----------|
| ...      | ...       | ...       | ...         | ...    | ...             | ...      |

Available fields: username, nickname, followerCount, followingCount, heartCount,
videoCount, signature, verified, bioLink, avatarUrl

Troubleshooting

Missing accounts: Username may have changed — verify on TikTok directly. Stale follower counts: TikTok data may lag 24–48 hours; re-run for fresh data.

Comments

Markdown supported