YouTube Music Song Scraper avatar

YouTube Music Song Scraper

Pricing

from $2.99 / 1,000 songs

Go to Apify Store
YouTube Music Song Scraper

YouTube Music Song Scraper

Search YouTube Music songs, browse Music playlists and pages, and extract rich returned song and player metadata with pagination.

Pricing

from $2.99 / 1,000 songs

Rating

0.0

(0)

Developer

w3crawler

w3crawler

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 days ago

Last modified

Categories

Features

Limited permissions

Share

Collect source-backed song records from public YouTube search results and public YouTube Music or YouTube watch, playlist, and browse pages. Each row identifies a video, its artists and album when exposed, duration, displayed views, badges, thumbnails, channel, rank, and extraction provenance. Optional public watch-page metadata adds description, dates, caption-language summaries, and format counts when YouTube exposes them.

Get started

  1. Open the Actor Store page and select Try for free or open the Input tab.
  2. Enter one or more searchQueries, or supply public startUrls such as a YouTube Music song, playlist, or browse page. Search runs first when both are supplied.
  3. Keep maxItems and maxPages small for the first run. Leave includePlayerDetails enabled if you want optional watch-page metadata.
  4. Start the Actor, open the dataset, and export the records as JSON, CSV, or Excel. Open Run summary (OUTPUT) to check the outcome and counts.

Input

All fields are optional, but supply either searchQueries or startUrls for a useful run. Unsupported field names and out-of-range values are rejected before requests start.

FieldTypeRequired?DefaultMeaning
searchQueriesstring arrayOptionalNot supplied (prefill ["Adele Hello"])Song or music-video search terms parsed from public YouTube results pages; up to 50 entries of 1–200 characters.
startUrlsstring arrayOptionalNot suppliedPublic YouTube or YouTube Music watch, playlist, or browse URLs; up to 100 entries.
maxItemsintegerOptional20Maximum unique songs saved across the run, 1–100.
maxPagesintegerOptional3Maximum public search pages per query, 1–10.
maxRetriesintegerOptional1Retries after a failed public page request, 0–3.
requestTimeoutSecsintegerOptional60Timeout per public page request, 15–180 seconds.
requestDelayMsintegerOptional250Pacing delay between public page requests, 0–5000 ms.
countryCodestringOptionalUSTwo-letter country context sent to public pages.
languageCodestringOptionalenLanguage context sent to public pages.
includePlayerDetailsbooleanOptionaltrueTry one public watch-page request per song for optional player metadata.
enableProxyFallbackbooleanOptionaltrueTry one configured Apify Proxy request after a direct public-page failure.
proxyConfigurationobjectOptional{"useApifyProxy":false}Optional account-authorized Apify Proxy or credential-free HTTP/SOCKS configuration.

Example input using the schema prefill and every default:

{
"searchQueries": ["Adele Hello"],
"maxItems": 20,
"maxPages": 3,
"maxRetries": 1,
"requestTimeoutSecs": 60,
"requestDelayMs": 250,
"countryCode": "US",
"languageCode": "en",
"includePlayerDetails": true,
"enableProxyFallback": true,
"proxyConfiguration": {
"useApifyProxy": false
}
}

The Actor reads ordinary rendered public pages and their embedded data. It does not sign in, call private APIs, follow signed media or caption URLs, or download media. Records are deduplicated by YouTube video ID across all sources.

Output

The dataset contains one row per unique song. Optional values are omitted when the source does not publish them; they are never inferred. No diagnostic or placeholder rows are written. The 2026-10-25 run saved two search results, and neither song returned usable player details, so player and playerTransport are absent from both rows.

