# Trade Me Scraper - NZ Marketplace Listings Extractor (`fervent_bus/trademe-scraper`) Actor

Extract listings from Trade Me marketplace - New Zealand #1 auction and classifieds site.

- **URL**: https://apify.com/fervent\_bus/trademe-scraper.md
- **Developed by:** [Archit Khurana](https://apify.com/fervent_bus) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🛒 Trade Me Scraper - New Zealand Marketplace Data Extractor

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-00d4aa?style=flat-square\&logo=apify)](https://apify.com)
[![Python](https://img.shields.io/badge/Python-3.11-3776ab?style=flat-square\&logo=python\&logoColor=white)](https://www.python.org/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue?style=flat-square)](LICENSE)

> **Extract listings from Trade Me** - New Zealand's largest auction and classifieds marketplace. Scrape products, electronics, furniture, and general items with detailed metadata including prices, locations, seller information, and images.

### 🌟 Features

✅ **Comprehensive Search** - Search by keywords, categories, locations, and price ranges\
✅ **Rich Data** - Extract titles, prices, seller info, ratings, images, and more\
✅ **Smart Filtering** - Filter by condition (new/used), location, category, and price\
✅ **Anti-Detection** - Uses Camoufox browser with residential proxies for reliable scraping\
✅ **Flexible Sorting** - Sort by relevance, price, or date\
✅ **Fast & Efficient** - Extracts data from JSON when available, falls back to HTML parsing

### 📊 What Data Can You Extract?

| Field | Description | Example |
|-------|-------------|---------|
| `title` | Listing title | "Apple MacBook Pro 13" 2023" |
| `price` | Current price or bid | "$1,299 NZD" |
| `location` | Seller location/region | "Auckland" |
| `category` | Product category | "Electronics & photography" |
| `condition` | Item condition | "Used" |
| `seller` | Seller username | "tech\_store\_nz" |
| `sellerRating` | Seller feedback rating | "99.5%" |
| `listingId` | Unique listing ID | "4523421234" |
| `listingType` | Auction, Buy Now, or Classified | "Buy Now" |
| `url` | Direct listing URL | "https://www.trademe.co.nz/..." |
| `imageUrl` | Main product image | "https://images.trademe.co.nz/..." |
| `description` | Item description | "Excellent condition laptop..." |
| `postedDate` | When posted | "2024-01-15" |
| `endDate` | Auction end date | "2024-01-20" |
| `scrapedAt` | Extraction timestamp | "2024-01-16T12:30:00Z" |

### 🚀 Quick Start

#### Using Apify Console

1. **Create a task** from this actor
2. **Configure inputs:**
   - Search query (e.g., "laptop", "iphone", "furniture")
   - Category and location filters
   - Price range (min/max in NZD)
   - Max results to scrape
3. **Run the task**
4. **Download results** as JSON, CSV, Excel, or XML

#### Using API

```javascript
const ApifyClient = require('apify-client');

const client = new ApifyClient({
    token: 'YOUR_APIFY_TOKEN',
});

const input = {
    searchQuery: "laptop",
    category: "Electronics & photography",
    location: "Auckland",
    priceMin: 500,
    priceMax: 3000,
    condition: "Any",
    sortBy: "PriceAsc",
    maxResults: 50
};

const run = await client.actor("YOUR_USERNAME/trademe-scraper").call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();

console.log(items);
```

#### Using Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_APIFY_TOKEN')

run_input = {
    "searchQuery": "laptop",
    "category": "Electronics & photography",
    "location": "Auckland",
    "priceMin": 500,
    "priceMax": 3000,
    "maxResults": 50
}

run = client.actor("YOUR_USERNAME/trademe-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### ⚙️ Input Configuration

#### Required Fields

| Field | Type | Description | Example |
|-------|------|-------------|---------|
| `maxResults` | Integer | Maximum listings to scrape (1-1000) | `50` |

#### Optional Search & Filter Fields

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `searchQuery` | String | Keywords to search for | `"laptop"` |
| `category` | String | Product category filter | `"Electronics & photography"` |
| `location` | String | Region/city filter | `"Auckland"` |
| `priceMin` | Integer | Minimum price in NZD | `0` |
| `priceMax` | Integer | Maximum price in NZD | `5000` |
| `condition` | String | Item condition: Any, New, Used | `"Any"` |
| `sortBy` | String | Sort order: Relevance, PriceAsc, PriceDesc, DateDesc, DateAsc | `"Relevance"` |
| `proxyConfiguration` | Object | Apify proxy settings (residential recommended) | `{"useApifyProxy": true}` |

#### Available Categories

- All categories
- Electronics & photography
- Home & living
- Clothing & fashion
- Sports & outdoors
- Baby & kids
- Toys & models
- Books & music
- Health & beauty
- Office & industrial

#### Available Regions

All major New Zealand regions supported: Auckland, Wellington, Canterbury, Waikato, Bay of Plenty, Otago, and more.

### 📈 Use Cases

🔍 **Market Research** - Track product prices and availability across New Zealand\
💼 **Price Monitoring** - Monitor competitor pricing and market trends\
📊 **Data Analysis** - Analyze marketplace trends and consumer behavior\
🤖 **Automation** - Integrate with your workflow via Apify API\
🔔 **Deal Alerts** - Find the best deals on products you're tracking

### 🛡️ Proxy & Anti-Bot Protection

This actor uses **residential proxies** by default for best results. Trade Me has moderate bot protection, so we recommend:

- ✅ Using Apify residential proxies (included in input)
- ✅ Setting reasonable `maxResults` limits
- ✅ Running during off-peak hours for faster performance

### 📝 Notes & Limitations

- **Rate Limits**: Respect Trade Me's terms of service and scrape responsibly
- **Data Accuracy**: Prices and availability change frequently - data is a snapshot
- **Coverage**: Focuses on marketplace listings (general items) - separate actors available for property
- **Updates**: Site structure may change; actor is maintained and updated regularly

### 🤝 Integration with AI Agents

This actor is **fully compatible with AI assistants and automation tools**:

- ✅ **Claude Desktop** via Apify MCP server
- ✅ **ChatGPT** via Apify API integration
- ✅ **Custom AI agents** via RESTful API
- ✅ **Workflow automation** (Make.com, Zapier, n8n)

Perfect for AI-powered market research, automated deal finding, and intelligent price tracking systems.

### 💡 Tips for Best Results

1. **Be Specific** - Use detailed search queries for better matches
2. **Use Filters** - Combine category, location, and price filters to narrow results
3. **Sort Wisely** - Sort by date for newest listings, by price for deals
4. **Check Residential Proxy** - Always use residential proxies for reliable scraping
5. **Reasonable Limits** - Start with smaller `maxResults` (10-50) for testing

### 🔗 Related Actors

- **Trade Me Property Scraper** - For real estate listings
- **Trade Me Motors Scraper** - For vehicle listings
- **NZ Marketplace Aggregator** - Multi-site comparison

### 📞 Support

- **Issues?** Open an issue on GitHub or contact via Apify
- **Feature requests?** Let us know what you'd like to see!
- **Custom solutions?** Available for hire for specialized scraping needs

### 📄 License

Apache 2.0 - See LICENSE file for details.

***

**Made with ❤️ for the New Zealand market**

Compatible with Claude, ChatGPT & AI agents via Apify MCP.

# Actor input Schema

## `searchQuery` (type: `string`):

What to search for (e.g., 'laptop', 'iphone', 'furniture')

## `category` (type: `string`):

Filter by category

## `location` (type: `string`):

Filter by seller location

## `priceMin` (type: `integer`):

Filter by minimum price in NZ Dollars

## `priceMax` (type: `integer`):

Filter by maximum price in NZ Dollars

## `condition` (type: `string`):

Filter by item condition

## `sortBy` (type: `string`):

How to sort the results

## `maxResults` (type: `integer`):

Maximum number of listings to scrape

## `proxyConfiguration` (type: `object`):

Apify proxy settings (residential proxy recommended for best results)

## Actor input object example

```json
{
  "searchQuery": "laptop",
  "category": "Electronics & photography",
  "location": "Auckland",
  "priceMax": 5000,
  "condition": "Any",
  "sortBy": "Relevance",
  "maxResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Link to the dataset with all scraped listings

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQuery": "laptop",
    "category": "Electronics & photography",
    "location": "Auckland",
    "priceMin": 0,
    "priceMax": 5000,
    "condition": "Any",
    "sortBy": "Relevance",
    "maxResults": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("fervent_bus/trademe-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQuery": "laptop",
    "category": "Electronics & photography",
    "location": "Auckland",
    "priceMin": 0,
    "priceMax": 5000,
    "condition": "Any",
    "sortBy": "Relevance",
    "maxResults": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("fervent_bus/trademe-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQuery": "laptop",
  "category": "Electronics & photography",
  "location": "Auckland",
  "priceMin": 0,
  "priceMax": 5000,
  "condition": "Any",
  "sortBy": "Relevance",
  "maxResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call fervent_bus/trademe-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fervent_bus/trademe-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/2wGIsZdV4KeUxXsoz/builds/cvGUT8tcgyVURGh3o/openapi.json
