Website logo

Get office listing statistics

Returns a page of listing statistics for all current listings listed by the calling office, including a break up by day and suburb. The office is the authenticated member making the request, so this call takes no member ID.

Authentication: requires the MyTradeMeRead permission. This is the office-level view: statistics are returned for the listings of the authenticated member, so call it with the office account's credentials. There is no way to request another member's listings. To see one agent's listings use Agents/{memberId}/LiveListingStatistics. Errors: HTTP 429 with "You have exceeded your API call quota for the current hour." when the hourly rate limit is exceeded. HTTP 400 when days is outside 1 to 31, when only one of from_date and to_date is supplied, when a date is not a valid date, when from_date is after to_date, or when the date range is longer than 31 days.

URL: https://api.trademe.co.nz/v1/Property/Office/ListingStatistics.{file_format}
HTTP Method: GET
Requires Authentication? Yes
Permission Required: MyTradeMeRead: Read your membership & listing data.
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.

Query String parameters

days Integer (optional)

The number of days of statistical data to retrieve, ending yesterday. Defaults to 30. Minimum 1, Maximum 31. Ignored if from_date and to_date are provided.

from_date String (optional)

Start date (yyyy-MM-dd) for date range query. Must be provided with to_date. Overrides the days parameter. Maximum 31-day range.

page Integer (optional)

The page number of the set of results to return, starting from 1. Defaults to 1 when omitted or less than 1.

to_date String (optional)

End date (yyyy-MM-dd) for date range query. Must be provided with from_date. Overrides the days parameter. Maximum 31-day range.

Returns

<ListingStatisticsPagedCollection>

A ListingStatisticsPagedCollection with one entry per listing. TotalCount, Page, PageSize and TotalPages describe the paging.

TotalCount Integer

The total number of results in the collection. Can be larger than the number of returned results.

Page Integer

The index of the current page of results (starts at 1).

PageSize Integer

The number of results in the current page.

List Collection of <ListingStatistics> or null

A list of the results in the current page.

ListingId Integer

The Trade Me listing ID. Always returned.

WatcherCount Integer

The number of watchers of this listing.

EnquiryCount Integer

The number of enquiries about this listing.

IsSuperFeatured Boolean

True if this is a Super Featured listing.

DailyStatistics Collection of <DailyListingStatistics> or null

The daily statistics for this listing for the requested date range (the days parameter or from_date and to_date).

Day DateTime

The calendar day these statistics relate to (a New Zealand date). Serialised in the Microsoft JSON date format, for example /Date(1735642800000+1300)/.

NewViewCount Integer

The number of times the listing was viewed on this day. Omitted from the response when 0.

NewImpressionsCount Integer

The number of impressions of this listing on this day. Omitted from the response when 0.

PerSuburbWatchersStatistics Collection of <PerSuburbListingStatistics> or null

The current number of watchers of this listing, broken down by the suburb and region of each watcher.

CurrentCount Integer

The number of watchers or views from this suburb, depending on which collection the item is in.

SuburbId Integer

The Trade Me ID of the suburb the watchers or viewers are in.

SuburbName String or null

The name of the suburb the watchers or viewers are in.

RegionId Integer

The Trade Me ID of the region the suburb is in.

RegionName String or null

The name of the region the suburb is in.

GSRegionId Integer

The ID of the geospatial region the suburb is in.

PerSuburbViewsStatistics Collection of <PerSuburbListingStatistics> or null

The current number of views of this listing, broken down by the suburb and region of each viewer.

(This type has already been defined)
ClickToCallCount Integer

The number of click to call actions for this listing.

MemberIds Collection of Integer or null

The Trade Me member IDs of the agents the listing is assigned to. A listing can be assigned to more than one agent.

ImpressionsCount Integer

The total number of impressions of this listing. 0 when no impression statistics are available. Always returned.

ImpressionsInPeriod Integer

The number of impressions in the requested date range, which is the total of NewImpressionsCount across DailyStatistics. Always returned.

ImpressionsCountAvgPerDay Integer

The average number of impressions per day for this listing, as a whole number. 0 when no impression statistics are available. Always returned.

TotalPages Integer or null

Total number of pages available

Example XML Response (switch to JSON)

