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 Key
DependentOn String or null DependentOn
Option <AttributeOption> or null Option
Value String or null Value
Display String or null Display

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"
    }
  }
]