Autocomplete Version 2.0
Predicts search words or phrases for select areas of Rovi Cloud Services and returns results in order of popularity.
Syntax
endpoint/autocomplete?apikey=apikey&sig=sig&entitytype=entitytype&query=query [&format=format] [&country=country] [&language=language] [&size=size]
Request Example 1
- Predict a search string for a person involved in music from the inital character e.
Request Example 2
- Predict a search string for a TV series from the initial character h.
Request Example 3
- Predict a search string for a movie from the characters the end.
Request Example 4
- Predict a search string for a TV program from the characters hou, in an XML response.
Request Parameters
♫ Music-related requests 日 Movie-related requests ⊑⊒ TV-related requests
Parameter | Required | Description |
apikey | Yes | Access code that authorizes your request for data from Rovi. |
endpoint | Yes | Database to search.
To search in . . . | Specify this endpoint. |
music | music ♫ |
movies and TV series (our DVD database) | amgvideo 日 |
television (our international TV schedule database) | video ⊑⊒ |
|
entitytype | Yes | Type of content to search for.
In this endpoint . . . | To search in this area . . . | Specify this entitytype. |
music ♫ | albums | album |
| popular songs | song |
| people working in music | artist |
amgvideo 日 | movies | movie |
| TV series | tvseries |
video ⊑⊒ | movies | movie |
| TV series | tvseries |
| TV programs | onetimeonly |
To return data from multiple entity types within an endpoint, specify multiple entitytype parameters like this: entitytype=tvseries&entitytype=movie. Note: The top results may come from just one of the entity types. Order of results is determined by relevance and is not deliberately balanced across the searched entity types. |
query | Yes | The search string. Replace spaces with plus (+) or percent20 (%20) symbols. Character case does not affect the results (search is not case-sensitive). |
sig | Yes | A calculated authorization code. To perform the calculation, execute the MD5 function on the concatenation of the following three strings:
- Your API key.
- The secret key you received with your API key.
- The Unix time. Unix time is a timestamp supported in most development environments, and is generally defined as the number of seconds since January 1, 1970 00:00:00 GMT.
Perform the calculation at the time of each request to be sure it's within a five-minute window of the server time. If you're testing the call in a browser, use our online signature generator to perform the calculation. |
country | No | Country of the language of the response. The current release of the API supports only US. |
format | No | Format of the returned data: json or xml. The default is JSON. |
language | No | Language of the response data. This request supports only en (English). |
size | No | The number of items you want to be returned. The default is 20. |
Response
Response | Type | Description |
controlSet | ControlSet | The HTTP response status. |
id | String | Server transaction ID for the response. |
Response for Autocomplete Version 2.0
Response | Type | Description |
results | String [ ] | List of most popular searches. Results change over time as popularity changes. |
Response Example 1
- Here's a response to Request Example 1. Results are ordered by popularity, so results change over time.
{
"autocompleteResponse":{
"id":"tul1cstadgwapp02:gwy:2jaj",
"controlSet":{
"status":"ok",
"code":200,
"messages":[
""
]
},
"results":[
"Eminem",
"Elton John",
"Elvis Presley",
"Enya",
"Eric Clapton",
"Ellen Burstyn",
"Elvis Costello",
"Emma Thompson",
"Emmylou Harris",
"Elizabeth Taylor"
]
}
}
Response Example 2
- Here's a response to Request Example 2.
{
"autocompleteResponse":{
"id":"tul1cstadgwapp02:gwy:2jah",
"controlSet":{
"status":"ok",
"code":200,
"messages":[
""
]
},
"results":[
"How I Met Your Mother",
"Hell's Kitchen",
"Survivor: Heroes vs. Villains",
"The Hills",
"Human Target",
"Extreme Makeover: Home Edition",
"Hawaii Five-0",
"House",
"House Hunters",
"Happy Town"
]
}
}
Response Example 3
- Here's a response to Request Example 3.
{
"autocompleteResponse":{
"id":"tul1cstadgwapp01:gwy:7kmu",
"controlSet":{
"status":"ok",
"code":200,
"messages":[
""
]
},
"results":[
"The End of the Affair",
"The End",
"The End of Poverty?",
"The Endurance: Shackleton's Legendary Antarctic Expedition",
"The End of the Line",
"The End of August at the Hotel Ozone",
"The End of the Road",
"The Endless Game",
"The End of Innocence",
"The End of the River"
]
}
}
Response Example 4
- Here's a response to Request Example 4.
<autocompleteResponse id="tul1cstadgwapp01:gwy:7kmh">
<controlSet>
<status>ok</status>
<code>200</code>
<messages/>
</controlSet>
<results>
<result>Houston Business Channel</result>
<result>Bob the Builder On Site: Houses & Playgrounds</result>
<result>Houston TV</result>
<result>House of Saints</result>
<result>The Ultimate Crash: House, Bath, Yard</result>
<result>House of Yes: Live from the House of Blues</result>
<result>The Hound That Thought He Was a Raccoon</result>
<result>Simatalu: House of Spirits</result>
<result>Houston Media Source</result>
<result>House of Representatives Insurance Committee Meeting</result>
</results>
</autocompleteResponse>
Error Codes
Code | Description |
400 | Incorrect or invalid request. The reason is shown in the Message object in ControlSet. |
502 | No results found. The Message object in ControlSet returns the following:
{ "code": "Empty Result", "name": "No results available for this request" } |
See Also
↑ Top