[GH-ISSUE #182] Searching in an artist's albums #120

Closed
opened 2026-02-27 19:26:10 +03:00 by kerem · 1 comment
Owner

Originally created by @foremtehan on GitHub (Jan 14, 2020).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/182

There seems to be no way to find an album from specific artist in spotify api endpoint, For example i want to find the Pink album from Ferry Corsten, We have two choice, Grab all album from the artist then search into it Or search album and get All results (for that album there is 4885 result item!), So is there a proper way to do this by this repo?

Originally created by @foremtehan on GitHub (Jan 14, 2020). Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/182 There seems to be no way to find an album from specific artist in spotify api endpoint, For example i want to find the Pink [album](https://open.spotify.com/album/7x5NKhqh2UaVMETCkTpjab) from Ferry Corsten, We have two choice, Grab all album from the artist then search into it Or search album and get All results (for that album there is 4885 result item!), So is there a proper way to do this by this repo?
kerem 2026-02-27 19:26:10 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@jwilsson commented on GitHub (Jan 14, 2020):

Hey!
It should be possible to use the SpotifyWebAPI::search() method and combining what Spotify calls "field filters" into a query. Take a look at this example and their docs.

The code could for example look like:

$api->search('album:pink artist:"Ferry Corsten"', 'album');
<!-- gh-comment-id:574081289 --> @jwilsson commented on GitHub (Jan 14, 2020): Hey! It should be possible to use the `SpotifyWebAPI::search()` method and combining what Spotify calls "field filters" into a query. Take a look at [this example](https://developer.spotify.com/console/get-search-item/?q=album%3Aarrival+artist%3Aabba&type=album) and [their docs](https://developer.spotify.com/documentation/web-api/reference/search/search/#writing-a-query---guidelines). The code could for example look like: ```php $api->search('album:pink artist:"Ferry Corsten"', 'album'); ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-web-api-php#120
No description provided.