Search Trade Me listings
Trade Me (New Zealand) marketplace listings for a keyword with category, region, district, condition, price, buy-now, clearance, free shipping, a seller's member id and sort: titles, buy-now and start prices, bids, reserve state, dates, region and suburb, photos and tags. categories, filters and sort_options list what the site offers for the search.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
q | string | Keywords. Example: bike |
category | string | Trade Me category number (e.g. 0005-0380- Cycling). |
region | string | Region id (2 Auckland, 12 Wellington, 16 Canterbury; see filters). |
district | string | District id. |
condition | new | used | new or used. |
price_min | string | Minimum price (NZD). |
price_max | string | Maximum price (NZD). |
buy_now | string | true: buy-now listings only. |
clearance | string | true: clearance only. |
free_shipping | string | true: free shipping only. |
member_id | string | Only this seller's listings (a business seller's member id from a listing). |
filters | string | Other site filters as name:value (names from filters). |
sort | relevance | featured | price_asc | price_desc | buy_now_asc | buy_now_desc | most_bids | newest | closing_soon | title | largest_discount | Sort order. |
limit | integer | Results per page (max 50, default 25). |
page | integer | Results page, 1 for the first. Pass back next_page; null on the last page. |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/trademe/v1/search?q=bike" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/trademe/v1/search",
params={"q": "bike"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/trademe/v1/search");
url.searchParams.set("q", "bike");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).