<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "AppleMusicAPI",
  "identifier" : "/documentation/AppleMusicAPI/Get-a-Library-Song",
  "metadataVersion" : "0.1.0",
  "role" : "Web Service Endpoint",
  "symbol" : {
    "kind" : "Web Service Endpoint",
    "modules" : [
      "Apple Music API"
    ],
    "preciseIdentifier" : "rest:music_api:get:v1-me-library-songs-{}"
  },
  "title" : "Get a Library Song"
}
-->

# Get a Library Song

Fetch a library song by using its identifier.

## Discussion

If successful, the HTTP status code is 200 (OK) and the `data` array contains the requested resource object. If unsuccessful, the HTTP status code indicates the error and the details are in the `errors` array.

This endpoint requires a music user token. For more information, see [User Authentication for MusicKit](/documentation/AppleMusicAPI/user-authentication-for-musickit).

### Example

**Request:**

```
https://api.music.apple.com/v1/me/library/songs/i.PkdJNdAIrQozOW
```

**Response:**

```json
{    
    "data": [
        {
            "id": "i.PkdJNdAIrQozOW",
            "type": "library-songs",
            "href": "/v1/me/library/songs/i.PkdJNdAIrQozOW",
            "attributes": {
                "albumName": "Un Verano Sin Ti",
                "discNumber": 1,
                "genreNames": [
                    "Latin"
                ],
                "trackNumber": 10,
                "hasLyrics": true,
                "releaseDate": "2022-05-06",
                "durationInMillis": 213061,
                "name": "Efecto",
                "artistName": "Bad Bunny",
                "artwork": {
                    "width": 1200,
                    "height": 1200,
                    "url": "https://is5-ssl.mzstatic.com/image/thumb/Music112/v4/3e/04/eb/3e04ebf6-370f-f59d-ec84-2c2643db92f1/196626945068.jpg/{w}x{h}bb.jpg"
                },
                "playParams": {
                    "id": "i.PkdJNdAIrQozOW",
                    "kind": "song",
                    "isLibrary": true,
                    "reporting": true,
                    "catalogId": "1622045954",
                    "reportingId": "1622045954"
                }
            }
        }
    ]
}
```

## See Also

[`LibrarySongs`](/documentation/AppleMusicAPI/LibrarySongs)

A resource object that represents a library song.

[`LibrarySongsResponse`](/documentation/AppleMusicAPI/LibrarySongsResponse)

The response to a library songs request.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)