Deezer - Search for tracks, artists, albums with one api call - deezer

Is it possible to search for tracks, artists and albums at the same time and get something like the deezer homepage search

It is not possible to do all these searches at the same time, you have to execute multiple requests on each endpoint you need, with the parameters you will find here: http://developers.deezer.com/api/search#connections

Related

Query for pages of a specific type on Facebook

I need to have something like http://fanpagelist.com/category/musicians/ in my web app.
Basically I need to allow users to search through Facebook pages of musician/band category and sort by number of fans.
The closest I got was with this FB Graph API call:
search?q=musician&type=page&limit=25&after=MjQZD&fields=name,fan_count,category
But that is searching for pages that have 'musician' in the name, not in the category field.
Any idea? It must be possible since fanpagelist can do it...
There is no way to filter the results from that search endpoint directly.
You are limited to the options described under https://developers.facebook.com/docs/graph-api/using-graph-api/#search, and that basically means you can search by name, but nothing else.
So you will need to filter the results on your end.

How To Get All Songs of An Artist on Spoitfy?

In their docs for getting top tracks on an artist they mention this:
The 10 maximum tracks are the ones displayed by the Spotify app. If you want to fetch more artist’s top tracks, an alternative way is to use Echo Nest song/search to accomplish this. It will accept a Spotify artist id for input and give you Spotify id’s in the output.
I'm pretty sure the Echo Nest Api no longer exists, so I am wondering if there is still a way to get songs of an artist other than just 10 of them?
Alternatively I was thinking of using Last.fm's Api to do it if Spotify no longer supports that functionality, if anyone has any other suggestions of how one could work around this that would be great! Thanks in advance.
I think you won't be able to achieve it in single API call in Spotify. However there's an alternative:
Request all albums of an artist (have a look here):
https://api.spotify.com/v1/artists/{id}/albums
And then request the tracks of each album (have a look here):
https://api.spotify.com/v1/albums/{id}/tracks
To avoid one request for each album, you can get multiple albums at once and when an album is requested, the tracks of such album will be returned in a paging object. You can pass the desired albums identifiers separated by , in the id query parameter to the following endpoint (have a look here):
https://api.spotify.com/v1/albums
A solution that was more sufficient for me here was:
https://api.spotify.com/v1/search?type=track&q=artist:ArtistName
this returns the top songs by this artist, with pagination so definitely more than 10 results.
The only caveat is that this includes songs that the artist might be featured on, but I think this is useful really as if it's a popular song your user might be looking for it.

How can I get songs by album name or album spotify id?

As you may know EchoNest does not have album information. But, can I get songs by album name or album spotify id?.
Does anybody have a workarround for this?
If you have the Spotify ID for the Album, why don't you use the Spotify API to get the Spotify ID for each of the tracks (https://developer.spotify.com/web-api/get-album/) - this gives an array of simplified track info as part of the response.
Then use the EchoNest track/profile api (http://developer.echonest.com/docs/v4/track.html#profile) to get the information for each track?
Update: Spotify is deprecating the echonest api (http://developer.echonest.com/) - but they're folding a good amount of the functionality into their own API. In this case you can call https://developer.spotify.com/web-api/get-several-audio-features/ to get the audio info for up to 100 tracks at a time, this should reduce to 2 calls per album (one to get the track list and one to get the audio features).

How can I get a list of all "likable" Facebook pages?

I'm exploring the Facebook API for the first time - partially to research a web app idea I have and partially out of pure curiosity. The Explorer tool has been a great help with most things.
I'm trying to get a complete list of "Likable" pages on Facebook such as: Movies, Music, Books, TV Shows, etc. I understand how to get a list of pages that a user has liked, but I want the entire index of pages that exist.
All of the strings I've worked with so far start with /username. Is there another prefix for querying Facebook in general?
No, this is not possible and doesn't exist in the API.
A query like this is way too resource intensive.
You can use the
/search?q={query}&type=page&access_token={app_access_token}
with {query} as the search string, {app_access_token} as your App Access Token, as outlined at
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#search
It's not possible to retrieve or search for whole Page Categories.

Get top x "likes" using Facebook API

Is there a way to get the top likes of a particular section of a site? For example, I want to get all top x likes of example.com/directory. I'm not particular about which method (Graph, FQL, etc), I just want to find the best method.
We currently do not support prefix queries for URLs or sorting by number of likes. If you have the set of URLs, you can use FQL and the http://developers.facebook.com/docs/reference/fql/link_stat table to get the stats for each of them.