Website logo

Retrieve locality options for search parameters

Retrieves search options for a locality that matches the provided geo-location point.

URL: https://api.trademe.co.nz/v1/SearchOptions/Localities/@{latitude},{longitude}.{file_format}
HTTP Method: GET
Requires Authentication? No
Permission Required: Public
Supported Formats: XML, JSON
Rate Limited? No

URL parameters

latitude String (required)

The latitude value (in decimal degrees WGS84) of the geographic location.

longitude String (required)

The longitude value (in decimal degrees WGS84) of the geographic location.

file_format Enumeration (required) The format of the response.
xml Serialize responses into XML.
json Serialize responses into JSON.

Returns

Collection of <LocationSearchOption>

A list of location keys and options.

Key String or null

The key of the location search parameter.

DependentOn String or null

If present, the key of the dependent location search parameter.

Option <AttributeOption> or null

The location search option

Value String or null

The value of the item as a string.

Display String or null

What should be displayed for this value (often the same).

Example XML Response (switch to JSON)

<LocationSearchOptionCollection xmlns="http://api.trademe.co.nz/v1">
  <LocationSearchOption>
    <Key>ABC</Key>
    <DependentOn>ABC</DependentOn>
    <Option>
      <Value>ABC</Value>
      <Display>ABC</Display>
    </Option>
  </LocationSearchOption>
  <LocationSearchOption>
    <Key>ABC</Key>
    <DependentOn>ABC</DependentOn>
    <Option>
      <Value>ABC</Value>
      <Display>ABC</Display>
    </Option>
  </LocationSearchOption>
</LocationSearchOptionCollection>

Example JSON Response (switch to XML)

[
  {
    "Key": "ABC",
    "DependentOn": "ABC",
    "Option": {
      "Value": "ABC",
      "Display": "ABC"
    }
  },
  {
    "Key": "ABC",
    "DependentOn": "ABC",
    "Option": {
      "Value": "ABC",
      "Display": "ABC"
    }
  }
]