Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Web API - preview_url for track is null

Web API - preview_url for track is null

Country

Italy

Device

Web API

Operating System

Windows 10

 

My Question or Issue

I am using the Web-API for a project. I found multiple tracks, where the field "preview_url" is null in the response (nearly half of those I tested). Tried with client credentials authentication and authorization code. I get the same response, with "preview_url" set to null each time. I am wondering why I do not get null when trying the same request with the Spotify API on rapidapi.com (https://rapidapi.com/Glavier/api/spotify23/). Also setting a market where the track is available does not solve the problem.

Example track ids where this occurrs: 

  • 37ZJ0p5Jm13JPevGcx4SkF
  • 0QPRDC97rIQB3Jh3hrVJoH
  • 1kPpge9JDLpcj15qgrPbYX
  • 2tGvwE8GcFKwNdAXMnlbfl
  • 4ZtFanR9U6ndgddUvNcjcG
  • 5wANPM4fQCJwkGd4rN57mH
  • 6uxYfENm7zw050dNUi031W

Example URL: 

https://api.spotify.com/v1/tracks?ids=37ZJ0p5Jm13JPevGcx4SkF&market=IT

Example response:

 

 

 

 

{
    "tracks": [
        {
            "album": {
                "album_type": "album",
                "artists": [
                    {
                        "external_urls": {
                            "spotify": "https://open.spotify.com/artist/58lV9VcRSjABbAbfWS6skp"
                        },
                        "href": "https://api.spotify.com/v1/artists/58lV9VcRSjABbAbfWS6skp",
                        "id": "58lV9VcRSjABbAbfWS6skp",
                        "name": "Bon Jovi",
                        "type": "artist",
                        "uri": "spotify:artist:58lV9VcRSjABbAbfWS6skp"
                    }
                ],
                "external_urls": {
                    "spotify": "https://open.spotify.com/album/0kBfgEilUFCMIQY5IOjG4t"
                },
                "href": "https://api.spotify.com/v1/albums/0kBfgEilUFCMIQY5IOjG4t",
                "id": "0kBfgEilUFCMIQY5IOjG4t",
                "images": [
                    {
                        "height": 64,
                        "url": "https://i.scdn.co/image/ab67616d000048511336b31b6a1799f0de5807ac",
                        "width": 64
                    },
                    {
                        "height": 300,
                        "url": "https://i.scdn.co/image/ab67616d00001e021336b31b6a1799f0de5807ac",
                        "width": 300
                    },
                    {
                        "height": 640,
                        "url": "https://i.scdn.co/image/ab67616d0000b2731336b31b6a1799f0de5807ac",
                        "width": 640
                    }
                ],
                "name": "Slippery When Wet",
                "release_date": "1986-08-16",
                "release_date_precision": "day",
                "total_tracks": 10,
                "type": "album",
                "uri": "spotify:album:0kBfgEilUFCMIQY5IOjG4t"
            },
            "artists": [
                {
                    "external_urls": {
                        "spotify": "https://open.spotify.com/artist/58lV9VcRSjABbAbfWS6skp"
                    },
                    "href": "https://api.spotify.com/v1/artists/58lV9VcRSjABbAbfWS6skp",
                    "id": "58lV9VcRSjABbAbfWS6skp",
                    "name": "Bon Jovi",
                    "type": "artist",
                    "uri": "spotify:artist:58lV9VcRSjABbAbfWS6skp"
                }
            ],
            "disc_number": 1,
            "duration_ms": 249293,
            "explicit": false,
            "external_ids": {
                "isrc": "USPR38619998"
            },
            "external_urls": {
                "spotify": "https://open.spotify.com/track/37ZJ0p5Jm13JPevGcx4SkF"
            },
            "href": "https://api.spotify.com/v1/tracks/37ZJ0p5Jm13JPevGcx4SkF",
            "id": "37ZJ0p5Jm13JPevGcx4SkF",
            "is_local": false,
            "is_playable": true,
            "name": "Livin' On A Prayer",
            "popularity": 84,
            "preview_url": null,
            "track_number": 3,
            "type": "track",
            "uri": "spotify:track:37ZJ0p5Jm13JPevGcx4SkF"
        }
    ]
}

 

 

 

 

 

Reply
0 Replies

Suggested posts