Website logo

Price groups to make a histogram

Retrieve price grouping data representing the price distribution of listings retrieved from a given search query. Intended to be rendered as a histogram.

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

URL parameters

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

Returns

<PriceHistogramBucketResponse>

Price buckets making up a histogram

Success Boolean Success
BucketCount Integer BucketCount
PriceInterval Number or null PriceInterval
PriceOutlierBoundary Number or null PriceOutlierBoundary
PriceMin Number or null PriceMin
PriceMax Number or null PriceMax
ListingCountClippedLimitSuggestion Number or null ListingCountClippedLimitSuggestion
PriceGroupBuckets Collection of <PriceRangeGroupBucket> PriceGroupBuckets
PriceFrom Number PriceFrom
PriceTo Number or null PriceTo
ListingCount Integer ListingCount
IsExtendedRange Boolean or null IsExtendedRange

Example XML Response (switch to JSON)

<PriceHistogramBucketResponse xmlns="http://api.trademe.co.nz/v1">
  <Success>false</Success>
  <BucketCount>123</BucketCount>
  <PriceInterval>123.0</PriceInterval>
  <PriceOutlierBoundary>123.0</PriceOutlierBoundary>
  <PriceMin>123.0</PriceMin>
  <PriceMax>123.0</PriceMax>
  <ListingCountClippedLimitSuggestion>123.0</ListingCountClippedLimitSuggestion>
  <PriceGroupBuckets>
    <PriceRangeGroupBucket>
      <PriceFrom>123.0</PriceFrom>
      <PriceTo>123.0</PriceTo>
      <ListingCount>123</ListingCount>
      <IsExtendedRange>false</IsExtendedRange>
    </PriceRangeGroupBucket>
    <PriceRangeGroupBucket>
      <PriceFrom>123.0</PriceFrom>
      <PriceTo>123.0</PriceTo>
      <ListingCount>123</ListingCount>
      <IsExtendedRange>false</IsExtendedRange>
    </PriceRangeGroupBucket>
  </PriceGroupBuckets>
</PriceHistogramBucketResponse>

Example JSON Response (switch to XML)

{
  "Success": false,
  "BucketCount": 123,
  "PriceInterval": 123.0,
  "PriceOutlierBoundary": 123.0,
  "PriceMin": 123.0,
  "PriceMax": 123.0,
  "ListingCountClippedLimitSuggestion": 123.0,
  "PriceGroupBuckets": [
    {
      "PriceFrom": 123.0,
      "PriceTo": 123.0,
      "ListingCount": 123,
      "IsExtendedRange": false
    },
    {
      "PriceFrom": 123.0,
      "PriceTo": 123.0,
      "ListingCount": 123,
      "IsExtendedRange": false
    }
  ]
}