Autocomplete
Predicts search words or phrases for select areas of Rovi Cloud Services and returns a JSON response with results listed in order of popularity.
Syntax
autocomplete?entitytype=entitytype&query=query&apikey=apikey&sig=sig [&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 or person involved in music from the initial character e.
Request Example 3
- Predict a search string for a movie from the characters the end.
Request Parameters
Parameter | Required | Description |
apikey | Yes | Access code that authorizes your request for data from Rovi. |
entitytype | Yes | Type of search content to search for.
To return search strings for . . . | Specify this entitytype. |
albums | album |
movies | movie |
TV series | tvseries |
popular songs | song |
people involved in music | artist |
A request can return data for only one entity type except for the combination of movie and tvseries. To do that, specify two entitytype parameters like this: entitytype=tvseries&entitytype=movie. 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 URL-encoded search string. Spaces may be replaced with plus (+) or percent20 (%20) symbols. The case of characters 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. |
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
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:c4x",
"controlSet": {
"status": "ok",
"code": 200,
"messages": [""]
},
"results": [
"Enya",
"Eminem",
"Elton John",
"Erasure",
"Edie Adams",
"Edith Head",
"Ethan Coen",
"Elvis Presley",
"Eric Clapton",
"Emma Thompson"]
}
}
Response Example 2
- Here's a response to Request Example 2.
{"autocompleteResponse": {
"id": "tul1cstadgwapp01:gwy:ce4",
"controlSet": {
"status": "ok",
"code": 200,
"messages": [""]
},
"results": [
"ER",
"Enya",
"Ed",
"Eminem",
"Extras",
"Entourage",
"Elton John",
"Erasure",
"Ellen",
"Edie Adams"]
}
}
Response Example 3
- Here's a response to Request Example 3.
{"autocompleteResponse": {
"id": "tul1cstadgwapp01:gwy:ce8",
"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 Year",
"The Endless Game",
"The End of the Night",
"The End of Innocence",
"The End of the Bridge",
"The End of the Feud"]
}
}
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