FieldTypeAvailabilityMeaning
recordTypestringAlwaysRecord discriminator; always youtube_music_song.
videoIdstringAlways11-character YouTube video ID.
titlestringAlwaysPublic song or video title.
descriptionstringWhen publishedDescription from a browse or detail source page.
descriptionLengthintegerWhen publishedCharacter count of description.
accessibilityTextstringAlwaysAccessibility label exposed by the result renderer.
artistsobject arrayAlwaysArtist objects with name, and id and url when linked.
artiststringAlwaysFlattened artist label.
albumstringWhen publishedAlbum name exposed by a music renderer.
albumIdstringWhen publishedYouTube Music album browse identifier.
albumUrlstringWhen publishedPublic YouTube Music album URL derived from albumId.
durationstringAlwaysDisplayed duration, such as 6:07.
durationSecondsintegerAlwaysDuration parsed from the displayed label.
viewsintegerAlwaysDisplayed view count parsed to an integer.
viewsTextstringAlwaysView label exactly as displayed.
releaseDatestringWhen publishedRelease date exposed by a music renderer.
releaseYearintegerWhen publishedRelease year exposed by a music renderer.
publishedTimeTextstringAlwaysRelative publication label, such as 11y ago.
explicitbooleanAlwaysWhether the renderer displayed an explicit badge.
badgesstring arrayAlwaysPublic badges such as CC or Official Artist Channel.
thumbnailsobject arrayAlwaysThumbnail objects with url, width, and height when exposed.
thumbnailUrlstringAlwaysPreferred public thumbnail URL.
thumbnailCountintegerAlwaysNumber of retained thumbnail variants.
channelNamestringAlwaysPublic channel or artist name.
channelIdstringAlwaysPublic channel identifier.
channelUrlstringAlwaysPublic channel URL.
youtubeMusicUrlstringAlwaysCanonical public YouTube Music watch URL.
youtubeUrlstringAlwaysCanonical public YouTube watch URL.
sourcestringAlwaysSource family: search, browse, or detail.
searchQuerystringWhen search-sourcedQuery used for a search-sourced record.
sourceUrlstringAlwaysExact public page URL used for extraction.
resultSourcestringAlwaysEmbedded renderer family that supplied the card.
sourceTransportstringAlwaysTransport used; currently public-rendered-html.
extractionMethodstringAlwaysExtraction method label.
metadataSourcestringAlwaysPage family that supplied the card metadata.
metadataEnrichedbooleanAlwaysWhether the record was assembled from page metadata.
rankintegerAlwaysRun-level rank after deduplication.
sourceRankintegerAlwaysRank within the source page or query.
searchRankintegerWhen search-sourcedSearch-result rank.
pageintegerAlwaysPublic page number, starting at 1.
initialItemsExposedintegerAlwaysCandidate items exposed by the first page payload.
requestedMaxItemsintegerAlwaysRun-wide maxItems value.
continuationDetectedbooleanAlwaysWhether a continuation marker was present.
continuationCountintegerAlwaysNumber of continuation markers observed; they are not followed.
playerDetailsRequestedbooleanAlwaysWhether watch-page enrichment was requested.
playerDetailsAvailablebooleanAlwaysWhether watch-page metadata was attached.
playerDetailsStatusstringAlwaysavailable, unavailable, or not-requested.
playerTransportstringWhen publishedyoutube-public-watch-page when player metadata was requested.
playerobjectWhen publishedBounded public watch-page metadata.
languageCodestringAlwaysLanguage context sent to public pages.
countryCodestringAlwaysCountry context sent to public pages.
scrapedAtstringAlwaysTime the row was saved, in ISO UTC.

player contains title, description, descriptionLength, durationSeconds, viewCount, channelName, channelId, channelUrl, isLive, keywords, publishDate, uploadDate, category, tags, captions, captionCount, playabilityStatus, playabilityReason, hasVideo, hasAudio, formatCount, videoFormatCount, audioFormatCount, metadataSource, and extractionMethod when exposed. captions entries contain languageCode, name, kind, isAutoGenerated, and isTranslatable; signed caption URLs are not stored.

Full JSON output

This is the complete first saved row from the 2026-10-25 run. The second row has the same shape with rank, sourceRank, and searchRank equal to 2.

