# Apple Music on Onekey > 3 endpoints for Apple Music (3 stable, 0 beta), 1 credit each. Category: Music & audio. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/apple_music Reference (Markdown): https://onekey.dev/docs/api/apple_music.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 3 mapped Apple Music endpoints return each: - `author.displayName` (string): 3 - `entity.category` (string): 3 - `entity.id` (string): 3 - `entity.name` (string): 3 - `entity.releaseDate` (ISO 8601 date): 3 - `entity.url` (URL): 3 - `media.thumbnailUrl` (URL): 3 - `entity.stats.itemCount` (integer): 1 - `listing.currency` (string): 1 - `listing.price` (number): 1 - `media.audioUrl` (URL): 1 - plus 3 platform-specific fields under `ext.` ## Endpoints ### apple_music.album An Apple Music album: title, artist, release date, track count, genre, price. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/apple_music/album?id=1440111425` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): Apple Music album or track id (numeric) - `country` (string, optional, default us): Two-letter storefront country code - Fields returned: `entity.id`, `entity.name`, `entity.url`, `author.displayName`, `media.thumbnailUrl`, `entity.releaseDate`, `entity.stats.itemCount`, `entity.category`, `listing.price`, `listing.currency`, `ext.copyright` - Reference: https://onekey.dev/docs/api/apple_music/album.md ### apple_music.charts Apple Music most-played songs chart for a storefront country. - Price: 1 credit per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/apple_music/charts?country=us` with header `x-api-key: YOUR_API_KEY` - Parameters: - `country` (string, optional, default us): Two-letter storefront country code - Fields returned: `entity.id`, `entity.name`, `entity.url`, `author.displayName`, `media.thumbnailUrl`, `entity.category`, `entity.releaseDate` - Reference: https://onekey.dev/docs/api/apple_music/charts.md ### apple_music.track An Apple Music track: title, artist, album, duration, preview clip, genre. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/apple_music/track?id=1440111733` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): Apple Music album or track id (numeric) - `country` (string, optional, default us): Two-letter storefront country code - Fields returned: `entity.id`, `entity.name`, `entity.url`, `author.displayName`, `media.thumbnailUrl`, `media.audioUrl`, `entity.releaseDate`, `entity.category`, `ext.album`, `ext.durationMs` - Reference: https://onekey.dev/docs/api/apple_music/track.md ## Sample request ```bash curl "https://api.onekey.dev/v1/apple_music/album?id=1440111425" \ -H "x-api-key: YOUR_API_KEY" ```