Skip to main content
skill CX Codex

scraping-tiktok-posts-by-music — Claude Code skill

Pulls TikTok posts built on one sound or track and returns their stats, creators and song metadata. Useful when you need to see who is using a piece of music.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add apidojo-io/apidojo-skills --skill scraping-tiktok-posts-by-music -a claude-code
Open on GitHub

What scraping-tiktok-posts-by-music does

The skill runs the apidojo/tiktok-music-scraper actor on Apify. Each post comes back with caption, views, likes, comments, shares, hashtags, channel details and song metadata such as id, title, artist and duration. You pass TikTok music page URLs in startUrls; maxItems caps the run. An optional customMapFunction lets you transform every output object with JavaScript.

Runs go through scripts/run_actor.js. Output lands in the console as a table, or in CSV and JSON via the --output and --format flags. There is a fallback: POST to https://api.apify.com/v2/acts/apidojo~tiktok-music-scraper/runs with your token in the Authorization header. With Apify MCP configured, the same actor can be called through the call_actor tool.

No Apify token means nothing runs — the REST path expects APIFY_TOKEN, and the MCP path expects a working Apify MCP setup. You also have to supply the sound URL yourself; a track name will not do. Trending sounds can return thousands of posts, so set maxItems before you start. A removed sound yields an empty dataset, and copyrighted audio can come back thinner in some regions.

What it helps with

  • collect every TikTok video using one sound
  • export posts with a given track to CSV
  • find creators who posted under the same audio
  • count views and likes for posts tied to a music URL
  • grab song metadata alongside post hashtags

Example prompts for the agent

  • Scrape TikTok posts for this sound: https://www.tiktok.com/music/Song-Title-123456, cap at 100
  • Export videos using this track to results.csv
  • Find the creators behind this sound and show their views and likes

How to install scraping-tiktok-posts-by-music

1Skills CLI (Vercel)

npx skills add apidojo-io/apidojo-skills --skill scraping-tiktok-posts-by-music -a claude-code

2Manually: put the files in place

~/.claude/skills/scraping-tiktok-posts-by-music/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/scraping-tiktok-posts-by-music/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about scraping-tiktok-posts-by-music

How do I install scraping-tiktok-posts-by-music in Claude Code?

Run npx skills add apidojo-io/apidojo-skills --skill scraping-tiktok-posts-by-music -a claude-code. The skill then sits at ~/.claude/skills/scraping-tiktok-posts-by-music/SKILL.md.

What does scraping-tiktok-posts-by-music do?

It calls the apidojo/tiktok-music-scraper actor on Apify with TikTok music page URLs and returns caption, views, likes, comments, hashtags, channel info and song metadata for each post.

What do I need before running it?

A TikTok sound page URL and an Apify token: the REST route needs APIFY_TOKEN, and the MCP route needs Apify MCP set up. Without the sound URL the run will not start.

Source text

SKILL.md · Apache-2.0
---
name: scraping-tiktok-posts-by-music
description: >
  Extracts TikTok posts using a specific audio track or sound using apidojo's TikTok Music
  Scraper on Apify. Triggers when the user asks to: get all TikTok videos using a specific sound,
  find TikTok posts using an audio clip, scrape TikTok videos using a trending music track, export
  TikTok posts made with a song, find creators using a specific sound, or collect TikTok content
  associated with a music URL. Returns video caption, views, likes, comments, channel info, song
  metadata, and hashtags per post. Ideal for music marketers, trend analysts, and viral sound trackers.
license: Apache-2.0
metadata:
  author: apidojo
  version: "1.0"
  apify-actor: apidojo/tiktok-music-scraper
---

# Scraping Tiktok Posts By Music

Raw data collection. No assumed use case — returns the full dataset for downstream analysis.

---

## Inputs

| Parameter | Type | Required | Default | Notes |
|-----------|------|----------|---------|-------|
| `startUrls` | array | ✅ | `[]` | TikTok music/sound page URLs |
| `maxItems` | number | Optional | Unlimited | Maximum posts to return |
| `customMapFunction` | string | Optional | — | JavaScript function to transform each output object |

