Website logo

Retrieve the recent searches for the logged in member

Retrieve the recent searches for the logged in member.

URL: https://api.trademe.co.nz/v1/Search/RecentSearches.{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

category_ids String (optional)

Comma separated list of category Ids. Default value is null and all recent searches will be returned.

return_favourite_id Boolean (optional)

true to populate the FavouriteId field. The default is false.

Returns

Collection of <RecentSearch>

A list of recent searches performed by the member.

Id String or null

A unique ID for the search. Used to identify the search when deleting.

SearchApi Enumeration

Indicates which search API should be used to run the search.

General 0

General search.

UsedMotors 1

Used cars.

MotorBoat 2

Motor boats.

MotorBike 3

Motor bikes.

Residential 4

Residential property for sale.

Rental 5

Residential property to rent.

CommercialSale 6

Commercial property for sale.

CommercialLease 7

Commercial property leases.

Rural 8

Rural property.

Lifestyle 9

Lifestyle blocks.

Flatmate 10

Flatmates.

OpenHomes 11

Open homes.

Retirement 12

Retirement villages.

Job 13

Jobs.

NewHomes 14

New Homes property.

Caravan 15

Motors caravan property

Motorhome 16

Motors motorhomes property

SearchString String or null

The parameters to pass to the search API to reproduce the search.

Keywords String or null

If a keyword filter exists, contains the keywords.

Seller <Member> or null

If a seller filter exists, contains the details of that seller.

MemberId Integer

The ID of the member. This may be 0, if we determine it is necessary to protect the member's privacy.

Nickname String or null

The nickname of the member. Some characters may be changed, if we determine it is necessary to protect the member's privacy.

DateAddressVerified DateTime

The date the member was address verified.

DateJoined DateTime

The date the member joined.

UniqueNegative Integer

The number of distinct members who have placed negative feedback against this member.

UniquePositive Integer

The number of distinct members who have placed positive feedback against this member.

FeedbackCount Integer

The member's total feedback (UniquePositive minus UniqueNegative).

IsAddressVerified Boolean

Indicates whether the member has been address verified.

IsDealer Boolean

Indicates whether the member is a car dealer.

IsAuthenticated Boolean

Indicates whether the member is authenticated.

IsInTrade Boolean

Indicates whether the member is a professional trader.

IsTopSeller Boolean

Indicates whether the member is currently a Top Seller

CategoryName String or null

If a category filter exists, contains the full name of the category.

CanonicalPath String or null

If a category filter exists, contains the canonical URL.

Breadcrumbs Collection of <Breadcrumb> or null

If a category filter exists, contains the breadcrumbs for the category.

DisplayName String or null

Displayable name

CanonicalPath String or null

The canonical path up to the current fragment

CanonicalPathFragment String or null

The latest encoded fragment of the canonical path

Name String or null

The name of the attribute type, used to match the breadcrumb fragment to the corresponding UI elements

Value String or null

The underlying value for the breadcrumb fragment, this could be an Attrubute ID, a Category ID or some other value

AreaOfBusiness Enumeration

If a category filter exists, contains the associated business line.

NotSpecified 0

None specified.

All 0

All

Marketplace 1

Marketplace

Property 2

Property

Motors 3

Motors

Jobs 4

Jobs

Services 5

Services

Refinements Collection of <RefinementDescriptor> or null

A list of search filters, excluding keywords, category and seller information.

DisplayName String or null

The name of the refinement, in a form suitable for displaying to users. Can be null when only the display value is required.

DisplayValue String or null

The value of the refinement as it needs to be displayed to the end users.

FavouriteId Integer or null

The ID of a favourite search that corresponds to this recent search, if there is a favourite search that matches.

Title String or null

A generated Title based on the keywords, categories, and location of the search.

Example XML Response (switch to JSON)

