Spotify API track request with more artist details - api

Is it possible to make a request to get a spotify track and also request that the artist object contains their avatar?
Sample request https://api.spotify.com/v1/tracks/60EtWSoDRJSFmg99MKZi0x
Is it possible to get the artist's avatar url in the artist object?

No. You need to make another request. Embedded artist objects (in tracks and albums) all seem to be of the simplified type, which do not include images of the artist. See: https://developer.spotify.com/web-api/object-model/
Fetch https://api.spotify.com/v1/tracks/60EtWSoDRJSFmg99MKZi0x
Parse response
Fetch https://api.spotify.com/v1/artists/49gaZqfow2v8EEQmjGyEIw

Related

Can I access album's cover art with Musixmatch API?

In the Musixmatch API documentation it is said
Get an album from our database: name, release_date, release_type,
cover art.
In the JSON response example there is also "album_coverart_100x100",
but when I'm making an API call, in the response there is no image availible.
You can get an album art field as the response of album.get, but not from track.search. So if you're trying to show the album art for a result that the user has searched for, you might want to make another api call to album.get and get the value of the key album_coverart_100x100 for the url of the album art.

Spotify API get track info based on track name?

Is there a way to query the spotify API in order to get information about a track/artist/album/playlist based on its name.
E.g. query for track=I need a hero&artistName=... and get a URI/ID and some information about the track.
I couldn't find anything like this in the documentation. Am I overlooking something ?
You can use the search API endpoint, by specifying an artist and a track parameters, then extract the track ID from the response if there is only one match:
curl -X GET "https://api.spotify.com/v1/search?q=track:I%20need%20a hero%20artist:the%20artist&type=track"

foursquare user less access to photos

So right now the only thing I could find is to use this user less request
https://api.foursquare.com/v2/venues/explore/?client_id=CLIENT_ID&client_secret=CLIENT_SECRET&v=20130815&ll=40.7,-74&query=canes&near=kenner&venuePhotos=1
But this only returns 1 photo in the photos object for every place, even if that place has more then one public photo
https://foursquare.com/v/raising-canes-chicken-fingers/4b4e7802f964a520dfee26e3
This is an example, when I get this locations info it only puts the first image in the json response but theres 19 photos
i figured it out
https://api.foursquare.com/v2/venues/4b4e7802f964a520dfee26e3/photos?client_id=XXXXX&client_secret=XXXXX&v=20130815&ll=40.7,-74
the docs only show a example on getting the photos with a oauth token. I just happened to guess doing it like this and it worked.

Soundcloud API - Pull Artist Name and Song Title Separately?

Looking through the Soundcloud documentation - it doesn't appear that you can pull the artist name and the song name separately (or am I missing something?):
http://developers.soundcloud.com/docs/api/reference#playlists
ie:
for song https://soundcloud.com/yaz-francis-1/pompeii-bastille
Artist: Bastille
Song: Pompeii
Is it just combined in the tracktitle (title)? User is also not always the song artist name, but the username of the person who posted it to soundcloud.
If not, is there anyway to pull Artist Name and Song separately?
Any help would be greatly appreciated - thanks!
Best,
JP
Well the API doesn't give you the fields separately, but depending on your application there might be a way to get that data anyway.
I have written a webapp using the Soundcloud API and I am actually extracting the artist name separately. If you're interested, I can tell you howI did it.
You need to apply some NLP-tricks and use regular expressions.
I'm in the process of building a Web app for a client who owns a record label and wants to publish 5000+ songs of varying artists and albums. I have diaected the api to death and found the best way to tie a track to an artist is by using tags. This way you can also search by the artist name and get results in the api. In my particular case I am using machine tags to store the artist, album and track name. I also store another tag as a key for finding only tracks that match that key so on my Web app I don't get tracks from other users, since you can't filter results by tags and genre when getting tracks from a specific user.
It's a but messy but it works. So something like this to get all songs by this artist on my Web app from a specific users account
/tracks.json?client_id=xxx&q=app:key=uniqueid&tags=app:artist=artist+name
You can also throw genre in there too if you wanted. Hope this was helpful

YouTube API Return List of All Videos from Specific Category

I'm new to the YouTube Rest API v3 and I'm trying to see if there's a way to list every video in a specific category. The best I've been able to get is this:
https://www.googleapis.com/youtube/v3/videos?part=snippet&chart=mostPopular&regionCode=US&videoCategoryId=17&key={MY API KEY}
category ID 17 is equal to 'Sports' (and of course there is pagination on the API response which is fine). The problem is that in order to use the parameter 'videoCategoryID', I also am required to use the parameter 'chart' and then only acceptable value for 'chart' is 'mostPopular' according to this page:
https://developers.google.com/youtube/v3/docs/videos/list
I'm wondering if there is a way to get a list of the videos in a specific category (all videos not just Most Popular)?
There was this Stack Overflow post but it's for YouTube API v2 (Getting a complete list of all YouTube videos in a given category).
Thanks for your help!
Try search and add type=video in order to list just videos
https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&videoCategoryId=17&key={YOUR API KEY}