Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get thumbnail of SoundCloud using API?

Tags:

soundcloud

For example:

http://soundcloud.com/mhiqu3/sets/heretik/

How to get the thumbnail url: http://i1.sndcdn.com/artworks-000004897289-5r6ws9-large.jpg?1767646

with the api (or without) ?

like image 665
bux Avatar asked Feb 01 '12 12:02

bux


2 Answers

I know this is quite old, but I stumbled in this question looking for something else and I'd like to give my two cents.

These are all possible sizes (source API Reference):

        * t500x500:     500×500
        * crop:         400×400
        * t300x300:     300×300
        * large:        100×100 (default)
        * t67x67:       67×67    (only on artworks)
        * badge:        47×47
        * small:        32×32
        * tiny:         20×20    (on artworks)
        * tiny:         18×18    (on avatars)
        * mini:         16×16
        * original:     (originally uploaded image)
like image 59
Andrea Sciamanna Avatar answered Sep 28 '22 04:09

Andrea Sciamanna


what you want to do is use Soundclouds API like so:

SC.get(PATH, function (track, err){
  IMG_URL = track.artwork;
});

you can see an example here: http://runnable.com/UuiMCfATvMMkAAAS/get-a-tracks-artwork-on-soundcloud-in-javascript#

the PATH to the track can be obtained in different ways
1. if you know the image id you can grab it like so
var PATH = "/tracks" + id;
2. if you know the name and user of the track
var PATH = "/users/dj-faze/tracks/phase-shift-360-019-degrees"
3. you can also get the id with other soundcloud API's

NOTE: Ensure the track's image you are trying to get is public. If it is private your going to have to log in with soundcloud authorization API.

like image 28
AnandKumar Patel Avatar answered Sep 28 '22 05:09

AnandKumar Patel