<RecentSearchCollection xmlns="http://api.trademe.co.nz/v1">
  <RecentSearch>
    <Id>ABC</Id>
    <SearchApi>General</SearchApi>
    <SearchString>ABC</SearchString>
    <Keywords>ABC</Keywords>
    <Seller>
      <MemberId>123</MemberId>
      <Nickname>ABC</Nickname>
      <DateAddressVerified>2018-01-01T00:00:00Z</DateAddressVerified>
      <DateJoined>2018-01-01T00:00:00Z</DateJoined>
      <UniqueNegative>123</UniqueNegative>
      <UniquePositive>123</UniquePositive>
      <FeedbackCount>123</FeedbackCount>
      <IsAddressVerified>false</IsAddressVerified>
      <IsDealer>false</IsDealer>
      <IsAuthenticated>false</IsAuthenticated>
      <IsInTrade>false</IsInTrade>
      <IsTopSeller>false</IsTopSeller>
    </Seller>
    <CategoryName>ABC</CategoryName>
    <CanonicalPath>ABC</CanonicalPath>
    <Breadcrumbs>
      <Breadcrumb>
        <DisplayName>ABC</DisplayName>
        <CanonicalPath>ABC</CanonicalPath>
        <CanonicalPathFragment>ABC</CanonicalPathFragment>
        <Name>ABC</Name>
        <Value>ABC</Value>
      </Breadcrumb>
      <Breadcrumb>
        <DisplayName>ABC</DisplayName>
        <CanonicalPath>ABC</CanonicalPath>
        <CanonicalPathFragment>ABC</CanonicalPathFragment>
        <Name>ABC</Name>
        <Value>ABC</Value>
      </Breadcrumb>
    </Breadcrumbs>
    <AreaOfBusiness>NotSpecified</AreaOfBusiness>
    <Refinements>
      <RefinementDescriptor>
        <DisplayName>ABC</DisplayName>
        <DisplayValue>ABC</DisplayValue>
      </RefinementDescriptor>
      <RefinementDescriptor>
        <DisplayName>ABC</DisplayName>
        <DisplayValue>ABC</DisplayValue>
      </RefinementDescriptor>
    </Refinements>
    <FavouriteId>123</FavouriteId>
    <Title>ABC</Title>
  </RecentSearch>
  <RecentSearch>
    <Id>ABC</Id>
    <SearchApi>General</SearchApi>
    <SearchString>ABC</SearchString>
    <Keywords>ABC</Keywords>
    <Seller>
      <MemberId>123</MemberId>
      <Nickname>ABC</Nickname>
      <DateAddressVerified>2018-01-01T00:00:00Z</DateAddressVerified>
      <DateJoined>2018-01-01T00:00:00Z</DateJoined>
      <UniqueNegative>123</UniqueNegative>
      <UniquePositive>123</UniquePositive>
      <FeedbackCount>123</FeedbackCount>
      <IsAddressVerified>false</IsAddressVerified>
      <IsDealer>false</IsDealer>
      <IsAuthenticated>false</IsAuthenticated>
      <IsInTrade>false</IsInTrade>
      <IsTopSeller>false</IsTopSeller>
    </Seller>
    <CategoryName>ABC</CategoryName>
    <CanonicalPath>ABC</CanonicalPath>
    <Breadcrumbs>
      <Breadcrumb>
        <DisplayName>ABC</DisplayName>
        <CanonicalPath>ABC</CanonicalPath>
        <CanonicalPathFragment>ABC</CanonicalPathFragment>
        <Name>ABC</Name>
        <Value>ABC</Value>
      </Breadcrumb>
      <Breadcrumb>
        <DisplayName>ABC</DisplayName>
        <CanonicalPath>ABC</CanonicalPath>
        <CanonicalPathFragment>ABC</CanonicalPathFragment>
        <Name>ABC</Name>
        <Value>ABC</Value>
      </Breadcrumb>
    </Breadcrumbs>
    <AreaOfBusiness>NotSpecified</AreaOfBusiness>
    <Refinements>
      <RefinementDescriptor>
        <DisplayName>ABC</DisplayName>
        <DisplayValue>ABC</DisplayValue>
      </RefinementDescriptor>
      <RefinementDescriptor>
        <DisplayName>ABC</DisplayName>
        <DisplayValue>ABC</DisplayValue>
      </RefinementDescriptor>
    </Refinements>
    <FavouriteId>123</FavouriteId>
    <Title>ABC</Title>
  </RecentSearch>
</RecentSearchCollection>

Example JSON Response (switch to XML)

[
  {
    "Id": "ABC",
    "SearchApi": 0,
    "SearchString": "ABC",
    "Keywords": "ABC",
    "Seller": {
      "MemberId": 123,
      "Nickname": "ABC",
      "DateAddressVerified": "\/Date(1514764800)\/",
      "DateJoined": "\/Date(1514764800)\/",
      "UniqueNegative": 123,
      "UniquePositive": 123,
      "FeedbackCount": 123,
      "IsAddressVerified": false,
      "IsDealer": false,
      "IsAuthenticated": false,
      "IsInTrade": false,
      "IsTopSeller": false
    },
    "CategoryName": "ABC",
    "CanonicalPath": "ABC",
    "Breadcrumbs": [
      {
        "DisplayName": "ABC",
        "CanonicalPath": "ABC",
        "CanonicalPathFragment": "ABC",
        "Name": "ABC",
        "Value": "ABC"
      },
      {
        "DisplayName": "ABC",
        "CanonicalPath": "ABC",
        "CanonicalPathFragment": "ABC",
        "Name": "ABC",
        "Value": "ABC"
      }
    ],
    "AreaOfBusiness": 0,
    "Refinements": [
      {
        "DisplayName": "ABC",
        "DisplayValue": "ABC"
      },
      {
        "DisplayName": "ABC",
        "DisplayValue": "ABC"
      }
    ],
    "FavouriteId": 123,
    "Title": "ABC"
  },
  {
    "Id": "ABC",
    "SearchApi": 0,
    "SearchString": "ABC",
    "Keywords": "ABC",
    "Seller": {
      "MemberId": 123,
      "Nickname": "ABC",
      "DateAddressVerified": "\/Date(1514764800)\/",
      "DateJoined": "\/Date(1514764800)\/",
      "UniqueNegative": 123,
      "UniquePositive": 123,
      "FeedbackCount": 123,
      "IsAddressVerified": false,
      "IsDealer": false,
      "IsAuthenticated": false,
      "IsInTrade": false,
      "IsTopSeller": false
    },
    "CategoryName": "ABC",
    "CanonicalPath": "ABC",
    "Breadcrumbs": [
      {
        "DisplayName": "ABC",
        "CanonicalPath": "ABC",
        "CanonicalPathFragment": "ABC",
        "Name": "ABC",
        "Value": "ABC"
      },
      {
        "DisplayName": "ABC",
        "CanonicalPath": "ABC",
        "CanonicalPathFragment": "ABC",
        "Name": "ABC",
        "Value": "ABC"
      }
    ],
    "AreaOfBusiness": 0,
    "Refinements": [
      {
        "DisplayName": "ABC",
        "DisplayValue": "ABC"
      },
      {
        "DisplayName": "ABC",
        "DisplayValue": "ABC"
      }
    ],
    "FavouriteId": 123,
    "Title": "ABC"
  }
]