# Apple Music API

> Apple Music returns album, artist, song search, and chart data as a workflow and API.

Get artist returns an artist profile, latest release, top songs, and albums; provide an artist name or link, with optional country and album count. Search songs matches title or artist words; List top charts returns chart entries by country. Provide a search query or chart and country.

- Page: https://fous.com/workflows/apple-music
- Handle: `@apple-music`
- Category: [Entertainment](https://fous.com/workflows/category/entertainment)
- Source website: https://music.apple.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Apple Music.

## Methods

### Get album

Operation `get_album`, version 1. 1 credit per call.

Find an Apple Music album by title and optional artist, or by album link. Returns its matched release, purchase details, and tracks in order. Record label is shown only when identifiable from the copyright notice; some albums have no price or previews.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `album` | string | yes | `"Rumours"` | Album name or Apple Music album link, for example Rumours or https://music.apple.com/us/album/rumours/594061854. |
| `artist` | string | no | `"Fleetwood Mac"` | Artist to match, for example Fleetwood Mac. |
| `country` | string | no | `"United Kingdom"` | Country name or two-letter code for the music catalog, for example United States or GB. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "album"
  ],
  "properties": {
    "album": {
      "type": "string",
      "description": "Album name or Apple Music album link, for example Rumours or https://music.apple.com/us/album/rumours/594061854.",
      "examples": [
        "Rumours",
        "https://music.apple.com/us/album/rumours/594061854",
        "21"
      ]
    },
    "artist": {
      "type": "string",
      "default": "",
      "description": "Artist to match, for example Fleetwood Mac.",
      "examples": [
        "Fleetwood Mac",
        "Adele"
      ]
    },
    "country": {
      "type": "string",
      "default": "United States",
      "description": "Country name or two-letter code for the music catalog, for example United States or GB.",
      "examples": [
        "United Kingdom"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "album": "Rumours",
      "artist": "Fleetwood Mac"
    },
    {
      "album": "https://music.apple.com/us/album/rumours/594061854"
    },
    {
      "album": "21",
      "artist": "Adele",
      "country": "United Kingdom"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `genre` | string or null | `"Rock"` | Album genre. |
| `artist` | string or null | `"Fleetwood Mac"` | Matched performing artist. |
| `tracks` | array |  | Tracks in disc and track order. |
| `tracks[].title` | string or null | `"Second Hand News"` | Track title. |
| `tracks[].length` | string or null | `"2:56"` | Track duration in m:ss. |
| `tracks[].track_id` | integer or null | `594061855` | Apple Music track ID. |
| `tracks[].preview_link` | string or null | `"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview211/v4/4f/69/e6/4f69e68c-224c-39ce-e80c-6015940fb338/mzaf_` | 30-second preview link, if available. |
| `tracks[].track_number` | integer or null | `1` | Track number on its disc. |
| `tracks[].apple_music_link` | string or null | `"https://music.apple.com/us/album/second-hand-news/594061854?i=594061855"` | Apple Music track page link. |
| `tracks[].length_milliseconds` | integer or null | `176307` | Track duration in milliseconds. |
| `album_id` | integer or null | `594061854` | Apple Music album ID. |
| `explicit` | string or null | `"no"` | Whether the album is marked explicit: yes or no. |
| `copyright` | string or null | `"℗ 2004 Warner Records Inc."` | Album copyright notice. |
| `album_title` | string or null | `"Rumours"` | Matched album title. |
| `itunes_price` | number or null | `10.99` | Album purchase price in iTunes, if available. |
| `record_label` | string or null | `"Warner Records Inc."` | Record label when the listed rights holder names a recording label. |
| `release_date` | string or null | `"1977-02-04"` | Release date, YYYY-MM-DD. |
| `total_length` | string or null | `"39 minutes 57 seconds"` | Total duration of the listed tracks. |
| `currency_code` | string or null | `"USD"` | Currency of the iTunes price. |
| `cover_art_link` | string or null | `"https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/4d/13/ba/4d13bac3-d3d5-7581-2c74-034219eadf2b/081227970949.jpg/120` | Cover art image link. |
| `apple_music_link` | string or null | `"https://music.apple.com/us/album/rumours/594061854"` | Apple Music album page link. |
| `number_of_tracks` | integer or null | `11` | Number of album tracks. |
| `total_length_milliseconds` | integer or null | `2396893` | Total duration in milliseconds. |

**Example input**

```json
{
  "album": "Rumours",
  "artist": "Fleetwood Mac"
}
```

**Example output**

```json
{
  "genre": "Rock",
  "artist": "Fleetwood Mac",
  "tracks": [
    {
      "title": "Second Hand News",
      "length": "2:56",
      "track_id": 594061855,
      "preview_link": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview211/v4/4f/69/e6/4f69e68c-224c-39ce-e80c-6015940fb338/mzaf_8292619002307513028.plus.aac.p.m4a",
      "track_number": 1,
      "apple_music_link": "https://music.apple.com/us/album/second-hand-news/594061854?i=594061855",
      "length_milliseconds": 176307
    },
    {
      "title": "Dreams",
      "length": "4:18",
      "track_id": 594061856,
      "preview_link": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview211/v4/d4/37/e7/d437e72a-c41b-332c-f196-bee295a9d673/mzaf_11574904347171701919.plus.aac.p.m4a",
      "track_number": 2,
      "apple_music_link": "https://music.apple.com/us/album/dreams/594061854?i=594061856",
      "length_milliseconds": 257800
    },
    {
      "title": "Never Going Back Again",
      "length": "2:14",
      "track_id": 594061857,
      "preview_link": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview211/v4/cc/40/a3/cc40a34c-abd6-9d92-0550-334961e8d97f/mzaf_3772783327912029759.plus.aac.p.m4a",
      "track_number": 3,
      "apple_music_link": "https://music.apple.com/us/album/never-going-back-again/594061854?i=594061857",
      "length_milliseconds": 134400
    }
  ],
  "album_id": 594061854,
  "explicit": "no",
  "copyright": "℗ 2004 Warner Records Inc.",
  "album_title": "Rumours",
  "itunes_price": 10.99,
  "record_label": "Warner Records Inc.",
  "release_date": "1977-02-04",
  "total_length": "39 minutes 57 seconds",
  "currency_code": "USD",
  "cover_art_link": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/4d/13/ba/4d13bac3-d3d5-7581-2c74-034219eadf2b/081227970949.jpg/1200x1200bb.jpg",
  "apple_music_link": "https://music.apple.com/us/album/rumours/594061854",
  "number_of_tracks": 11,
  "total_length_milliseconds": 2396893
}
```

### Get artist

Operation `get_artist`, version 1. 1 credit per call.

Get an Apple Music artist profile by name or artist link, including the latest release, top songs and albums. Very prolific artists may have older albums beyond the public catalog's listing limit.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `artist` | string | yes | `"Billie Eilish"` | Artist name or Apple Music artist link, for example Billie Eilish or https://music.apple.com/us/artist/billie-eilish/1065981054. |
| `country` | string | no | `"United Kingdom"` | Country name or two-letter country code, for example United Kingdom or GB. |
| `max_albums` | integer | no | `5` | Maximum albums to return, for example 50 (up to 200). |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "artist"
  ],
  "properties": {
    "artist": {
      "type": "string",
      "description": "Artist name or Apple Music artist link, for example Billie Eilish or https://music.apple.com/us/artist/billie-eilish/1065981054.",
      "examples": [
        "Billie Eilish",
        "https://music.apple.com/gb/artist/taylor-swift/159260351",
        "Daft Punk"
      ]
    },
    "country": {
      "type": "string",
      "default": "United States",
      "description": "Country name or two-letter country code, for example United Kingdom or GB.",
      "examples": [
        "United Kingdom",
        "US"
      ]
    },
    "max_albums": {
      "type": "integer",
      "default": 50,
      "maximum": 200,
      "minimum": 1,
      "description": "Maximum albums to return, for example 50 (up to 200).",
      "x-fous-developer": true,
      "examples": [
        5,
        3
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "artist": "Billie Eilish"
    },
    {
      "artist": "https://music.apple.com/gb/artist/taylor-swift/159260351",
      "country": "United Kingdom",
      "max_albums": 5
    },
    {
      "artist": "Daft Punk",
      "country": "US",
      "max_albums": 3
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `albums` | array |  |  |
| `albums[].link` | string | `"https://music.apple.com/us/album/hit-me-hard-and-soft/1739659134"` |  |
| `albums[].title` | string | `"HIT ME HARD AND SOFT"` |  |
| `albums[].release_year` | integer or null | `2024` |  |
| `albums[].number_of_tracks` | integer or null | `11` |  |
| `top_songs` | array |  |  |
| `top_songs[].album` | string or null | `"dont smile at me"` |  |
| `top_songs[].title` | string or null | `"ocean eyes"` |  |
| `top_songs[].song_link` | string | `"https://music.apple.com/us/album/ocean-eyes/1440898929?i=1440899467"` |  |
| `top_songs[].preview_link` | string or null | `"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/v4/d6/59/2b/d6592b0b-1e7e-4743-b2e4-f2af038fd783/mzaf_` |  |
| `main_genre` | string or null | `"Alternative"` |  |
| `artist_name` | string | `"Billie Eilish"` |  |
| `latest_release` | object or null |  |  |
| `latest_release.title` | string | `"INTRO (HIT ME HARD AND SOFT TOUR) - Single"` |  |
| `latest_release.release_date` | string or null | `"2026-04-24"` |  |
| `apple_artist_id` | string | `"1065981054"` |  |
| `apple_music_link` | string | `"https://music.apple.com/us/artist/billie-eilish/1065981054"` |  |
| `artist_image_link` | string or null | `"https://is1-ssl.mzstatic.com/image/thumb/AMCArtistImages211/v4/e1/f3/6a/e1f36a60-9897-162d-3697-7501eeafbc3b/a1d41336-4` |  |

**Example input**

```json
{
  "artist": "Billie Eilish"
}
```

**Example output**

```json
{
  "albums": [
    {
      "link": "https://music.apple.com/us/album/hit-me-hard-and-soft/1739659134",
      "title": "HIT ME HARD AND SOFT",
      "release_year": 2024,
      "number_of_tracks": 11
    },
    {
      "link": "https://music.apple.com/us/album/happier-than-ever/1564530719",
      "title": "Happier Than Ever",
      "release_year": 2021,
      "number_of_tracks": 16
    }
  ],
  "top_songs": [
    {
      "album": "dont smile at me",
      "title": "ocean eyes",
      "song_link": "https://music.apple.com/us/album/ocean-eyes/1440898929?i=1440899467",
      "preview_link": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/v4/d6/59/2b/d6592b0b-1e7e-4743-b2e4-f2af038fd783/mzaf_7697277787797935735.plus.aac.p.m4a"
    },
    {
      "album": "HIT ME HARD AND SOFT",
      "title": "WILDFLOWER",
      "song_link": "https://music.apple.com/us/album/wildflower/1739659134?i=1739659144",
      "preview_link": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/v4/de/c3/e8/dec3e884-7237-9622-718a-12c5f48c5ca2/mzaf_3134455671785145822.plus.aac.p.m4a"
    }
  ],
  "main_genre": "Alternative",
  "artist_name": "Billie Eilish",
  "latest_release": {
    "title": "INTRO (HIT ME HARD AND SOFT TOUR) - Single",
    "release_date": "2026-04-24"
  },
  "apple_artist_id": "1065981054",
  "apple_music_link": "https://music.apple.com/us/artist/billie-eilish/1065981054",
  "artist_image_link": "https://is1-ssl.mzstatic.com/image/thumb/AMCArtistImages211/v4/e1/f3/6a/e1f36a60-9897-162d-3697-7501eeafbc3b/a1d41336-49bd-4212-8787-57547ca3f87e_ami-identity-ef10a72d4764d04743b17fa13520b756-2024-04-…"
}
```

### List top charts

Operation `list_top_charts`, version 1. 1 credit per call.

List the current top songs, albums, or music videos in chart order for a country. Countries without an Apple Music chart are unavailable.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `chart` | string | no | `"top_albums"` | Chart to list, for example top_albums. |
| `country` | string | no | `"Canada"` | Country name or two-letter code, for example Canada or CA. |
| `max_results` | integer | no | `8` | Number of entries, for example 25 (maximum 100). |

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "chart": {
      "enum": [
        "top_songs",
        "top_albums",
        "top_music_videos"
      ],
      "type": "string",
      "default": "top_songs",
      "description": "Chart to list, for example top_albums.",
      "examples": [
        "top_albums",
        "top_songs",
        "top_music_videos"
      ]
    },
    "country": {
      "type": "string",
      "default": "United States",
      "description": "Country name or two-letter code, for example Canada or CA.",
      "examples": [
        "Canada",
        "United States",
        "GB"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 50,
      "maximum": 100,
      "minimum": 1,
      "description": "Number of entries, for example 25 (maximum 100).",
      "x-fous-developer": true,
      "examples": [
        8,
        5
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "chart": "top_albums",
      "country": "Canada",
      "max_results": 8
    },
    {
      "chart": "top_songs",
      "country": "United States"
    },
    {
      "chart": "top_music_videos",
      "country": "GB",
      "max_results": 5
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `items` | array |  |  |
| `items[].rank` | integer | `1` | Position in the chart. |
| `items[].genre` | string or null | `"Pop"` |  |
| `items[].title` | string or null | `"The Life of a Showgirl: The Encore"` |  |
| `items[].artist` | string or null | `"Taylor Swift"` |  |
| `items[].apple_id` | string or null | `"6814997249"` |  |
| `items[].release_date` | string or null | `"2026-09-24"` | Release date in YYYY-MM-DD format. |
| `items[].apple_music_url` | string or null | `"https://music.apple.com/ca/album/the-life-of-a-showgirl-the-encore/6814997249"` |  |
| `items[].cover_image_url` | string or null | `"https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/a0/dd/fd/a0ddfd72-ee9e-f046-6466-a5dbefc696fa/26UM1IM21436.rgb.jpg` |  |

**Example input**

```json
{
  "chart": "top_albums",
  "country": "Canada",
  "max_results": 8
}
```

**Example output**

```json
{
  "items": [
    {
      "rank": 1,
      "genre": "Pop",
      "title": "The Life of a Showgirl: The Encore",
      "artist": "Taylor Swift",
      "apple_id": "6814997249",
      "release_date": "2026-09-24",
      "apple_music_url": "https://music.apple.com/ca/album/the-life-of-a-showgirl-the-encore/6814997249",
      "cover_image_url": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/a0/dd/fd/a0ddfd72-ee9e-f046-6466-a5dbefc696fa/26UM1IM21436.rgb.jpg/100x100bb.jpg"
    },
    {
      "rank": 2,
      "genre": "Hip-Hop/Rap",
      "title": "AUJLA SZN 1 - EP",
      "artist": "Karan Aujla",
      "apple_id": "6814002539",
      "release_date": "2026-09-25",
      "apple_music_url": "https://music.apple.com/ca/album/aujla-szn-1-ep/6814002539",
      "cover_image_url": "https://is1-ssl.mzstatic.com/image/thumb/Music211/v4/74/b9/74/74b974cc-a8e3-ab69-1675-65b29e5324d1/5064089826918_cover.jpg/100x100bb.jpg"
    },
    {
      "rank": 3,
      "genre": "Pop",
      "title": "you seem pretty sad for a girl so in love",
      "artist": "Olivia Rodrigo",
      "apple_id": "1889992111",
      "release_date": "2026-06-12",
      "apple_music_url": "https://music.apple.com/ca/album/you-seem-pretty-sad-for-a-girl-so-in-love/1889992111",
      "cover_image_url": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/1d/1b/f9/1d1bf9b1-44c6-9a6c-6ffb-c158488c06ce/26UMGIM39303.rgb.jpg/100x100bb.jpg"
    }
  ]
}
```

### Search songs

Operation `search_songs`, version 1. 1 credit per call.

Search Apple Music songs by title and artist words. Returns matching tracks in relevance order, with purchase prices and previews when available.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `query` | string | yes | `"Espresso Sabrina Carpenter"` | Song title and/or artist words, such as Espresso Sabrina Carpenter. |
| `country` | string | no | `"United Kingdom"` | Country name or two-letter code, such as United States or GB. |
| `max_results` | integer | no | `5` | Maximum number of matches to return, such as 20 (up to 200). |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "Song title and/or artist words, such as Espresso Sabrina Carpenter.",
      "examples": [
        "Espresso Sabrina Carpenter",
        "Heroes David Bowie",
        "zzzznotarealsongnameuniqueqyyu"
      ]
    },
    "country": {
      "type": "string",
      "default": "United States",
      "description": "Country name or two-letter code, such as United States or GB.",
      "examples": [
        "United Kingdom",
        "US"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 200,
      "minimum": 1,
      "description": "Maximum number of matches to return, such as 20 (up to 200).",
      "x-fous-developer": true,
      "examples": [
        5,
        200
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "query": "Espresso Sabrina Carpenter"
    },
    {
      "query": "Heroes David Bowie",
      "country": "United Kingdom",
      "max_results": 5
    },
    {
      "query": "Espresso Sabrina Carpenter",
      "country": "US",
      "max_results": 200
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `songs` | array |  |  |
| `songs[].album` | string or null | `"\"Heroes\" (2017 Remaster)"` |  |
| `songs[].genre` | string or null | `"Pop"` |  |
| `songs[].title` | string or null | `"\"Heroes\" (2017 Remaster)"` |  |
| `songs[].artist` | string or null | `"David Bowie"` |  |
| `songs[].length` | string or null | `"6:11"` |  |
| `songs[].currency` | string or null | `"GBP"` |  |
| `songs[].explicit` | string or null | `"no"` |  |
| `songs[].track_id` | integer or null | `1347894092` |  |
| `songs[].itunes_price` | number or null | `0.99` |  |
| `songs[].preview_link` | string or null | `"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/v4/1f/f3/12/1ff3122a-eb3e-373d-d524-cfe00de9b19a/mzaf_` |  |
| `songs[].release_date` | string or null | `"1977-09-23"` |  |
| `songs[].apple_music_link` | string or null | `"https://music.apple.com/gb/album/heroes-2017-remaster/1347894082?i=1347894092&uo=4"` |  |
| `songs[].length_milliseconds` | integer or null | `371417` |  |

**Example input**

```json
{
  "query": "Heroes David Bowie",
  "country": "United Kingdom",
  "max_results": 5
}
```

**Example output**

```json
{
  "songs": [
    {
      "album": "\"Heroes\" (2017 Remaster)",
      "genre": "Pop",
      "title": "\"Heroes\" (2017 Remaster)",
      "artist": "David Bowie",
      "length": "6:11",
      "currency": "GBP",
      "explicit": "no",
      "track_id": 1347894092,
      "itunes_price": 0.99,
      "preview_link": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/v4/1f/f3/12/1ff3122a-eb3e-373d-d524-cfe00de9b19a/mzaf_8446634475827049231.plus.aac.p.m4a",
      "release_date": "1977-09-23",
      "apple_music_link": "https://music.apple.com/gb/album/heroes-2017-remaster/1347894082?i=1347894092&uo=4",
      "length_milliseconds": 371417
    },
    {
      "album": "Glastonbury 2000 (Live)",
      "genre": "Rock",
      "title": "\"Heroes\" (Live, Glastonbury, 2000)",
      "artist": "David Bowie",
      "length": "5:57",
      "currency": "GBP",
      "explicit": "no",
      "track_id": 1438252327,
      "itunes_price": 0.99,
      "preview_link": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview211/v4/bd/63/8f/bd638fcf-0601-d1d3-736c-4f12af97e300/mzaf_17315445227468938173.plus.aac.p.m4a",
      "release_date": "2018-11-30",
      "apple_music_link": "https://music.apple.com/gb/album/heroes-live-glastonbury-2000/1438252305?i=1438252327&uo=4",
      "length_milliseconds": 357960
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@apple-music",
  "visibility": "public",
  "operation": "get_album",
  "version": 1,
  "input": {
    "album": "Rumours",
    "artist": "Fleetwood Mac"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@apple-music\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_album\",\n  \"version\": 1,\n  \"input\": {\n    \"album\": \"Rumours\",\n    \"artist\": \"Fleetwood Mac\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@apple-music",
  "visibility": "public",
  "operation": "get_album",
  "version": 1,
  "input": {
    "album": "Rumours",
    "artist": "Fleetwood Mac"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@apple-music","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Review album tracks, release dates, and available purchase prices.
- Compare an artist’s albums, latest release, and top songs.
- Find songs by title or artist and check available previews.
- Compare song, album, or music video chart rankings by country.

## FAQ

### Is Fous affiliated with Apple Music?

No. Fous is not affiliated with Apple Music. This workflow reads the public music.apple.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Apple Music account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from music.apple.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What tracks appear on an album?

Get album returns the matched album’s tracks in disc and track order.

### What are an artist’s latest release and top songs?

Get artist returns an artist’s latest release and top songs.

### Which songs, albums, or videos top a country’s charts?

List top charts returns chart entries in rank order for a country.

## Related

- [Deezer API](https://fous.com/workflows/deezer.md): Deezer provides albums with ordered tracklists, song recording details, and current worldwide charts or official country-playlist tracks; previews and some tempo data may be unavailable or expire.
- [Spotify API](https://fous.com/workflows/spotify.md): Spotify returns public artist profiles, album credits and ordered tracks, song details and play counts, up to 500 playlist songs, keyword results, and country-based podcast charts; dates and regional options vary.
- [Shazam API](https://fous.com/workflows/shazam.md): Shazam helps discover music and explore trending songs, returning current top charts and country-specific lists of up to 10 rapidly rising Discovery songs where available.
- [Apple Podcasts API](https://fous.com/workflows/apple-podcasts.md): Apple Podcasts returns chart listings, relevant show search results, show details with newest available episodes, and country-specific ratings and reviews; results are capped, and older or subscription episodes may be unavailable.
- [MusicBrainz API](https://fous.com/workflows/musicbrainz.md): MusicBrainz provides community-maintained recording and release information, matching songs to identifiers and release dates and providing artist details and links when available; some release information may be incomplete.
- [Apple App Store API](https://fous.com/workflows/apple-app-store.md): Apple App Store returns public app listings, keyword search, ratings, prices, listed purchases, country-specific reviews and visible replies, and up to 200 ranked chart apps.
- [Last.fm API](https://fous.com/workflows/last-fm.md): Last.fm provides listening statistics, artist profiles, discovery, up to 50 tracks or albums, similar artists without percentages, and upcoming events that may be absent.
- [YouTube API](https://fous.com/workflows/youtube.md): YouTube returns public video, caption, comment, channel and upload details, plus the latest weekly Top Songs chart; inferred dates and some counts may be approximate.
- [All Entertainment workflows](https://fous.com/workflows/category/entertainment)