{
"recordType": "youtube_music_song",
"videoId": "YQHsXMglC9A",
"title": "Adele - Hello (Official Music Video)",
"accessibilityText": "Adele - Hello (Official Music Video) 6 minutes, 7 seconds",
"artists": [
{
"name": "Adele",
"id": "UCsRM0YB_dabtEPGPTKo-gcw",
"url": "https://www.youtube.com/channel/UCsRM0YB_dabtEPGPTKo-gcw"
}
],
"artist": "Adele",
"duration": "6:07",
"durationSeconds": 367,
"views": 3285179413,
"viewsText": "3,285,179,413 views",
"publishedTimeText": "11y ago",
"explicit": false,
"badges": [
"CC",
"Official Artist Channel"
],
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/YQHsXMglC9A/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCYksb2AuTQJoxzdDBflr8nzAY82Q",
"width": 360,
"height": 202
},
{
"url": "https://i.ytimg.com/vi/YQHsXMglC9A/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLC_8cd4gjocXHBSRXMlzxXyeRcyUg",
"width": 720,
"height": 404
}
],
"thumbnailUrl": "https://i.ytimg.com/vi/YQHsXMglC9A/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLC_8cd4gjocXHBSRXMlzxXyeRcyUg",
"thumbnailCount": 2,
"channelName": "Adele",
"channelId": "UCsRM0YB_dabtEPGPTKo-gcw",
"channelUrl": "https://www.youtube.com/channel/UCsRM0YB_dabtEPGPTKo-gcw",
"youtubeMusicUrl": "https://music.youtube.com/watch?v=YQHsXMglC9A",
"youtubeUrl": "https://www.youtube.com/watch?v=YQHsXMglC9A",
"source": "search",
"searchQuery": "Adele Hello",
"sourceUrl": "https://www.youtube.com/results?search_query=Adele+Hello&sp=EgIQAQ%3D%3D&hl=en&gl=US",
"resultSource": "ytInitialData.videoRenderer",
"sourceTransport": "public-rendered-html",
"extractionMethod": "youtube-public-page-embedded-initial-data",
"metadataSource": "youtube-public-search-page",
"metadataEnriched": true,
"rank": 1,
"sourceRank": 1,
"searchRank": 1,
"page": 1,
"initialItemsExposed": 20,
"requestedMaxItems": 2,
"continuationDetected": true,
"continuationCount": 1,
"playerDetailsRequested": true,
"playerDetailsAvailable": false,
"playerDetailsStatus": "unavailable",
"languageCode": "en",
"countryCode": "US",
"scrapedAt": "2026-10-25T20:49:52.620Z"
}

Run summary

Run summary is stored separately from the dataset in the run key-value store under OUTPUT.

FieldMeaning
runTypeSummary record discriminator.
statusActor outcome: SUCCEEDED or FAILED.
dataStatusSaved-data status: COMPLETE, PARTIAL, NO_RESULTS, or FAILED.
dataAvailableWhether at least one song row was saved.
sourceCountNumber of search queries plus start URLs.
sourcesWithItemsSources that produced at least one saved song.
searchPagesFetchedPublic search pages fetched successfully.
browsePagesFetchedPublic browse or playlist pages fetched successfully.
detailPagesFetchedPublic watch pages fetched for player metadata.
pageAttemptsAll page attempts, including retries.
itemCountSongs saved to the dataset.
diagnosticCountBounded operational issues recorded for the run.
failedCountFailed source requests or extractions.
blockedCountResponses classified as blocked or access-limited.
continuationDetectedWhether any page exposed a continuation marker.
continuationCountContinuation markers observed; they are not followed.
playerDetailsRequestedWatch-page enrichment attempts.
playerDetailsAvailableCountRecords with player metadata attached.
playerDetailsUnavailableCountRequested enrichments that returned no usable metadata.
proxyRequestedWhether proxy use or fallback was requested.
proxyConfiguredWhether an Apify Proxy configuration was resolved.
includeDiagnosticsWhether bounded diagnostics were recorded.
includePlayerDetailsWhether watch-page enrichment was enabled.
maxItemsRun-wide song cap.
maxPagesMaximum search pages per query.
maxRetriesRetries per public request.
requestDelayMsPacing delay between requests.
requestTimeoutSecsPer-request timeout.
languageCodeLanguage context used.
countryCodeCountry context used.
paginationMethodPagination method label.
extractionMethodEmbedded-data extraction method.
durationMsActor runtime in milliseconds.
finishedAtTime the summary was written, in ISO UTC.
runStatusCanonical run status; matches status.
StatusData statusMeaning
SUCCEEDEDCOMPLETEEligible songs were saved without a later extraction problem.
SUCCEEDEDPARTIALSongs were saved, but a later request failed. Saved rows remain available.
SUCCEEDEDNO_RESULTSThe run completed cleanly and found no matching songs.
FAILEDFAILEDA fatal error occurred before any song was saved.

