How do i get the list of stations in iTunes

abhityagi85

New Member
Hi all,

I am making an application for Mac OSX 10.5 which plays internet radio stations. Its true that i can use iTunes for listening to the internet radio but the applications is for using Audio from the internet radio and the audio will later be used for different purpose.

I can play the radio station if the stream URL is known. But my problem is to get the internet radio stations list with their urls at runtime like iTunes fetches the radio stations at runtime.

I have searched for this but didnot get anything for that. I'll post if i get smthg.

Thanks in advance.

-Abhinav
 
Hi fellow coderz..

can anybody give me idea of what URL i need to hit from my application so that i can get xml for iTunes giving list of stations.
 
After a little research it doesn't look like its possible. Let us know if you find anything though.
 
I've been looking into this for 2 years now.

There used to be a mechanism for submitting stations to the iTunes list but that was closed 3 or 4 years ago.

I have tried emailing various departments within Apple but have always had the reply 'not our department'.

The current understanding is that the stations are chosen by iTunes staff and have to be using an Apple server to stream to the list.

Unfortunately, I have never found any information to the contrary.
 
Hi all,

in the above post you may notice a smiley which is because of :p

please correct the node as

<kb:pass_count>6</kb:pass_count>
 
DONE : How to get iTunes Radio Stations

Hi All,

I hope this might be useful for you. It worked fine for me but dont know about legal issues in leaching Apple/iTunes servers.
If anybody knows about this, please post as reply to this.

I am explaining a two step process to get the radio stations listed by iTunes.

Step#1
Use this link to get an XML file that will give you a list of Genres and GenresID.

http://pri.kts-af.net/xml/index.xml?...8B&tuning_id=1

after hitting this URL in Safari, i got an XML which has several nodes like this
<kb:menu_record>
<kb:name>90s Hits</kb:name>
<kb:menu_id>5823</kb:menu_id>
<kb:pass_count>6</kb:pass_count>
</kb:menu_record>

This shows that corresponding to a genre with name "90s Hits" the GenreID is "5823".

Step#2:
For getting the list of Radio Station Details in a Genre, use the following link:
URL:
http://pri.kts-af.net/xml/index.xml?...B%5D=max_users

this will further give an XML with list of stations and their details. A node containing the station details from the XML is given as:
<kb:station_record>
<kb:esid>a1ead91793a0544c598255156d1bf400</kb:esid>
<kb:station>106.5 The Buzz</kb:station>
<kb:description>Totally 90s</kb:description>
<kb:station_url_record>
<kb:url_no>1</kb:url_no>
<kb:url>http://pri.kts-af.net/redir/index.pls?esid=a1ead91793a0544c598255156d1bf400&am p;url_no=1&amp;client_id=7&amp;uid=68efed4d03ec7e4 5fd3978262c107180&amp;clicksrc=xml</kb:url>
<kb:status_code>A</kb:status_code>
<kb:bandwidth_kbps>128</kb:bandwidth_kbps>
<kb:url_strength>9</kb:url_strength>
</kb:station_url_record>
</kb:station_record>
The details for a station with name 106.5 The Buzz and having URL in the url field. Thus in this way using a 2 step process we can get the list of stations and station's details that are provided by iTunes.

Although i have tried to explain it in detail but there is a chance that others can explain something missing here.

your comments and suggestions always welcomed :)
 
Hot 100 Radio URL

after going through the steps 1 and step 2,
you will get an xml that will have many nodes representing each station.

for your specific querry, i assume the station name is "Hot 100 Radio The Beat Of The Street"
so the statio details corresponding to this station is like this in the xml file (with other stations too in the xml for the Top 40/Pop which gives 282 total stations information in the xml).


<kb:station_record>
<kb:esid>b804ca17314487cecd046aa7d1fda375</kb:esid>
<kb:station>Hot 100 Radio The Beat Of The Street</kb:station>
<kb:description>Worldwide Radio Station with upbeat music .</kb:description>
<kb:station_url_record>
<kb:url_no>1</kb:url_no>
<kb:url>
http://pri.kts-af.net/redir/index.p...68efed4d03ec7e45fd3978262c107180&clicksrc=xml
</kb:url>
<kb:status_code>A</kb:status_code>
<kb:bandwidth_kbps>128</kb:bandwidth_kbps>
<kb:url_strength>9</kb:url_strength>
</kb:station_url_record>
</kb:station_record>

The stream URL is thus:
http://pri.kts-af.net/redir/index.p...68efed4d03ec7e45fd3978262c107180&clicksrc=xml

This shows that the stream or station URL is a .pls or playlist file which is automatically redirected to the stream actually. When you type in the browser, notice the redirected URL in the browser will be:
http://83.170.104.91:30115
if you use this url and add it to custom iTunes station, it will play fine.
 
Im sure that this would not be fully legal unfortunately. Apple does not publish any API's and if you want to be an app developer, its $99 a year!

Something tells me this is not legal! :(
 
The advice above may get a station on to your own copy of iTunes as a custom station but it will not get you listed within the iTunes radio listing.
 
I doubt that apple will restrict anyone from using it as the Apple has good fundamentals and Steve jobs is really nice person.

However the broadcasting server may be for iTunes only and not for other applications. So that way they its possible that it will be illegal. However I myself commented the code for iTunes stuff because of Legal Issues as told by my manager.

I dont have an apple id so cant confirm this. Do anyone have apple id so that we can ask this querry through them from Apple.
 
Top