Search

Summary

Offers free-text searching for stations, shows, topics, songs and artists, and stream URLs.

Input

GET http://opml.radiotime.com/Search.ashx?query=kera&partnerId=<id>&serial=<serial>
Parameter Value(s) Required Description
query The text to search Yes The query text to search
filter standard, off No If off, will return a list of unsupported items
types station, show No If set to one of these values, will limit search results to only the specified type
call Text to search No If set, will force a match against station call sign. Limits the results to stations
name Text to search No If set, will force a match against station or show name
freq Text to search No If set, will force a match against station frequency. Limits the results to stations

Output

A list of outline elements corresponding to each station or show matching the query. They will be ordered by relevance to the term.

If the term matches a browsable category, like “jazz” or “canada”, the response will contain a link to the category, in addition to the stations and shows matching the term.

If the filter parameter is off and results are found but are not playable, an additional “Search results (not playable)” container will exist with the list of items not available. Otherwise, unplayable results will only appear if the total number of search results is less than 25.

Notes

Unless the filter parameter is set to off, the response will contain only playable content.

Additional search fields like call allow an advanced filter and may be used independently or in conjunction with query. Unless you specifically need this filtering to narrow a broad search, it’s better to place your query terms only in query, which will match against all fields.

There are two “reserved” searches you can use for testing purposes:

Query Term Purpose
aa1 Will return a list of outline element that link to browsing the directory in different languages (basically forces a localization)
aa2 Will return a list of audio elements for different stream types (playlist/protocol/codec combinations)

The root menu will contain an outline element of type search for configured partners:

<outline type="search" text="Search TuneIn" url="http://opml.radiotime.com/Search.ashx?query={QUERY}"/>

Search Songs/Artists

To find stations currently broadcasting a specific song or artist.

Input

GET http://opml.radiotime.com/Search.ashx?c=artist&query=gaga&partnerId=<id>&serial=<serial>
Parameter Description
c Set to song, artist, or song,artist to search both
query The song or artist name (does not need to be complete)

Output

Any stations currently matching the song/artist and are available will be returned. Song coverage is only available for about 3000 stations in the United States, so results may vary.

Search Streams

If your application allows users to enter their own streams, you can use our search method to “reverse-engineer” the station it belongs to.

Input

GET http://opml.radiotime.com/Search.ashx?c=stream&query=http://mystream.com/stream.asx&partnerId=<id>&serial=<serial>
Parameter Description
c Set to stream for this call
query A stream URL to find

Output

If the stream is found in our guide, we will return the corresponding station as an outline element.

Notes

The stream URL can omit the scheme (i.e., www.stream.com instead of http://www.stream.com) and it will be assumed “http”.