Skip to the content

Scraper API

Apple Music

apple_music.searchAvailable

Apple Music search

The matching songs, albums or artists: titles, artists, albums, genres, release dates, lengths, prices, preview and page addresses.

Give it a search query, what to look for (songs, albums or artists), and a country.

1 unit a run, for runs that return data. Runs that fail cost nothing. How units work

Counted
1 unit a run
Inputs
4, 1 required
Record
21 fields
A run takes
up to 5 minutes
Records kept
7 days
Measured
its success, on the status page

POST/v1/scrapers/apple_music.search/runs

{
"input": {
"query": "radiohead karma police"
}
}

sent, and answered

a record of the run21 fields

{
position: 1
type: "song"
id: "1097861836"
name: "Karma Police"
url: "https://music.apple.com/us/album/karma-police/1097861387?i=1097861836"
artist_name: "Radiohead"
artist_id: "657515"
album_name: "OK Computer"
album_id: "1097861387"
… 12 more fields

ok1 unit a run

A record this scraper returned for this input. The first 9 of its 21 fields are set down here; the whole record is below.

music.apple.com
The page Apple Music search reads, as a browser shows it
The page this scraper reads, photographed in a browser on 19 November 2026. It belongs to its publisher, who has no part in this service.

What it is used for

Match songs to Apple's catalogue
Search a title and an artist and keep the id, the album and the length of the result that fits, to link your own records to Apple Music.
Give listeners a sample
preview_url is the address of Apple's audio preview of a song, with its cover and length beside it, for a shop page, a review or a newsletter.
See what a storefront returns
Run the same query in several countries and compare which songs and albums come back, in what order and at what price.

What you send

A search query, what to look for (songs, albums or artists), and a country. These are its 4 inputs, as its schema has them.

querystring Required
What to search for: a title, an artist, or both, e.g. "radiohead karma police".
typestring Optional
What to look for: songs, albums or artists.Default song
countrystring Optional
The storefront, as a two-letter country code. Catalogue, genre names and prices are per storefront.Default us
max_resultsinteger Optional
Return at most this many results (up to 200).Default 25

A request, ready to send

It starts a run with the input shown at the top of this page, waits up to 60 seconds for it, and reads its records. Put your key in the variable it reads.

# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/apple_music.search/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"query":"radiohead karma police"}}'

# 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.search", {"query": "radiohead karma police"})
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.search", { query: "radiohead karma police" });
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.search", map[string]any{"query": "radiohead karma police"})
	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.search", Map.of("query", "radiohead karma police"));
        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.search --input 'query=radiohead karma police'

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

What comes back

The matching songs, albums or artists: titles, artists, albums, genres, release dates, lengths, prices, preview and page addresses. A record has 21 fields. One we could not read is null, never an empty string or a zero.

A record apple_music.search returned
{
  "position": 1,
  "type": "song",
  "id": "1097861836",
  "name": "Karma Police",
  "url": "https://music.apple.com/us/album/karma-police/1097861387?i=1097861836",
  "artist_name": "Radiohead",
  "artist_id": "657515",
  "album_name": "OK Computer",
  "album_id": "1097861387",
  "genre": "Alternative",
  "release_date": "1997-05-21T07:00:00Z",
  "duration_ms": 264067,
  "track_number": 6,
  "track_count": 12,
  "explicit": false,
  "price": 1.29,
  "currency": "USD",
  "preview_url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview211/v4/46/21/35/46213520-da4a-1806-0c59-5ca6ad008b4e/mzaf_5277404092043261430.plus.aac.p.m4a",
  "artwork": "https://is1-ssl.mzstatic.com/image/thumb/Music116/v4/07/60/ba/0760ba0f-148c-b18f-d0ff-169ee96f3af5/634904078164.png/100x100bb.jpg",
  "country": "us",
  "fetched_at": "2026-11-19T18:07:38.432577Z"
}

The scraper returned this record for the input above, reading a saved copy of the page, not the live site.

The fields of a record

positioninteger
The result's place among the returned results, from 1, in Apple's order.
typestring
What the result is.
idstring
Apple's id of the song, the album or the artist.
namestring
The song's or the album's title, or the artist's name.
urlstring or null
The result's page on Apple Music, in the storefront searched.
artist_namestring or null
The artist, as credited; null on an artist result (its name is the artist).
artist_idstring or null
Apple's id of the artist; null on an artist result and where Apple gives none (a compilation).
album_namestring or null
Songs: the album the song is on.
album_idstring or null
Songs: Apple's id of that album.
genrestring or null
The main genre, as Apple names it in the storefront.
release_datedatetime or null
Songs and albums: the release date, in UTC.
duration_msinteger or null
Songs: the length in milliseconds.
track_numberinteger or null
Songs: the song's number on its disc.
track_countinteger or null
Songs and albums: how many tracks the album has.
explicitboolean or null
Songs and albums: true when Apple marks it explicit, false when it marks it clean or not explicit.
pricenumber or null
Songs and albums: the price to buy it in the storefront; null when it is not sold separately.
currencystring or null
The ISO currency code of the price.
preview_urlstring or null
Songs: the address of Apple's audio preview.
artworkstring or null
Songs and albums: the cover, 100 by 100 pixels.
countrystring
The storefront searched, as a two-letter country code in lower case.
fetched_atdatetime
When the results were read, in UTC.

The whole schema, in its reference

Units and limits

Counted per request
Billed per request: a run that returns data costs 1 unit, however many records it returns.
A miss costs nothing
A run that fails, that meets something not supported yet, or that you cancel costs nothing. You pay for runs that return data.
What bounds a run
A run may take up to 5 minutes. Its records are read in pages of up to 1,000 and are kept for 7 days.

What it does not do

  • One run returns up to 200 results. There is no next page.
  • Catalogue, genre names and prices are the country's.
  • Playlists, lyrics and listening figures are not returned.

The bounds its schema sets

type
song, album, artist; song unless you say otherwise
max_results
1 to 200; 25 unless you say otherwise

Scraper API pricing: how units workThe five ways a run ends

Questions

What does Apple Music search return?

The matching songs, albums or artists: titles, artists, albums, genres, release dates, lengths, prices, preview and page addresses. A record has 21 fields, among them position, type, id, name, url and artist_name. A value that could not be read is null, never an empty string or a zero.

What do I send?

A search query, what to look for (songs, albums or artists), and a country. The input query is required. Optional: type, country and max_results.

How is it counted?

Billed per request: a run that returns data costs 1 unit, however many records it returns. A run that fails, that meets something not supported yet, or that you cancel costs nothing. The first 1,000 units each month are free.

How much does one run return?

Its schema sets these bounds: type song, album, artist (song unless you say otherwise); max_results 1 to 200 (25 unless you say otherwise). A run may take up to 5 minutes.

What does it not do?

One run returns up to 200 results. There is no next page. Catalogue, genre names and prices are the country's. Playlists, lyrics and listening figures are not returned.

How long are the records kept, and in what format do they come?

Records are kept for 7 days after the run ended, and read in pages of up to 1,000. They come as JSON, as NDJSON with one record a line, or as CSV with a column for each field.

Can an AI assistant call it?

Yes. Through the EnrichedNow MCP server an assistant calls the tool run_scraper with the scraper_id apple_music.search and the same input. It costs what the same API call costs.

Apple Music

Songs, albums and artists in Apple's music catalogue, by country, as Apple publishes them without a sign-in.

  • Apple Music album

    apple_music.album

    An album's id or its address on Apple Music, and a country. The album with its tracks: artist, release date, genre, copyright line and cover, and each track's number, length, preview and page address.

Apple Music on the line-up

Where
Worldwide

Run it on an input of your own.

Create an account, make a key, and send the request above with your own input. The first 1,000 units each month are free.