• Register

Geo Autocomplete

geo_autocomplete

Description: This method is for showing the auto suggestion for locations.

Access URI: https://api.zoopla.co.uk/api/v1/geo_autocomplete

Input parameters

search_term
 A string holding the search term to be auto completed
search_type  A string holding the particular catalog to autocomplete on. Must be one of 'listings' or 'properties'. Listings is for “For Sale” and “Rent” and the term “Properties” is used for Sold Prices and current values.

Generated output

This method returns the default data structure, plus the following key and subkeys.

suggestions : A list of suggestion data structures, each of which has the following structure.

value (A string representing a suggestion for autocompletion)

identifier (A string representing an area identifier for the suggestion)

 NOTE: postcodes don't have identifiers, so suggestions which are postcodes won't have an *identifier* key.


Examples:

For a query string missing one of the mandatory parameters "search_type" or "search_term", the JSON response document might look like the following:

{

   "error_string" : "Insufficient arguments",

   "error_code" : "1"

}

For a query string where the "search_type" is not one of "listings" or "properties", the JSON response document might look like the following:

{

   "error_string" : "Requested data is invalid, please refer to documentation",

   "error_code" : "5"

}

For the query string "?search_type=listings&search_term=ruislip", a JSON response document might look like the following:

{

"area_name" : "",

"street" : "",

"suggestions" : [

   {

        "identifier" : "ruislip",

        "value" : "Ruislip, London"

   },

   {

        "identifier" : "ruislip-manor",

        "value" : "Ruislip Manor, London"

   }

],

"county" : "",

"town" : "",

"postcode" : ""

}

For the query string "?search_type=listings&search_term=abcdef", where no suggestions were found, a JSON response document might look like the following:

{

"area_name" : "",

"street" : "",

"suggestions" : [],

"county" : "",

"town" : "",

"postcode" : ""

}