<ListingStatisticsPagedCollection xmlns="http://api.trademe.co.nz/v1">
  <TotalCount>123</TotalCount>
  <Page>123</Page>
  <PageSize>123</PageSize>
  <List>
    <ListingStatistics>
      <ListingId>123</ListingId>
      <WatcherCount>123</WatcherCount>
      <EnquiryCount>123</EnquiryCount>
      <IsSuperFeatured>false</IsSuperFeatured>
      <DailyStatistics>
        <DailyListingStatistics>
          <Day>2018-01-01T00:00:00Z</Day>
          <NewViewCount>123</NewViewCount>
          <NewImpressionsCount>123</NewImpressionsCount>
        </DailyListingStatistics>
        <DailyListingStatistics>
          <Day>2018-01-01T00:00:00Z</Day>
          <NewViewCount>123</NewViewCount>
          <NewImpressionsCount>123</NewImpressionsCount>
        </DailyListingStatistics>
      </DailyStatistics>
      <PerSuburbWatchersStatistics>
        <PerSuburbListingStatistics>
          <CurrentCount>123</CurrentCount>
          <SuburbId>123</SuburbId>
          <SuburbName>ABC</SuburbName>
          <RegionId>123</RegionId>
          <RegionName>ABC</RegionName>
          <GSRegionId>123</GSRegionId>
        </PerSuburbListingStatistics>
        <PerSuburbListingStatistics>
          <CurrentCount>123</CurrentCount>
          <SuburbId>123</SuburbId>
          <SuburbName>ABC</SuburbName>
          <RegionId>123</RegionId>
          <RegionName>ABC</RegionName>
          <GSRegionId>123</GSRegionId>
        </PerSuburbListingStatistics>
      </PerSuburbWatchersStatistics>
      <PerSuburbViewsStatistics>
        <PerSuburbListingStatistics />
        <PerSuburbListingStatistics />
      </PerSuburbViewsStatistics>
      <ClickToCallCount>123</ClickToCallCount>
      <MemberIds>
        <int>123</int>
        <int>123</int>
      </MemberIds>
      <ImpressionsCount>123</ImpressionsCount>
      <ImpressionsInPeriod>123</ImpressionsInPeriod>
      <ImpressionsCountAvgPerDay>123</ImpressionsCountAvgPerDay>
    </ListingStatistics>
    <ListingStatistics>
      <ListingId>123</ListingId>
      <WatcherCount>123</WatcherCount>
      <EnquiryCount>123</EnquiryCount>
      <IsSuperFeatured>false</IsSuperFeatured>
      <DailyStatistics>
        <DailyListingStatistics>
          <Day>2018-01-01T00:00:00Z</Day>
          <NewViewCount>123</NewViewCount>
          <NewImpressionsCount>123</NewImpressionsCount>
        </DailyListingStatistics>
        <DailyListingStatistics>
          <Day>2018-01-01T00:00:00Z</Day>
          <NewViewCount>123</NewViewCount>
          <NewImpressionsCount>123</NewImpressionsCount>
        </DailyListingStatistics>
      </DailyStatistics>
      <PerSuburbWatchersStatistics>
        <PerSuburbListingStatistics>
          <CurrentCount>123</CurrentCount>
          <SuburbId>123</SuburbId>
          <SuburbName>ABC</SuburbName>
          <RegionId>123</RegionId>
          <RegionName>ABC</RegionName>
          <GSRegionId>123</GSRegionId>
        </PerSuburbListingStatistics>
        <PerSuburbListingStatistics>
          <CurrentCount>123</CurrentCount>
          <SuburbId>123</SuburbId>
          <SuburbName>ABC</SuburbName>
          <RegionId>123</RegionId>
          <RegionName>ABC</RegionName>
          <GSRegionId>123</GSRegionId>
        </PerSuburbListingStatistics>
      </PerSuburbWatchersStatistics>
      <PerSuburbViewsStatistics>
        <PerSuburbListingStatistics />
        <PerSuburbListingStatistics />
      </PerSuburbViewsStatistics>
      <ClickToCallCount>123</ClickToCallCount>
      <MemberIds>
        <int>123</int>
        <int>123</int>
      </MemberIds>
      <ImpressionsCount>123</ImpressionsCount>
      <ImpressionsInPeriod>123</ImpressionsInPeriod>
      <ImpressionsCountAvgPerDay>123</ImpressionsCountAvgPerDay>
    </ListingStatistics>
  </List>
  <TotalPages>123</TotalPages>
</ListingStatisticsPagedCollection>

Example JSON Response (switch to XML)

{
  "TotalCount": 123,
  "Page": 123,
  "PageSize": 123,
  "List": [
    {
      "ListingId": 123,
      "WatcherCount": 123,
      "EnquiryCount": 123,
      "IsSuperFeatured": false,
      "DailyStatistics": [
        {
          "Day": "\/Date(1514764800)\/",
          "NewViewCount": 123,
          "NewImpressionsCount": 123
        },
        {
          "Day": "\/Date(1514764800)\/",
          "NewViewCount": 123,
          "NewImpressionsCount": 123
        }
      ],
      "PerSuburbWatchersStatistics": [
        {
          "CurrentCount": 123,
          "SuburbId": 123,
          "SuburbName": "ABC",
          "RegionId": 123,
          "RegionName": "ABC",
          "GSRegionId": 123
        },
        {
          "CurrentCount": 123,
          "SuburbId": 123,
          "SuburbName": "ABC",
          "RegionId": 123,
          "RegionName": "ABC",
          "GSRegionId": 123
        }
      ],
      "PerSuburbViewsStatistics": [
        {
        },
        {
        }
      ],
      "ClickToCallCount": 123,
      "MemberIds": [
        123,
        123
      ],
      "ImpressionsCount": 123,
      "ImpressionsInPeriod": 123,
      "ImpressionsCountAvgPerDay": 123
    },
    {
      "ListingId": 123,
      "WatcherCount": 123,
      "EnquiryCount": 123,
      "IsSuperFeatured": false,
      "DailyStatistics": [
        {
          "Day": "\/Date(1514764800)\/",
          "NewViewCount": 123,
          "NewImpressionsCount": 123
        },
        {
          "Day": "\/Date(1514764800)\/",
          "NewViewCount": 123,
          "NewImpressionsCount": 123
        }
      ],
      "PerSuburbWatchersStatistics": [
        {
          "CurrentCount": 123,
          "SuburbId": 123,
          "SuburbName": "ABC",
          "RegionId": 123,
          "RegionName": "ABC",
          "GSRegionId": 123
        },
        {
          "CurrentCount": 123,
          "SuburbId": 123,
          "SuburbName": "ABC",
          "RegionId": 123,
          "RegionName": "ABC",
          "GSRegionId": 123
        }
      ],
      "PerSuburbViewsStatistics": [
        {
        },
        {
        }
      ],
      "ClickToCallCount": 123,
      "MemberIds": [
        123,
        123
      ],
      "ImpressionsCount": 123,
      "ImpressionsInPeriod": 123,
      "ImpressionsCountAvgPerDay": 123
    }
  ],
  "TotalPages": 123
}