Summary
The root menu will contain an outline element of type search for configured partners:
<outline type="search" text="Search RadioTime" url="http://opml.radiotime.com/Search.ashx?query={QUERY}"/>
The method may also be invoked directly:
GET http://opml.radiotime.com/Search.ashx?query=kera
Input
| 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 |
| hosts | Text to search | No | If set, will force a match against show hosts. Limits the results to shows |
| genre | Text to search | No | If set, will force a match against station or show genre |
| city | Text to search | No | If set, will force a match against station or show location |
| country | Guide ID of country | No | If set to a value like n227, will force a match against the country. Country IDs may be retrieved through the Describe call |
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.
Notes
Unless the filter parameter is set to “off”, the response will contain only playable content.
Additional search fields like call or hosts 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.
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
| 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”.