## How to Run

### Using run_actor.js (recommended)

```bash
# Quick answer (table)
node scripts/run_actor.js --actor "apidojo~tiktok-music-scraper" --input '{"startUrls": ["https://www.tiktok.com/music/Song-Title-123456"], "maxItems": 100}'

# Save as CSV
node scripts/run_actor.js --actor "apidojo~tiktok-music-scraper" --input '{"startUrls": ["https://www.tiktok.com/music/Song-Title-123456"], "maxItems": 100}' --output results.csv --format csv

# Save as JSON
node scripts/run_actor.js --actor "apidojo~tiktok-music-scraper" --input '{"startUrls": ["https://www.tiktok.com/music/Song-Title-123456"], "maxItems": 100}' --output results.json --format json
```

### REST API fallback

```bash
curl -X POST "https://api.apify.com/v2/acts/apidojo~tiktok-music-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": ["https://www.tiktok.com/music/Song-Title-123456"], "maxItems": 100}'
```

If Apify MCP is available:
Use the Apify MCP `call_actor` tool with actor `apidojo~tiktok-music-scraper` and the input above.

---

## Output Fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | TikTok post ID |
| `title` | string | Post caption/text |
| `views` | number | View count |
| `likes` | number | Like count |
| `comments` | number | Comment count |
| `shares` | number | Share count |
| `hashtags` | array | Hashtags used in post |
| `channel.name` | string | Creator display name |
| `channel.username` | string | Creator @username |
| `channel.verified` | boolean | Verification status |
| `uploadedAt` | number | Upload timestamp (Unix) |
| `video.url` | string | Video file URL |
| `video.duration` | number | Duration in seconds |
| `song.id` | string | Sound/music ID |
| `song.title` | string | Sound title |
| `song.artist` | string | Sound artist |
| `song.duration` | number | Sound duration |

## Edge Cases

- **No music URL**: Requires TikTok sound page URL. Tell user to find the sound on TikTok and copy the URL.
- **Copyrighted sound**: May have fewer results in some regions.
- **Trending sound**: May return thousands of posts — use maxItems to cap.
- **Sound removed**: Returns empty dataset.

© apidojo · Apache-2.0 · apidojo-io/apidojo-skills

Similar skills

All skills for Browser and scraping →

From the same set57

analyzing-competitor-instagram-content-strategy This skill pulls a competitor's recent Instagram posts and shows which formats and themes earn them engagement. Useful when you need to read someone else's content plan. CX Codex +1 796installs extracting-youtube-comments-for-research Pulls YouTube comments from videos and channels through Apify, then sorts them into themes, questions and sentiment. Useful when you need to know what viewers actually say. CX Codex +1 794installs finding-instagram-ugc-creators-for-brands Finds Instagram creators for UGC campaigns and ranks them by engagement, niche signals, and profile data. CX Codex +1 794installs finding-youtube-micro-influencers Finds YouTube channels under 100k subscribers in a given niche and ranks them by view-to-subscriber ratio. Built for sponsorship deals and affiliate programs. CX Codex +1 793installs monitoring-vc-investor-activity-on-twitter This skill pulls investor tweets through apidojo's scraper, classifies the accounts and scores deal signals. Useful when you are raising. CX Codex +1 789installs scraping-instagram-posts-by-hashtag Collects Instagram posts by hashtag through Apify, including author and engagement data. Use it for trend research, UGC collection, or tag-based exports. CX Codex +1 787installs tracking-twitter-thought-leaders Finds Twitter/X accounts whose posts on a topic actually get shared, then hands back a ranked list for PR and partnerships. CX Codex +1 786installs finding-data-scientists-on-twitter Searches Twitter for data scientists and ML engineers who may fit a hiring pipeline, then enriches profiles with skills and work-interest signals. CX Codex +1 786installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor