Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APIApple Music

    apple_music.album

    One album in Apple's music catalogue with its tracks: artist, release date, genre, copyright line, and each track's length and preview.

    Id
    apple_music.album
    Version
    1
    Billed per
    request — 1 unit for a charged run
    Runs
    within one request

    Start it with POST /v1/scrapers/apple_music.album/runs. How runs work is in Running a scraper; what a run costs is in Usage and units.

    Inputs

    The fields of input. A field that is not listed here is refused.

    Inputs of apple_music.album
    FieldTypeDescription
    album_idstringApple's id of the album: the number at the end of its address, e.g. 1708308989.Limit: matches ^[0-9]{1,20}$.
    urlstringThe album's address instead, e.g. https://music.apple.com/us/album/1989-taylors-version/1708308989; its storefront is the one read.Limit: at most 2048 characters.
    countrystringWith album_id: the storefront, as a two-letter country code. us when not given.

    Record fields

    Every record of a run has these fields. A value that is not known is null — never an empty string and never 0.

    Record fields of apple_music.album
    FieldTypeNotes
    album_idstringApple's id of the album: the number at the end of its address.
    namestringThe album's title.
    urlstring or nullThe album's page on Apple Music, in the storefront read.
    artist_namestring or nullThe artist, as credited.
    artist_idstring or nullApple's id of the artist; null where Apple gives none (a compilation).
    artist_urlstring or nullThe artist's page on Apple Music.
    genrestring or nullThe main genre, as Apple names it in the storefront.
    release_datestring (date-time) or nullThe release date, in UTC.
    track_countinteger or nullHow many tracks Apple says the album has.
    explicitboolean or nullTrue when Apple marks the album explicit.
    copyrightstring or nullThe copyright line, e.g. "℗ 2023 Taylor Swift".
    pricenumber or nullThe price to buy the album in the storefront; null when it is not sold.
    currencystring or nullThe ISO currency code of the prices.
    artworkstring or nullThe cover, 100 by 100 pixels.
    tracksarray of objectThe album's tracks, in order of disc and number.
    track_id (in tracks[])stringApple's id of the track.
    name (in tracks[])stringThe track's title.
    artist_name (in tracks[])string or nullThe artist, as credited on the track.
    disc_number (in tracks[])integer or nullThe disc the track is on, from 1.
    track_number (in tracks[])integer or nullThe track's number on its disc.
    duration_ms (in tracks[])integer or nullThe length in milliseconds.
    explicit (in tracks[])boolean or nullTrue when Apple marks the track explicit.
    kind (in tracks[])string or nullWhat the track is, in Apple's word: song, or music-video.
    url (in tracks[])string or nullThe track's page on Apple Music.
    preview_url (in tracks[])string or nullThe address of Apple's audio preview.
    price (in tracks[])number or nullThe price to buy the track alone; null when it is sold only with the album.
    streamable (in tracks[])boolean or nullTrue when the track can be streamed on Apple Music.
    countrystringThe storefront read, as a two-letter country code in lower case.
    fetched_atstring (date-time)When the album was read, in UTC.

    Example request

    # Start a run and wait up to 60 seconds for it to finish
    curl -X POST "https://api.enrichednow.com/v1/scrapers/apple_music.album/runs?wait=60" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"url":"https://music.apple.com/us/album/abbey-road-remastered/1441164426"}}'
    
    # Read its records, with the id the first call answered
    curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
    from enrichednow import EnrichedNow
    
    client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY
    
    # Start a run, wait for it to end, and get its records
    result = client.scrape("apple_music.album", {
        "url": "https://music.apple.com/us/album/abbey-road-remastered/1441164426",
    })
    print(result.run.id, result.run.status, result.run.record_count)
    
    # Read its records: pages are fetched as you go
    for record in result.records:
        print(record)

    Install it with pip install enrichednow, then save as run.py and run python3 run.py

    import EnrichedNow from "enrichednow";
    
    const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
    
    // Start a run, wait for it to end, and get its records
    const { run, records } = await client.scrape("apple_music.album", {
      url: "https://music.apple.com/us/album/abbey-road-remastered/1441164426",
    });
    console.log(run.id, run.status, run.record_count);
    
    // Read its records: pages are fetched as you go
    for await (const record of records) console.log(record);

    Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

    package main
    
    import (
    	"context"
    	"fmt"
    	"log"
    	"time"
    
    	enrichednow "github.com/enrichednow/enrichednow-go"
    )
    
    func main() {
    	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
    	if err != nil {
    		log.Fatal(err)
    	}
    	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
    	defer cancel()
    
    	// Start a run, wait for it to end, and get its records
    	run, records, err := client.Scrape(ctx, "apple_music.album", map[string]any{"url": "https://music.apple.com/us/album/abbey-road-remastered/1441164426"})
    	if err != nil {
    		log.Fatal(err)
    	}
    	fmt.Println(run.ID, run.Status, run.RecordCount)
    
    	// Read its records: pages are fetched as you go
    	for records.Next() {
    		fmt.Println(string(records.Current()))
    	}
    	if err := records.Err(); err != nil {
    		log.Fatal(err)
    	}
    }

    Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

    import com.enrichednow.EnrichedNowClient;
    import com.enrichednow.ScrapeResult;
    import java.util.Map;
    
    public class Run {
        public static void main(String[] args) {
            EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
    
            // Start a run, wait for it to end, and get its records
            ScrapeResult result = client.scrape("apple_music.album", Map.of("url", "https://music.apple.com/us/album/abbey-road-remastered/1441164426"));
            System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
    
            // Read its records: pages are fetched as you go
            for (Map<String, Object> record : result.records()) {
                System.out.println(record);
            }
        }
    }

    Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

    enrichednow run apple_music.album --input url=https://music.apple.com/us/album/abbey-road-remastered/1441164426

    Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

    It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.

    The body on its own:

    JSON
    {
      "input": {
        "url": "https://music.apple.com/us/album/abbey-road-remastered/1441164426"
      }
    }

    Example response

    The run, once it has ended. A run that has not ended within wait comes back with 202 and the status queued or running.

    JSON
    {
      "id": "run_841742f37553189ff9c27ba1",
      "scraper_id": "apple_music.album",
      "scraper_version": 1,
      "status": "ok",
      "reason": null,
      "input": {
        "url": "https://music.apple.com/us/album/abbey-road-remastered/1441164426"
      },
      "record_count": 1,
      "units": 1,
      "units_per_request": 1,
      "units_per_record": null,
      "units_per_page": null,
      "diagnostics": {
        "requests": 1,
        "bytes": 259214,
        "wall_ms": 885,
        "facts": {}
      },
      "created_at": "2026-11-16T22:37:50.170950Z",
      "started_at": "2026-11-16T22:37:50.178331Z",
      "finished_at": "2026-11-16T22:37:51.066313Z"
    }

    Its records, from GET /v1/runs/{id}/records. The record is a real one: this scraper's own parser read it from a page recorded from the site.

    JSON
    {
      "records": [
        {
          "album_id": "1441164426",
          "name": "Abbey Road (Remastered)",
          "url": "https://music.apple.com/us/album/abbey-road-remastered/1441164426",
          "artist_name": "The Beatles",
          "artist_id": "136975",
          "artist_url": "https://music.apple.com/us/artist/the-beatles/136975",
          "genre": "Rock",
          "release_date": "1969-09-26T07:00:00Z",
          "track_count": 19,
          "explicit": false,
          "copyright": "This Compilation ℗ 2009 Calderstone Productions Limited (a division of Universal Music Group)",
          "price": 12.99,
          "currency": "USD",
          "artwork": "https://is1-ssl.mzstatic.com/image/thumb/Music112/v4/df/db/61/dfdb615d-47f8-06e9-9533-b96daccc029f/18UMGIM31076.rgb.jpg/100x100bb.jpg",
          "tracks": [
            {
              "track_id": "1441164430",
              "name": "Come Together",
              "artist_name": "The Beatles",
              "disc_number": 1,
              "track_number": 1,
              "duration_ms": 258947,
              "explicit": false,
              "kind": "song",
              "url": "https://music.apple.com/us/album/come-together/1441164426?i=1441164430",
              "preview_url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/v4/26/65/7c/26657c20-9fec-56d6-55ff-61a76996f19b/mzaf_6128091568231335556.plus.aac.p.m4a",
              "price": 1.29,
              "streamable": true
            },
            {
              "track_id": "1441164582",
              "name": "Something",
              "artist_name": "The Beatles",
              "disc_number": 1,
              "track_number": 2,
              "duration_ms": 182293,
              "explicit": false,
              "kind": "song",
              "url": "https://music.apple.com/us/album/something/1441164426?i=1441164582",
              "preview_url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/v4/5c/a4/c5/5ca4c55e-d3de-9945-b72f-7dd4874cf1ff/mzaf_4930102790747210494.plus.aac.p.m4a",
              "price": 1.29,
              "streamable": true
            }
          ],
          "country": "us",
          "fetched_at": "2026-11-19T18:07:38.414488Z"
        }
      ],
      "next_cursor": null
    }

    What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with … [truncated].

    • Shortened: tracks: 18 items, the first 2 shown.

    A run does not always end ok. Results and statuses lists every status and the reasons every scraper shares; the reasons of the Apple Music scrapers are in their own section there.