scraping-tiktok-posts-by-music
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.
Savant verdict: Review advised
Security analysis or source-hub review identified patterns requiring attention.
Live evaluation
Not evaluated yet. Workspaces can request a live evaluation.
Security assessment
Risk score
12/100
Recommendation
CAUTION
Severity
LOW
Savant decision
Passed (low risk)
The assessment recommended caution, but its risk score is below 20/100, so Savant's policy passes it. Its findings are still listed for review. Static security analysis completed.
3 patterns found
- Data Exfiltration: curl -X POST "https://api.apify.com/v2/acts/apidojo~tiktok-music-scraper/runs" \ -H "Authorization: Bearer $APIFY_TOKEN" \ -H "Content-Type: application/json" \ -dmedium · SKILL.md:49 · Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
- Data Exfiltration: https://api.apify.com/medium · SKILL.md:49 · Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
- Trigger Abuse: Overly Broad Triggerlow · SKILL.md:1 · Overly Broad Trigger: description clause 'Triggers when the user asks to' activates on 'to', which is too short and may match unintended inputs
Structure
- 1 referenced file isn't in the packagescripts/run_actor.js. They may be binary, too large to catalog, or missing upstream.
- The source hub's security checks flagged this skillGen Agent Trust Hub: warn (The skill is a TikTok scraping tool that uses the Apify platform. It features a capability to execute arbitrary JavaScript code via a 'customMapFunction' parameter for data transformation and relies on an external local script for operation.); Snyk: warn (Risk: MEDIUM · 1 issue)
SKILL.md
---
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.