# Inspect
URL: https://musicapi.com/docs/reference/inspect-url.md

`POST https://api.musicapi.com/public/inspect/url`

Section: Search and match the catalog.
Product: MusicAPI Core.
Auth: Basic, Token, DevToken, DocsSession (any one of them). Use Basic with your Client ID and Client Secret from your server only.

[Check which services support returning ISRC](/docs/get-started/services-and-features)


Inspect endpoint allows you fetch the metadata of music service URL.
You can pass any URL from music service (eg. `https://tidal.com/browse/track/131696293`) and the API will
return you information about what it points at.

Inspect API supports: 
- albums
- tracks
- playlists.

## Request body

`application/json`, required.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes |  |

## Response 200

ok

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | yes |  |
| `source` | string | yes |  |
| `type` | string | yes |  |
| `data` | object | yes |  |
| `data.externalId` | string | yes |  |
| `data.name` | string | yes |  |
| `data.artistNames` | string[] \| null | yes |  |
| `data.albumName` | string | yes |  |
| `data.imageUrl` | string | yes |  |
| `data.previewUrl` | string \| null | yes |  |
| `data.isrc` | string | yes |  |
| `data.duration` | number \| null | yes |  |
| `data.url` | string | yes |  |

```json
{
  "status": "success",
  "source": "spotify",
  "type": "track",
  "data": {
    "externalId": "5aszL9hl6SBzFNsOvw8u8w",
    "name": "Bezos I",
    "artistNames": [
      "Bo Burnham"
    ],
    "albumName": "INSIDE",
    "imageUrl": "https://i.scdn.co/image/ab67616d00001e0288fed14b936c38007a302413",
    "previewUrl": "string",
    "isrc": "",
    "duration": 58149,
    "url": "https://open.spotify.com/track/5aszL9hl6SBzFNsOvw8u8w"
  }
}
```

## Example

```bash
curl -X POST "https://api.musicapi.com/public/inspect/url" \
  -u "$MUSICAPI_CLIENT_ID:$MUSICAPI_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://open.spotify.com/track/5aszL9hl6SBzFNsOvw8u8w"}'
```
