Harvest every follower of your TikTok account into a clickable, filterable Excel spreadsheet — display names, usernames, stats, bios, and content categories. All public data, no scraping shortcuts.
A Claude Code recipe that uses the Playwright MCP plugin to log into TikTok, scroll through every follower in your followers modal, and enrich each one with public profile stats. The output is a clean Excel workbook with autofilter, clickable profile links, and follower buckets by content type — so you can sort, filter, and actually use the list instead of just admiring the number.
Nothing is scraped from behind a login. Step 3 opens your followers list (which is public on your own profile anyway), and the enrichment in Step 6 hits the same public profile pages anyone with the link can see.
| Column | What It Holds |
|---|---|
| A — Follow Order | Chronological number, newest follower = highest |
| B — Name | Display name as a clickable HYPERLINK to the profile |
| C — Username | @handle |
| D — Followers | Their follower count |
| E — Videos | Total videos posted |
| F — Content Type | Bucket (AI / Tech, Gaming, Business, Art, Music…) — filterable |
| G — Bio | Their TikTok bio text |
| H — Verified | Blue check yes/no |
| I — Following | Who they follow |
| J — Hearts | Total likes received across their videos |
ThreadPoolExecutor fetches each public profile page, regex-extracts the embedded JSON blob, and pulls stats (followers, videos, hearts, bio, verified).openpyxl: clickable name column, frozen header row, autofilter enabled, count columns number-formatted. Done.openpyxl (pip install openpyxl)logged in.Filter by Content Type. Click the dropdown arrow in column F to show just "AI / Tech" followers, or "Gaming" creators, etc.
Sort chronologically. Sort by column A — ascending for oldest first, descending for newest.
~2-3% of profiles come back blank. These are private, restricted, or deleted accounts that TikTok no longer serves stats for. Their row still exists with just the username.
Privacy. Only reads what's already public. The follower list is visible to anyone visiting your profile. No login required for the enrichment step.
This recipe ships as a single README — the prompt block inside is what you paste into Claude Code. Copy either panel below.
# TikTok Followers → Spreadsheet
Harvest every follower of your TikTok account into a clickable, filterable Excel spreadsheet.
**Output columns:** Follow Order (chronological), Name (clickable link), Username, Followers, Videos, Content Type (filterable), Bio, Verified, Following, Hearts.
**Time:** ~5-10 minutes for a 2,000-follower account.
## Prerequisites
- Claude Code with the **Playwright MCP** plugin enabled
- Python 3 with `openpyxl` (`pip install openpyxl`)
- A TikTok account you can log into
## How to run
Paste the prompt below into a fresh Claude Code session. When Claude opens a browser, log in to TikTok in that window, then return to chat and say "logged in".
---
## The prompt
```
Harvest my TikTok followers into an Excel spreadsheet. Steps:
1. Open https://www.tiktok.com/login via Playwright MCP. Wait until I say "logged in" before continuing. (Install the browser first if needed: npx @playwright/mcp install-browser chrome-for-testing)
2. After I confirm, evaluate this in the page to detect my username from the URL:
location.href.match(/@([\w.\-_]+)/)[1]
3. Navigate to https://www.tiktok.com/@<my_username>. Click the clickable parent of `strong[data-e2e="followers-count"]` to open the Followers modal. Wait 2 seconds.
4. Find the scroll container inside the modal: query all elements where computed `overflow-y` is `auto` or `scroll`, pick the one with the largest scrollHeight containing `a[href^="/@"]` children. Auto-scroll loop: set scrollTop = scrollHeight, wait 900ms, repeat until child count is stable for 4 rounds.
5. Extract each follower from the container's `<li>` children:
- profile_url = "https://www.tiktok.com" + a[href^="/@"].getAttribute('href').replace(/\?.*$/, '')
- username = `[class*="PUniqueId"]`.textContent
- display_name = `[class*="SpanNickname"]`.textContent
Save to followers_raw.csv with columns: username, display_name, profile_url.
6. Write a Python script (followers_raw.csv → followers_enriched.csv) that for each profile URL fetches the page with a real browser User-Agent header (e.g. "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0 Safari/537.36"), regex-extracts the contents of `<script id="__UNIVERSAL_DATA_FOR_REHYDRATION__">`, parses as JSON, and reads `data["__DEFAULT_SCOPE__"]["webapp.user-detail"]["userInfo"]` to get:
- user: nickname, signature (bio), verified, privateAccount
- stats: followerCount, followingCount, videoCount, heart
Run with `ThreadPoolExecutor(max_workers=8)`. No login required for this step — these are public profile pages. Stream rows to CSV as they complete. Report errors but continue.
7. Build the final spreadsheet with openpyxl. Merge followers_raw.csv (preserves original order) with followers_enriched.csv (joined by username). Add a "Follow Order" column where the most recent follower (first row of raw CSV) gets the highest number (total_followers) and the oldest follower gets 1. Classify each bio with a regex keyword-bucket list — examples: "AI / Tech" → /ai|claude|gpt|prompt|developer|engineer|tech/i ; "Gaming" → /gaming|gamer|twitch|esports/i ; "Business" → /entrepreneur|founder|ceo|startup/i ; "Art" → /artist|painter|illustration/i ; "Music" → /music|musician|singer|dj/i ; "Comedy" → /comedy|comedian|funny/i ; "Pets/Animals" → /dog|cat|pets|animals/i ; "Fitness" → /fitness|gym|trainer|workout/i ; etc. Default to "No content / lurker" if videoCount = 0 and bio empty, else "Creator: <bio excerpt>".
Final column layout (in this order):
A: Follow Order (number)
B: Name → `=HYPERLINK("<profile_url>","<display_name>")` (clickable)
C: Username (with @ prefix)
D: Followers
E: Videos
F: Content Type
G: Bio
H: Verified
I: Following
J: Hearts (likes)
Freeze the header row, enable autofilter on the whole range, format count columns with #,##0. Save as TIKTOK_FOLLOWERS.xlsx. Open the file when done.
Watch for: stale class names (TikTok randomizes CSS classes — always use `[class*="..."]` partial matches or data-e2e attributes), and the followers modal click target is the parent div of the count, not the strong tag itself.
```
---
## Tips
- **Filtering by Content Type:** Click the dropdown arrow in column F to filter — e.g. show only "AI / Tech" followers, or "Gaming" creators.
- **Sorting back to chronological order:** Sort by column A ascending (oldest first) or descending (newest first).
- **Follower count fields are blank for ~2-3% of profiles** — these are private/restricted/deleted accounts that TikTok no longer serves stats for. Their row still exists with just their username.
- The "Follow Order" reflects **TikTok's display order** in the followers modal — empirically chronological (newest first) but not formally guaranteed by TikTok.
## Privacy note
This tool only reads what's already public on TikTok. The follower list is visible to anyone who visits your profile. No login is required for the enrichment step (only for opening the followers modal in step 3).
Harvest my TikTok followers into an Excel spreadsheet. Steps:
1. Open https://www.tiktok.com/login via Playwright MCP. Wait until I say "logged in" before continuing. (Install the browser first if needed: npx @playwright/mcp install-browser chrome-for-testing)
2. After I confirm, evaluate this in the page to detect my username from the URL:
location.href.match(/@([\w.\-_]+)/)[1]
3. Navigate to https://www.tiktok.com/@<my_username>. Click the clickable parent of `strong[data-e2e="followers-count"]` to open the Followers modal. Wait 2 seconds.
4. Find the scroll container inside the modal: query all elements where computed `overflow-y` is `auto` or `scroll`, pick the one with the largest scrollHeight containing `a[href^="/@"]` children. Auto-scroll loop: set scrollTop = scrollHeight, wait 900ms, repeat until child count is stable for 4 rounds.
5. Extract each follower from the container's `<li>` children:
- profile_url = "https://www.tiktok.com" + a[href^="/@"].getAttribute('href').replace(/\?.*$/, '')
- username = `[class*="PUniqueId"]`.textContent
- display_name = `[class*="SpanNickname"]`.textContent
Save to followers_raw.csv with columns: username, display_name, profile_url.
6. Write a Python script (followers_raw.csv → followers_enriched.csv) that for each profile URL fetches the page with a real browser User-Agent header (e.g. "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0 Safari/537.36"), regex-extracts the contents of `<script id="__UNIVERSAL_DATA_FOR_REHYDRATION__">`, parses as JSON, and reads `data["__DEFAULT_SCOPE__"]["webapp.user-detail"]["userInfo"]` to get:
- user: nickname, signature (bio), verified, privateAccount
- stats: followerCount, followingCount, videoCount, heart
Run with `ThreadPoolExecutor(max_workers=8)`. No login required for this step — these are public profile pages. Stream rows to CSV as they complete. Report errors but continue.
7. Build the final spreadsheet with openpyxl. Merge followers_raw.csv (preserves original order) with followers_enriched.csv (joined by username). Add a "Follow Order" column where the most recent follower (first row of raw CSV) gets the highest number (total_followers) and the oldest follower gets 1. Classify each bio with a regex keyword-bucket list — examples: "AI / Tech" → /ai|claude|gpt|prompt|developer|engineer|tech/i ; "Gaming" → /gaming|gamer|twitch|esports/i ; "Business" → /entrepreneur|founder|ceo|startup/i ; "Art" → /artist|painter|illustration/i ; "Music" → /music|musician|singer|dj/i ; "Comedy" → /comedy|comedian|funny/i ; "Pets/Animals" → /dog|cat|pets|animals/i ; "Fitness" → /fitness|gym|trainer|workout/i ; etc. Default to "No content / lurker" if videoCount = 0 and bio empty, else "Creator: <bio excerpt>".
Final column layout (in this order):
A: Follow Order (number)
B: Name → `=HYPERLINK("<profile_url>","<display_name>")` (clickable)
C: Username (with @ prefix)
D: Followers
E: Videos
F: Content Type
G: Bio
H: Verified
I: Following
J: Hearts (likes)
Freeze the header row, enable autofilter on the whole range, format count columns with #,##0. Save as TIKTOK_FOLLOWERS.xlsx. Open the file when done.
Watch for: stale class names (TikTok randomizes CSS classes — always use `[class*="..."]` partial matches or data-e2e attributes), and the followers modal click target is the parent div of the count, not the strong tag itself.