Announcements

Help Wizard

Step 1

NEXT STEP

search api not working for episodes

search api not working for episodes

I want to get the id of a podcast episode whose name I know with Python, but when I search with the API, the item parameter returns empty. When I do this for tracks or artists, it works perfectly. Also, yes, I have the access token.

Screenshot 2024-04-20 182958.png
Reply
4 Replies

Tried it myself just now using postman and got full results

 

Inzanity_0-1713646073839.png

 

Can you write your code or the url you used for the GET request?

I don't have specific code but I'm using a program called Postman which is used to test queries and APIs.

 

I do a GET on https://api.spotify.com/v1/search?query=die meinungsmache&type=episode&limit=5 and pass the Bearer Token in the Authentication as well

Inzanity_0-1713697891796.png

 

Inzanity_1-1713697913870.png

 

 

Hi,

 

I have exactly the same issue: searching for episodes returns an empty array:

 

 

{
  "episodes" : {
    "href" : "https://api.spotify.com/v1/search?query=football&type=episode&offset=0&limit=20",
    "items" : [ ],
    "limit" : 20,
    "next" : "https://api.spotify.com/v1/search?query=football&type=episode&offset=20&limit=20",
    "offset" : 0,
    "previous" : null,
    "total" : 1000
  }
}

 

 

I have a correct token with a curl call:

 

 

   curl --request GET \
  --url 'https://api.spotify.com/v1/search?query=football&type=episode' \
  --header 'Authorization: Bearer …'

 

 

When trying the exact same request on the Spotify online documentation endpoint test, I correctly get results:

 

 

{
  "episodes": {
    "href": "https://api.spotify.com/v1/search?query=football&type=episode&locale=fr-fr&offset=0&limit=20",
    "items": [
      {
        "audio_preview_url": "https://podz-content.spotifycdn.com/audio/clips/5Y36ERG90G8ZDHAEDoeydm/clip_0_60000.mp3",
        "description": "BELLIGOABELLIGOALL FOLLOW MY SPOTIFY ACCOUNT https://open.spotify.com/user/zrt55fe0pdi08afexdut5f4k6?si=DqXcNq5HSHWMzuZPgtNfjw ",
        "duration_ms": 61727,
        "explicit": false,
        "external_urls": {
          "spotify": "https://open.spotify.com/episode/30DJ0RNxBOZSC7tekvaTOC"
        },
        "href": "https://api.spotify.com/v1/episodes/30DJ0RNxBOZSC7tekvaTOC",
        "html_description": "<p>BELLIGOABELLIGOALL FOLLOW MY SPOTIFY ACCOUNT <a href=\"https://open.spotify.com/user/zrt55fe0pdi08afexdut5f4k6?si&#61;DqXcNq5HSHWMzuZPgtNfjw\" rel=\"nofollow\">https://open.spotify.com/user/zrt55fe0pdi08afexdut5f4k6?si&#61;DqXcNq5HSHWMzuZPgtNfjw</a></p><br/><p><br /></p>",
        "id": "30DJ0RNxBOZSC7tekvaTOC",
        "images": [
          {
            "height": 640,
            "url": "https://i.scdn.co/image/ab6765630000ba8a28870b9d60a04e201095f9ed",
            "width": 640
          },
          {
            "height": 300,
            "url": "https://i.scdn.co/image/ab67656300005f1f28870b9d60a04e201095f9ed",
            "width": 300
          },
          {
            "height": 64,
            "url": "https://i.scdn.co/image/ab6765630000f68d28870b9d60a04e201095f9ed",
            "width": 64
          }
        ],
        "is_externally_hosted": false,
        "is_playable": true,
        "language": "tr",
        "languages": [
          "tr"
        ],
        "name": "Belligoal",
        "release_date": "2023-11-04",
        "release_date_precision": "day",
        "resume_point": {
          "fully_played": false,
          "resume_position_ms": 0
        },
        "type": "episode",
        "uri": "spotify:episode:30DJ0RNxBOZSC7tekvaTOC"
      },
      …
    ],
    "limit": 20,
    "next": "https://api.spotify.com/v1/search?query=football&type=episode&locale=fr-fr&offset=20&limit=20",
    "offset": 0,
    "previous": null,
    "total": 1000
  }
}

 

 

➡️Any idea what might be wrong?

 

Thanks a lot,

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random