songlink / docs

[Deprecated, possibly still accessed] Documentation for Songlink products and services: API, embed, etc. Links to these READMEs might exist in the wild, so we should maintain and update them to new documentation.
83 stars 3 forks source link

API Documentation Question #4

Closed TylerAHolden closed 5 years ago

TylerAHolden commented 5 years ago

I haven't tested but it would be nice to be able to hit an API endpoint with the song.link/i/{THIS_ID_HERE} to grab results. Is that ID always the default Itunes ID?

Use case: Artist likes to have the song.link on hand and if they provide that, how can I use that ID to hit your API.

kweiberth commented 5 years ago

It's always the iTunes ID when the URL is /i/{ID_HERE}, where the /i/ denotes the service. So /s/{ID_HERE} would be a Spotify ID. Many Songlink URLs are /i/ bc our main search on our home page uses iTunes as the primary API.

Your best bet though is to just pass in the entire Songlink URL as the url= param to the endpoint. We'll always (hopefully 😅) be able to parse our own URLs into the corresponding service + ID.

TylerAHolden commented 5 years ago

Ah I suppose I didn't think to try passing the songlink URL as the param!