> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/apple-music/track>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/apple-music/track.mdx>

---

# Apple Music Track API

Resolve a public Apple Music song by id or share URL, including album URLs with an i= song id, in the shared Social Fetch envelope.

`GET /v1/apple-music/track` accepts either `trackId` or a public `url`. Song URLs and album URLs with `?i={songId}` both work. Album URLs without `i=` belong on `GET /v1/apple-music/album`. Artist URLs belong on `GET /v1/apple-music/artist`. On a found lookup you get `data.track` with identity fields (trackId, title), optional durationMs / trackNumber / explicit, artistName, albumTitle, artworkUrl, previewUrl, and trackUrl. Which optional fields are filled depends on how you look the song up — see the FAQ. Branch on `data.lookupStatus` before you write rows — HTTP 200 alone does not mean the song resolved.

Bill from `meta.creditsCharged`. This route is single-song detail. Playback, user libraries, and MusicKit stay on Apple's official Apple Music API.

## Request

- **Endpoint:** `GET /v1/apple-music/track`
- **Credits:** 1 credit per successful request.
- **Input:** by track id or URL
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/apple-music/track/get)
- **Platform page:** [/platforms/apple-music](https://www.socialfetch.dev/platforms/apple-music)

## FAQ

### How do I get Apple Music song metadata via API?

Call GET /v1/apple-music/track with your Social Fetch API key (x-api-key) and either a trackId or a public music.apple.com song URL (or an album URL with i={songId}). Read data.lookupStatus, then data.track. See the API docs for parameters.

### How much does the Apple Music Track API cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged — that field is the billing source of truth.

### What does the Apple Music track response include?

When found: data.track with trackId, title, and optional durationMs, trackNumber, explicit, artistName, albumTitle, artworkUrl, previewUrl, and trackUrl. Always branch on data.lookupStatus first.

### Can I pass an Apple Music album URL to the track route?

Yes, when the album URL includes i={songId} identifying the song. Album URLs without that query param belong on GET /v1/apple-music/album. Artist URLs belong on GET /v1/apple-music/artist.

### Why are durationMs or albumTitle sometimes null on a found track?

Different lookups fill different optional fields. trackId and /song/ URLs typically return artistName, albumTitle, and artworkUrl, and may omit durationMs, trackNumber, and previewUrl. An album URL with i={songId} typically returns duration, track number, and previewUrl, and may omit albumTitle and artwork. Identity fields (trackId, title) are present in both found shapes.

### Does a completed lookup always mean the song was found?

No. HTTP 200 means the request finished. Check data.lookupStatus: found means you got track details; not_found means the id or URL did not resolve. Persist meta.requestId when you need to debug a miss.

### Does this replace the Apple Music API / MusicKit?

No. Social Fetch returns public catalog metadata for enrichment pipelines. Use Apple's official Apple Music API when you need playback control, user libraries, or developer-token MusicKit access.
