Website logo

Retrieve options for search parameters

Retrieves a list of options for a search filter. The list of options may depend on the value of another filter.

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

URL parameters

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

Query String parameters

dependent_value String (optional)

The value of the dependent parameter, if any.

key String (optional)

The key, as specified in the ExternalOptionsKey field when return_metadata=true is passed to a search API.

Returns

Collection of <AttributeOption>

A list of values and display values.

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).

Count Integer

How many child elements are available.

Example XML Response (switch to JSON)

<AttributeOptions xmlns="http://api.trademe.co.nz/v1">
  <AttributeOption>
    <Value>ABC</Value>
    <Display>ABC</Display>
    <Count>123</Count>
  </AttributeOption>
  <AttributeOption>
    <Value>ABC</Value>
    <Display>ABC</Display>
    <Count>123</Count>
  </AttributeOption>
</AttributeOptions>

Example JSON Response (switch to XML)

[
  {
    "Value": "ABC",
    "Display": "ABC",
    "Count": 123
  },
  {
    "Value": "ABC",
    "Display": "ABC",
    "Count": 123
  }
]