# Gumtree Scraper — UK Classifieds Data (`haketa/gumtree-scraper`) Actor

Gumtree.com scraper for UK classifieds. Extract listings by keyword or category (cars, property, jobs, marketplace): price, title, location, seller type (private/trade), description and photos. Private/trade lead-gen. Export JSON, CSV, Excel.

- **URL**: https://apify.com/haketa/gumtree-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** E-commerce, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.75 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Gumtree Scraper — UK Classifieds, Listings, Prices & Leads 🇬🇧

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-orange?logo=apify)](https://apify.com/haketa/gumtree-scraper)
[![Data Quality](https://img.shields.io/badge/Data%20Quality-Verified%20100%25-brightgreen)](#-field-reference)
[![Pricing](https://img.shields.io/badge/Pricing-Pay%20Per%20Result-blue)](#-scalability--deep-pagination-guide)
[![Maintenance](https://img.shields.io/badge/Maintained-Active%202026-success)](#-changelog)
[![Exports](https://img.shields.io/badge/Export-JSON%20|%20CSV%20|%20Excel-purple)](#-export-formats--integrations)

Extract listings, asking prices in GBP (£), seller types (`private` vs `trade`), geographic UK locations, contact details, and item photos from [Gumtree.com](https://www.gumtree.com) — the United Kingdom's leading classifieds platform. This **Gumtree scraper** delivers enterprise-grade data extraction for resale arbitrage, used car valuation, property market intelligence, and B2B merchant prospecting without requiring user credentials, browser emulation, or manual maintenance.

Export structured UK marketplace data directly to **JSON, CSV, Excel, or API**.

***

### ⚡ At a glance

| Feature | Specification |
|---|---|
| **Target Website** | `gumtree.com` (United Kingdom's #1 classifieds site) |
| **Data Scope** | Motors, property to rent/sale, jobs, services, consumer goods, pets, electronics |
| **Search Modes** | Keyword searches (`iphone`, `ford transit`, `sofa`), category feeds, or direct Start URLs |
| **Pagination Scale** | **1,000+ results** with automatic multi-page traversal (up to 24 listings/page) |
| **Core Identifiers** | Listing ID, canonical Gumtree URL, ad headline, numeric price in GBP (£) |
| **Lead Generation** | Seller type segmentation (`private` vs commercial `trade`), seller verified badges |
| **Geographic Intelligence** | UK town, county, London borough, postal neighborhood |
| **Detail Enrichment** | Optional full description, phone numbers (where available), extended photo galleries |
| **Deduplication** | Automatic across keywords, categories, and paginated crawl passes |
| **Output Formats** | JSON, CSV, XML, Excel, NDJSON, HTML table, RSS, Apify REST API |
| **Default Proxy** | Apify Proxy Datacenter (cost-efficient, ultra-fast response times) |

***

### 🔎 Why scrape Gumtree?

**Gumtree.com** is an essential pillar of the UK circular economy. Every month, millions of British consumers and trade businesses transact across used cars, commercial vans, private rentals, freelance services, home furnishings, and refurbished electronics.

Because Gumtree captures asking prices and merchant listings across local UK communities before transactions finalize, it provides an unparalleled real-time lens into **secondary market price equilibrium, local supply distribution, and commercial trade seller penetration**.

Manual data extraction from Gumtree is hindered by strict session rate-limiting, complex pagination, and multi-category layout differences. This **Gumtree data extractor** provides an automated, scalable pipeline to collect clean, normalized British classifieds data in minutes.

#### Popular use cases:

- 🚗 **Used car & motor trade valuation** — Track Ford, Vauxhall, BMW, and commercial van listings across England, Scotland, Wales, and Northern Ireland with mileage, year, and trade dealer tags.
- 🏢 **B2B lead generation & trade prospecting** — Filter by `sellerType: "trade"` to assemble directory lists of commercial used-goods dealers, mobile mechanics, landlords, and local tradespeople.
- 💰 **Second-hand retail arbitrage & flipping** — Identify newly published electronics (iPhones, gaming PCs, cameras, audio gear) listed by private sellers well below fair market value.
- 🏠 **Rental property & flatshare tracking** — Monitor private landlord rental listings, asking prices per month (PCM), and room availability across London and regional UK cities.
- 📊 **Competitive price indexing & inflation trends** — Benchmark resale pricing in British pounds (GBP) across appliances, tools, and consumer electronics.
- 🤖 **AI training datasets & predictive pricing** — Feed real-world British English product descriptions, condition details, and transactional metadata into valuation models.

***

### ✨ Key features

- 🔍 **Multi-keyword querying** — Supply an array of search terms (`["iphone 15", "ford transit", "leather sofa"]`). Each keyword is systematically crawled and de-duplicated.
- 🔗 **Direct URL ingestion** — Paste any complex filtered URL from Gumtree (including specific category trees, geographic radii, or price filters) into **Start URLs**.
- 📄 **Deep pagination (1,000+ items)** — Automatically walks result pages (~24 listings/page). Set `maxItems: 0` and `maxPagesPerSearch: 0` for complete catalog extraction.
- 💷 **Clean numeric price parsing** — Extracts pristine numeric prices in GBP (£) alongside currency tags, ready for immediate spreadsheet or database analysis.
- 👥 **Trade vs Private seller filtering** — Seamlessly differentiates individual hobby sellers (`private`) from registered businesses and dealerships (`trade`).
- 📍 **Granular UK location tags** — Captures regional towns, cities, London boroughs, and postal districts for spatial clustering.
- 🚚 **Delivery & trust flags** — Collects delivery availability tags (`deliveryOption`, `isDelivery`) and the official GBG identity verification badge (`sellerVerified`).
- 📝 **Optional detail page enrichment** — Toggle `scrapeDetails` to retrieve complete description text, seller contact phone numbers (when public), and extra photos.
- ⚡ **Lightweight pure HTTP engine** — Operates without bulky headless browsers to pull hundreds of listings in seconds with low memory overhead.

***

### 📥 Input parameters

The actor is ready to run out of the box with zero required fields, while offering deep configuration options for specialized workflows.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchTerms` | Array of strings | `["iphone"]` | List of UK search queries. Each keyword is executed and aggregated independently. |
| `startUrls` | Array of strings | `[]` | Optional direct Gumtree category or search URLs. When provided, takes precedence over search terms. |
| `priceMin` | Integer | *None* | Minimum listing price in British pounds (GBP £). |
| `priceMax` | Integer | *None* | Maximum listing price in British pounds (GBP £). |
| `maxItems` | Integer | `100` | Maximum total records to scrape across all queries. Set `0` for unlimited crawling. |
| `maxPagesPerSearch` | Integer | `0` | Maximum pages to crawl per keyword or URL (≈24 items/page). Set `0` for auto/unlimited. |
| `scrapeDetails` | Boolean | `false` | When `true`, visits each listing URL to extract the complete ad description, full photo gallery, and public phone. |
| `proxyConfiguration` | Object | `{ "useApifyProxy": true }` | Apify Proxy configuration. Standard datacenter proxies operate seamlessly out of the box. |

#### Example input configuration

```json
{
  "searchTerms": ["ford focus", "vauxhall corsa"],
  "priceMin": 1000,
  "priceMax": 6000,
  "maxItems": 250,
  "maxPagesPerSearch": 0,
  "scrapeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

***

### 📤 Output dataset

Every scraped Gumtree listing is parsed into a clean JSON record ready for immediate CSV/Excel export or downstream database ingestion.

#### Real data sample

```json
{
  "id": "1487293812",
  "url": "https://www.gumtree.com/p/cars-vans-motorbikes/2016-ford-focus-1.0-ecoboost-titanium/1487293812",
  "title": "2016 Ford Focus 1.0 EcoBoost Titanium 5dr Hatchback Petrol Manual",
  "price": 4250,
  "currency": "GBP",
  "location": "Birmingham, West Midlands",
  "description": "Clean 2016 Ford Focus Titanium. Full service history, 2 keys, 68,000 miles. Drives great, ULEZ compliant.",
  "sellerType": "trade",
  "age": "2 days ago",
  "category": "Cars",
  "categoryId": "2784",
  "numberOfImages": 8,
  "deliveryOption": "Collection only",
  "isDelivery": false,
  "sellerVerified": true,
  "featured": false,
  "urgent": false,
  "hasVideo": false,
  "imageUrl": "https://i.ebayimg.com/images/g/abc123hero/s-l800.jpg",
  "searchTerm": "ford focus",
  "scrapedAt": "2026-11-10T14:45:00.000Z"
}
```

***

### 📋 Field reference

#### 🏷️ Identity & Core Metadata

| Field Name | Type | Coverage | Description |
|---|---|---|---|
| `id` | String | 🟢 High (100%) | Unique Gumtree listing identifier. Natural key for deduplication. |
| `url` | String | 🟢 High (100%) | Canonical listing web address on Gumtree.com. |
| `title` | String | 🟢 High (100%) | Full advertisement headline. |
| `category` | String | 🟢 High (100%) | Category taxonomy name (e.g. `Cars`, `Mobile Phones`, `Property to Rent`). |
| `categoryId` | String | 🟢 High (100%) | Gumtree internal category numeric ID. |
| `age` | String | 🟢 High (98%) | Relative listing age (e.g., `3 hours ago`, `Just now`, `5 days ago`). |
| `searchTerm` | String | 🟡 Conditional | Search keyword that produced this record. |
| `scrapedAt` | String | 🟢 High (100%) | ISO timestamp marking exact crawl execution time. |

#### 💰 Pricing & Financials

| Field Name | Type | Coverage | Description |
|---|---|---|---|
| `price` | Number | 🟢 High (98%) | Listing price parsed as a clean integer or float in GBP (£). `null` for Freebies or swap ads. |
| `currency` | String | 🟢 High (100%) | Standardized ISO currency string, consistently `GBP`. |

#### 👤 Seller Profile & B2B Lead Signals

| Field Name | Type | Coverage | Description |
|---|---|---|---|
| `sellerType` | String | 🟢 High (100%) | Classification of seller: `private` (individual consumer) or `trade` (business / dealer). |
| `sellerVerified` | Boolean | 🟡 Conditional | `true` when the seller has completed GBG identity verification. |
| `sellerName` | String | 🟡 Conditional | Seller public name or dealership title (populated when `scrapeDetails` is on). |
| `phone` | String | 🟡 Conditional | Public telephone number where exposed on the listing page. |

#### 📍 Location & Geography

| Field Name | Type | Coverage | Description |
|---|---|---|---|
| `location` | String | 🟢 High (100%) | UK city, county, London borough, or neighborhood (e.g., `Manchester`, `Hackney, London`). |

#### 📦 Commerce & Media Signals

| Field Name | Type | Coverage | Description |
|---|---|---|---|
| `deliveryOption` | String | 🟢 High (95%) | Shipping policy: `Collection only`, `Delivery available`, or `Postage and collection`. |
| `isDelivery` | Boolean | 🟢 High (95%) | Flag indicating whether the seller supports postal dispatch. |
| `numberOfImages` | Number | 🟢 High (98%) | Total number of gallery photographs uploaded for this item. |
| `imageUrl` | String | 🟢 High (96%) | High-resolution hero image URL. |
| `featured` | Boolean | 🟡 Conditional | `true` when the seller purchased a Gumtree Featured badge. |
| `urgent` | Boolean | 🟡 Conditional | `true` when marked with an Urgent sale badge. |
| `hasVideo` | Boolean | 🟡 Conditional | `true` when the seller attached a video walkthrough. |

#### 📝 Detail Enrichment (Optional)

| Field Name | Type | Coverage | Description |
|---|---|---|---|
| `description` | String | 🟢 High (95%) | Full listing description text (extended further when `scrapeDetails` is enabled). |

***

### 📈 Scalability & Deep Pagination Guide

This scraper handles everything from targeted daily monitoring to deep market-wide extraction:

1. **Auto-pagination**: By setting `maxPagesPerSearch: 0`, the scraper automatically advances across all available search pages until exhaustion or reaching `maxItems`.
2. **Deep collection (1,000+ items)**: To extract large catalogs across the UK, set `maxItems: 0` and provide high-volume search queries or broad category URLs.
3. **Smart deduplication**: The actor maintains an internal in-memory Bloom filter of listing IDs, guaranteeing zero duplicate entries in your final dataset even when keyword results overlap.
4. **Session rotation**: Automatically switches clean datacenter IP sessions per page request, bypassing Gumtree's aggressive pagination throttling without costly residential proxy bandwidth.

***

### 🛠️ Step-by-step usage guide

1. **Open the actor**: Navigate to **Gumtree Scraper** on Apify Console.
2. **Configure your search**:
   - For keyword searches, enter your target queries into **Search Terms** (e.g. `iphone 14`, `bmw 3 series`).
   - For specific UK regions or pre-filtered price tiers, visit [Gumtree.com](https://www.gumtree.com), configure your filters, and paste the URL into **Start URLs**.
3. **Select seller segmentation**: Scrape broadly, then filter `sellerType: "trade"` for commercial UK lead generation or `sellerType: "private"` for peer-to-peer resale arbitrage.
4. **Set execution limits**: Enter your target quantity into **Max Items** (e.g. `500` for testing, or `0` for full catalog extraction).
5. **Start crawl**: Click **Start**. Monitor live progress in the log stream showing collected items and pagination progression.
6. **Export results**: Download your dataset in JSON, CSV, Excel, or connect downstream via the Apify REST API.

***

### 💻 API integration & code examples

Integrate live UK classifieds feeds directly into your applications using official Apify client libraries.

#### Node.js / JavaScript

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

const client = new ApifyClient({
    token: process.env.APIFY_TOKEN,
});

const run = await client.actor('haketa/gumtree-scraper').call({
    searchTerms: ['macbook pro', 'ipad air'],
    maxItems: 200,
    priceMin: 300,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Successfully scraped ${items.length} items from Gumtree.`);
console.table(items.slice(0, 5), ['title', 'price', 'sellerType', 'location']);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.getenv('APIFY_TOKEN'))

run_input = {
    'searchTerms': ['ford transit', 'mercedes sprinter'],
    'priceMin': 3000,
    'priceMax': 15000,
    'maxItems': 150,
}

run = client.actor('haketa/gumtree-scraper').call(run_input=run_input)

dataset_items = client.dataset(run['defaultDatasetId']).list_items().items
for item in dataset_items[:5]:
    print(f"[£{item['price']}] {item['title']} - {item['location']}")
```

***

### 🔗 Export formats & integrations

- **Direct File Downloads**: Export instantly in JSON, CSV, Microsoft Excel (XLSX), XML, and RSS formats.
- **Cloud Storage Pipelines**: Stream output directly to Amazon S3, Google Cloud Storage, or Microsoft Azure Blob.
- **No-Code Automation**: Trigger workflows in Zapier, Make (Integromat), or n8n upon run completion.
- **Database Warehousing**: Pipe classifieds feeds into Google BigQuery, Snowflake, PostgreSQL, or Supabase.
- **Slack & Webhooks**: Receive real-time alerts whenever newly listed items match your specific price arbitrage criteria.

***

### 🇬🇧 UK Regional Market Coverage

Gumtree covers every geographic region across the United Kingdom. You can run nationwide searches or isolate specific territories:

| UK Region | Major Urban Centers | High-Volume Market Sectors |
|---|---|---|
| **Greater London** | Central London, Hackney, Croydon, Ealing | Flatshares, designer clothing, electronics, high-end furniture |
| **West Midlands** | Birmingham, Coventry, Wolverhampton | Automotive trade, commercial vans, power tools, manufacturing goods |
| **Greater Manchester & North West** | Manchester, Liverpool, Bolton, Salford | Student tech, appliances, consumer goods, musical gear |
| **West Yorkshire** | Leeds, Bradford, Huddersfield | Construction equipment, textiles, used vehicles, home furnishings |
| **Scotland** | Glasgow, Edinburgh, Aberdeen, Dundee | Property rentals, outdoor equipment, used cars, musical instruments |
| **South West England** | Bristol, Plymouth, Exeter, Bath | Bicycles, campervans, surf gear, vintage home decor |
| **East Midlands** | Nottingham, Leicester, Derby | Trade vehicles, warehouse surplus, consumer electronics |
| **Northern Ireland & Wales** | Belfast, Cardiff, Swansea, Derry | Agricultural tools, livestock gear, vehicles, household items |

***

### 📊 UK Classifieds Landscape Comparison

| Platform | Primary Focus | Best Use Case | Anti-Bot Difficulty |
|---|---|---|---|
| **Gumtree UK** | General classifieds, motors, trade services, property | Resale arbitrage, used cars, local B2B trade lead generation | Low (Fast pure HTTP) |
| **Facebook Marketplace** | Local peer-to-peer neighborhood goods | Hyper-local consumer sales | High (Requires account & browser) |
| **AutoTrader UK** | Dedicated automotive dealership stock | Professional car dealer pricing and valuations | Moderate (Cloudflare / DataDome) |
| **eBay UK** | Fixed price & auction consumer goods | National parcel delivery retail | Moderate |
| **Preloved UK** | Second-hand household and vintage goods | Vintage furniture and hobby items | Low |

***

### 💡 Practical scraping strategies & tips for Gumtree UK

#### 1. Second-hand car trade intelligence

The UK used car market is massive on Gumtree Motors. Filter searches by brand and model (`ford fiesta`, `volkswagen golf`, `nissan qashqai`) and inspect the `sellerType`. Trade listings reveal independent UK dealerships and stock turnover rates, while private listings help benchmark realistic consumer asking prices.

#### 2. Commercial van & fleet prospecting

Tradespeople and builders across the UK source vans via Gumtree. Queries like `transit custom`, `vivaro`, or `transporter` surface active trade sellers. You can build high-converting B2B outreach lists of independent vehicle dealers and commercial leasing agents across regional hubs.

#### 3. London room & flatshare monitoring

Gumtree is a prominent channel for London flatshares and private room rentals. By passing London rental category URLs into **Start URLs** with price caps, property managers and prospective tenants can monitor newly listed rooms before they are taken.

***

### ❓ Frequently Asked Questions

##### Do I need a Gumtree account or UK phone number?

No. The scraper accesses only public listing records and requires no user account, phone verification, or cookies.

##### How does the scraper distinguish private sellers from trade businesses?

Gumtree classifies commercial advertisements with a trade flag. The actor captures this directly in `sellerType` (`trade` vs `private`), making B2B lead generation straightforward.

##### Can I scrape Gumtree Motors, Property, and Jobs?

Yes. You can paste any category or search URL from Gumtree Motors, Gumtree Property, Gumtree Jobs, or Gumtree Services directly into **Start URLs**.

##### Are prices always in British pounds (GBP £)?

Yes. All prices are parsed as numeric values in British pounds, and the `currency` field is standardized to `GBP`.

##### How fast can I scrape 1,000+ items?

Because the scraper connects via lightweight, pure HTTP requests without loading heavy browser scripts, extracting 1,000 items takes under 60 seconds on standard Apify datacenter proxies.

##### What happens if a listing has no price?

Ad listings offering swaps or free collection ("Freebies") will return `price: null` while preserving all other listing details and descriptions.

##### When are phone numbers available?

Phone numbers are only extracted when `scrapeDetails: true` is enabled AND the seller has chosen to display their contact number publicly on the Gumtree listing page. Many private sellers prefer in-app messaging, while automotive and trade dealers routinely publish contact telephone numbers.

##### Can I schedule automatic recurring runs?

Yes. You can use Apify Schedules to trigger this actor hourly or daily, feeding new listing feeds into Google Sheets, Airtable, or webhook endpoints for automated deal notifications.

##### How does deduplication work across keywords?

The actor hashes unique Gumtree listing IDs during execution. If an ad appears across multiple keyword searches (e.g., `ford focus` and `used cars birmingham`), it will only be pushed to the dataset once.

##### What are the best settings for maximum speed?

For maximum speed, keep `scrapeDetails: false`. The scraper will extract ~24 listings per HTTP request, finishing a 500-item crawl in roughly 15 to 25 seconds.

***

### 📋 Changelog

#### Version 1.2 (2026-11)

- **Deep pagination unlocked**: Enhanced multi-page crawler to support 1,000+ listings per search without pagination caps.
- **Unlimited page handling**: Configured `maxPagesPerSearch: 0` as auto/unlimited governed by `maxItems`.
- **Fast prefill optimization**: Streamlined initial run startup latency down to under 25 seconds.
- **Normalized seller classification**: Enhanced `sellerType` detection (`trade` vs `private`) and GBG verified badges.
- **Session rotation stability**: Refined fresh session creation per page to avoid rate-limiting during deep runs.

#### Version 1.1 (2026-10)

- Added direct URL parsing support for complex category and filtered Start URLs.
- Implemented optional deep listing enrichment (`scrapeDetails`) for extended description and contact phone fields.
- Added automated deduplication by listing ID across multi-term executions.

#### Version 1.0 (2026-09)

- Initial production release supporting keyword search, GBP price parsing, location, and trade seller classification.

# Changelog

This Actor's version history is a separate document: https://apify.com/haketa/gumtree-scraper/changelog.md

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords to search across all Gumtree categories, e.g. 'iphone', 'ford focus', 'sofa'. Each is searched separately. Leave empty if you use Start URLs.

## `startUrls` (type: `array`):

Optional. Paste full Gumtree search/category URLs to scrape them directly (e.g. cars in London, property to rent). When provided, Search Terms and filters below are ignored for these URLs.

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

Only listings at or above this price.

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

Only listings at or below this price.

## `scrapeDetails` (type: `boolean`):

Open each ad for the full description, seller name/type and phone where available. Slower but richer.

## `maxItems` (type: `integer`):

Maximum number of listings to collect across all searches. Set to 0 for unlimited pagination.

## `maxPagesPerSearch` (type: `integer`):

How many result pages to scrape per search term / URL. Each page has about 24 listings. Set to 0 for unlimited (governed by Max Items).

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

Apify Proxy (Datacenter) is enabled by default and works out of the box. Residential is not recommended (unnecessary per-GB cost).

## Actor input object example

```json
{
  "searchTerms": [
    "iphone"
  ],
  "startUrls": [],
  "scrapeDetails": false,
  "maxItems": 100,
  "maxPagesPerSearch": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Open to view and export all scraped listings (JSON, CSV, Excel).

# 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 = {
    "searchTerms": [
        "iphone"
    ],
    "startUrls": [],
    "scrapeDetails": false,
    "maxItems": 100,
    "maxPagesPerSearch": 0,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/gumtree-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 = {
    "searchTerms": ["iphone"],
    "startUrls": [],
    "scrapeDetails": False,
    "maxItems": 100,
    "maxPagesPerSearch": 0,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/gumtree-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 '{
  "searchTerms": [
    "iphone"
  ],
  "startUrls": [],
  "scrapeDetails": false,
  "maxItems": 100,
  "maxPagesPerSearch": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call haketa/gumtree-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,haketa/gumtree-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/cdEOlcPmqMID3f9Cn/builds/j4wBnssAhJiuyMgGN/openapi.json
