# YouTube Music Albums Scraper 🎵 (`easyapi/youtube-music-albums-scraper`) Actor

Scrape YouTube Music albums data including titles, artists, thumbnails, release years and playlist URLs. Perfect for music data collection, market research and content analysis.

- **URL**: https://apify.com/easyapi/youtube-music-albums-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Social media, Integrations, Other
- **Security:** Limited permissions
- **Stats:** 7 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## YouTube Music Albums Scraper 🎵

Powerful scraper for extracting detailed album information from YouTube Music. Get comprehensive data about albums, artists, and playlists in structured format.

### 🎯 Use Cases

- Music industry research and analysis
- Track artist discographies
- Build music recommendation systems
- Monitor new album releases
- Create music databases
- Analyze music trends over time

### ✨ Features

- Search multiple keywords/artists
- Extract detailed album metadata
- Get high-quality album artwork
- Collect artist information
- Generate direct playlist URLs
- Customizable results limit
- Clean, structured JSON output

### 🔍 Output Data

For each album, you'll get:

- Album title
- Artist name and channel ID
- Release year
- Album artwork (multiple resolutions)
- Playlist ID and direct URL
- Artist channel URL
- Timestamp of data collection

### 💡 Input Parameters

- `keywords`: Array of search terms (artist names, album titles etc.)
- `maxItems`: Maximum number of albums to scrape per keyword (default: 50)

### 🚀 Tips

- Use specific artist names for more focused results
- Adjust maxItems based on your needs
- Data is perfect for importing into spreadsheets or databases
- Results are real-time and constantly updated

### 📝 Notes

- Respects YouTube Music's terms of service
- Uses stealth techniques to avoid blocking
- Handles rate limiting automatically
- Clean, structured data format

Need help? Feel free to reach out through Apify Console! 🤝

#### Input Example

A full explanation of an input example in JSON.

```json
{
    "keywords": [
        "u2"
    ],
    "maxItems": 50
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```json
[
    {
        "keyword": "u2",
        "data": {
            "title": "The Best Of 1980 - 1990",
            "thumbnails": [
                {
                    "url": "https://lh3.googleusercontent.com/j_nk5AC3XuQsS4GITQmmL9Jr45ZImsS1enhsfNPkIeqZqonm7mrt7kL7vMvMkN3q5SgXXkW_XefxK5dOwQ=w60-h60-l90-rj",
                    "width": 60,
                    "height": 60
                },
                {
                    "url": "https://lh3.googleusercontent.com/j_nk5AC3XuQsS4GITQmmL9Jr45ZImsS1enhsfNPkIeqZqonm7mrt7kL7vMvMkN3q5SgXXkW_XefxK5dOwQ=w120-h120-l90-rj",
                    "width": 120,
                    "height": 120
                },
                {
                    "url": "https://lh3.googleusercontent.com/j_nk5AC3XuQsS4GITQmmL9Jr45ZImsS1enhsfNPkIeqZqonm7mrt7kL7vMvMkN3q5SgXXkW_XefxK5dOwQ=w226-h226-l90-rj",
                    "width": 226,
                    "height": 226
                },
                {
                    "url": "https://lh3.googleusercontent.com/j_nk5AC3XuQsS4GITQmmL9Jr45ZImsS1enhsfNPkIeqZqonm7mrt7kL7vMvMkN3q5SgXXkW_XefxK5dOwQ=w544-h544-l90-rj",
                    "width": 544,
                    "height": 544
                }
            ],
            "type": "Album",
            "artist": {
                "name": "U2",
                "id": "UCqIQRxCUGi7hyJisyzv9zYQ",
                "url": "https://music.youtube.com/channel/UCqIQRxCUGi7hyJisyzv9zYQ"
            },
            "year": "1998",
            "playlistId": "OLAK5uy_kufeZRgzCIzRql9vJUptlVQcoT3W3FTNU",
            "browseId": "MPREb_BbqUa7UXLpX",
            "playlistUrl": "https://music.youtube.com/playlist?list=OLAK5uy_kufeZRgzCIzRql9vJUptlVQcoT3W3FTNU"
        },
        "scrapedAt": "2025-02-09T09:57:41.866Z"
    },
    ...
]
```

### Related Actors

- 🎵 [YouTube Music Song Scraper](https://apify.com/easyapi/youtube-music-song-scraper) - Extract comprehensive song details from YouTube Music search results including title, artist, album info and play counts.
- 🎵 [YouTube Music Video Scraper](https://apify.com/easyapi/youtube-music-video-scraper) - Get video information from YouTube Music including titles, views, duration and channel details.
- 🎵 [YouTube Music Playlist Scraper](https://apify.com/easyapi/youtube-music-playlist-scraper) - Extract playlist data by keywords including title, thumbnail URLs, creator info and song count.
- 🎵 [YouTube Music Artist Scraper](https://apify.com/easyapi/youtube-music-artist-scraper) - Collect artist information including names, subscriber counts, channel IDs and thumbnails.
- 🎧 [YouTube Music Podcast Scraper](https://apify.com/easyapi/youtube-music-podcast-scraper) - Scrape podcast playlists data with titles, creators, thumbnails and playlist details.
- 🎵 [YouTube Music Profile Scraper](https://apify.com/easyapi/youtube-music-profile-scraper) - Extract channel profiles and details from music-related profiles on YouTube Music.
- 🎵 [All-in-One YouTube Music Scraper](https://apify.com/easyapi/all-in-one-youtube-music-scraper) - Comprehensive scraper for songs, videos, albums, artists, playlists and profiles.
- 📺 [YouTube Video Data Scraper](https://apify.com/easyapi/youtube-video-data-scraper) - Extract comprehensive video metadata for content analysis and research.
- 🔍 [Youtube Search Scraper](https://apify.com/easyapi/youtube-search-scraper) - Get search results data without logging into YouTube account.
- 📺 [YouTube Comments Scraper](https://apify.com/easyapi/youtube-comments-scraper) - Extract video comments with pagination support including text, author and timestamps.
- 🎥 [YouTube Video Metadata Scraper](https://apify.com/easyapi/youtube-video-metadata-scraper) - Get rich metadata from videos including title, views, likes and descriptions.
- 📊 [YouTube Video Statistics Scraper](https://apify.com/easyapi/youtube-video-statistics-scraper) - Extract comprehensive video statistics and metadata instantly.
- 📊 [YouTube Channel Statistics Scraper](https://apify.com/easyapi/youtube-channel-statistics-scraper) - Get channel statistics including subscriber count, views and video count.
- 🎥 [YouTube Channel ID Extractor](https://apify.com/easyapi/youtube-channel-id-extractor) - Convert YouTube channel URLs to channel IDs automatically.
- 🎥 [YouTube Trending Videos/Shorts Scraper](https://apify.com/easyapi/youtube-trending-videos-shorts-scraper) - Extract trending videos and shorts with comprehensive metadata.

# Actor input Schema

## `keywords` (type: `array`):

List of keywords to search for (e.g. artist names, album titles)

## `maxItems` (type: `integer`):

Maximum number of albums to scrape per keyword

## Actor input object example

```json
{
  "keywords": [
    "u2"
  ],
  "maxItems": 50
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("easyapi/youtube-music-albums-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("easyapi/youtube-music-albums-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call easyapi/youtube-music-albums-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,easyapi/youtube-music-albums-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rOLaT7OY8V9M5iYFm/builds/qm7ynipGaOkn6N0sw/openapi.json