Example OUTPUT from the 2026-10-25 run:

{
"runType": "youtube-public-music-song-run",
"status": "SUCCEEDED",
"dataStatus": "COMPLETE",
"dataAvailable": true,
"sourceCount": 1,
"sourcesWithItems": 1,
"searchPagesFetched": 1,
"browsePagesFetched": 0,
"detailPagesFetched": 0,
"pageAttempts": 5,
"itemCount": 2,
"diagnosticCount": 2,
"failedCount": 0,
"blockedCount": 0,
"continuationDetected": true,
"continuationCount": 1,
"playerDetailsRequested": 2,
"playerDetailsAvailableCount": 0,
"playerDetailsUnavailableCount": 2,
"proxyRequested": false,
"proxyConfigured": false,
"includeDiagnostics": true,
"includePlayerDetails": true,
"maxItems": 2,
"maxPages": 1,
"maxRetries": 1,
"requestDelayMs": 0,
"requestTimeoutSecs": 60,
"languageCode": "en",
"countryCode": "US",
"paginationMethod": "bounded-public-page-pagination",
"extractionMethod": "youtube-public-page-embedded-initial-data",
"durationMs": 6253,
"finishedAt": "2026-10-25T20:49:58.092Z",
"runStatus": "SUCCEEDED"
}

Coverage and limitations

Search uses the ordinary public YouTube results page with its video filter, not a YouTube Music catalog search. Direct start URLs are parsed from one public page each; playlist and browse URLs expose whatever cards that page returns. rank and sourceRank describe order in the collected page or query, not chart popularity or play counts.

The saved 2026-10-25 run returned two rows but no usable watch-page metadata: both optional player requests were unavailable, which explains diagnosticCount: 2 and playerDetailsAvailableCount: 0. The song rows remain valid. Player metadata, album fields, release dates, and captions are only present when the public response exposes them.

Continuation markers are reported but not followed. maxItems is a run-wide cap across all queries and URLs, and duplicate video IDs are removed. Locale parameters are context hints, not proof of regional availability. The Actor does not log in, solve CAPTCHAs, bypass access controls, store signed media or caption URLs, or download media. Blocked, empty, or partial responses are reported in OUTPUT and logs rather than written as dataset rows.

Usage and support

Cost depends on Apify compute, the number of search and start pages, and optional watch-page requests. Each saved song can trigger one additional request when includePlayerDetails is enabled. Keep maxItems, maxPages, and the query list small while testing, then scale gradually. See the Actor's Pricing tab for current account rates.

Use the Actor Issues page to report a problem. Include the run ID, the input used, and the OUTPUT summary; do not include tokens, cookies, or private data. This Actor is not affiliated with, endorsed by, or sponsored by YouTube, Google, or YouTube Music. Use it only for public data and in accordance with the source's terms, robots guidance, and applicable law. Public pages can contain personal information; use the output only for lawful purposes.