mcpField
S
scraping-youtube-playlist

scraping-youtube-playlist

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

About scraping-youtube-playlist

scraping-youtube-playlist collects video metadata from YouTube playlists for downstream analysis. It accepts playlist URLs or search keywords and supports result limits and custom field mapping.

Key features

  1. 01Scrape playlists by URL or keyword
  2. 02Return video and channel metadata
  3. 03Limit the number of results
  4. 04Transform output with JavaScript
  5. 05Export results as CSV or JSON

Use cases

  1. 01Collect video data from a playlist
  2. 02Prepare playlist metadata for analysis

MCP support

When Apify MCP is available, call the `apidojo~youtube-playlist-scraper` actor with the desired inputs.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/apidojo-io/apidojo-skills --skill scraping-youtube-playlist

After installing, type/scraping-youtube-playlistin Claude Code to confirm it loaded.

Details

From the project README

Scraping Youtube Playlist

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


Inputs

ParameterTypeRequiredDefaultNotes
startUrlsarrayOptional[]YouTube playlist URLs
keywordsarrayOptional[]Search keywords to find playlists
glstringOptionalusCountry code (e.g. US)
hlstringOptionalenLanguage code (e.g. en)
sortstringOptionalrSort order
maxItemsnumberOptionalUnlimitedMaximum videos to return
customMapFunctionstringOptional—JavaScript function to transform each output object

How to Run

Using run_actor.js (recommended)
# Quick answer (table)
node scripts/run_actor.js --actor "apidojo~youtube-playlist-scraper" --input '{"startUrls": ["https://www.youtube.com/playlist?list=PLABCDE12345"], "maxItems": 50}'

# Save as CSV
node scripts/run_actor.js --actor "apidojo~youtube-playlist-scraper" --input '{"startUrls": ["https://www.youtube.com/playlist?list=PLABCDE12345"], "maxItems": 50}' --output results.csv --format csv

# Save as JSON
node scripts/run_actor.js --actor "apidojo~youtube-playlist-scraper" --input '{"startUrls": ["https://www.youtube.com/playlist?list=PLABCDE12345"], "maxItems": 50}' --output results.json --format json
REST API fallback
curl -X POST "https://api.apify.com/v2/acts/apidojo~youtube-playlist-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": ["https://www.youtube.com/playlist?list=PLABCDE12345"], "maxItems": 50}'

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


Output Fields

FieldTypeDescription
typestringAlways video
idstringVideo ID
titlestringVideo title
urlstringVideo URL
descriptionstringVideo description
durationnumberDuration in seconds
viewsnumberView count
likesnumberLike count
statusstringAvailability status
channel.idstringChannel ID
channel.namestringChannel name
channel.urlstringChannel URL
keywordsarrayVideo tags/keywords
isLivebooleanLive stream flag
isPrivatebooleanPrivate flag
thumbnailsarrayThumbnail objects

Edge Cases

  • Private playlist: Returns 0 results. Tell user the playlist is private.
  • Deleted playlist: Returns error or empty. Check URL.
  • Very large playlist: Use maxItems to cap results and avoid long run times.
  • Mix playlist (YouTube auto-generated): May behave differently than user-created playlists.

Comments

Markdown supported