# Gumtree Scraper (`solidcode/gumtree-scraper`) Actor

\[💰 $1.5 / 1K] Extract classified listings from Gumtree across the UK, Australia, and South Africa. Get titles, prices, locations, descriptions, images, attributes (beds/baths, mileage/year, etc.), seller info, and contact details for cars, property, jobs, services, and general for-sale items.

- **URL**: https://apify.com/solidcode/gumtree-scraper.md
- **Developed by:** [SolidCode](https://apify.com/solidcode) (community)
- **Categories:** Lead generation, Real estate, Automation
- **Stats:** 16 total users, 4 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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

## Gumtree Scraper

Pull classified ads from Gumtree at scale across three country sites — UK (gumtree.com), South Africa (gumtree.co.za), and Australia (gumtree.com.au). Get titles, prices in local currency, locations with geo-coordinates, descriptions, image galleries, structured attributes (mileage, year, beds, baths), seller name and type, and phone numbers where the seller has published one. Built for classifieds resellers, used-car dealers, and pricing-intelligence teams who need fresh, structured Gumtree data without stitching together three different country sites and parsing inconsistent HTML.

### Why This Scraper?

- **Three country sites, one schema** — UK, South Africa, and Australia listings normalised into a single flat row shape with the same 27 fields, so a downstream CSV doesn't care which domain a listing came from.
- **Cars & Vehicles across the UK, ZA, and AU** — used-car pricing in the United Kingdom, pan-regional South Africa (`gumtree.co.za/s-cars-bakkies`), and Australia-wide (`gumtree.com.au` cars), with mileage, year, transmission, fuel type, body type, make, model, and drivetrain pulled into structured `attributes`.
- **Six UK + ZA top-level categories** — Cars & Vehicles, Property (Houses & Flats), Jobs, Pets, Community, and the For Sale general-goods catalogue. Australia is focused on Cars & Vehicles.
- **Daily monitoring via `listingStartDate` early-stop** — set a cutoff date and pagination stops the moment listings get older than that, so an overnight delta run pays for new ads only — typically a 90% credit saving versus a full re-crawl.
- **Seller-type identification for trust signals** — every listing tagged `business` vs `private`, with the seller display name captured, so dealer-only or private-only filtering happens at the dataset level instead of in your post-processing.
- **Geo-coordinates and postcodes on detail rows** — latitude, longitude, and postcode populated where Gumtree publishes rich location data on the listing detail page, ready for map plotting or radius search.
- **Free-text location or postcode prefix** — `London`, `Manchester`, `Cape Town`, `Perth`, `SW1A` all resolve to the right region slug automatically; no need to hand-craft `/cars/uk/london` style paths.
- **Phone-number capture for South Africa & Australia cars** — toggle `includePhone` to pick up the seller's published phone number on `gumtree.co.za` listings and `gumtree.com.au` cars where the dealer has exposed it. United Kingdom phone numbers stay behind Gumtree's click-to-reveal masking and are reported as `null` rather than returned half-masked.
- **Up to 50,000 listings per run** with `maxResults: 0` for unlimited (a 50k safety cap applies). Each individual search caps at roughly 1,800 rows from page-pagination depth — for larger pulls, split your run across multiple `startUrls`.

### Use Cases

**Market Research & Pricing Intelligence**

- Track second-hand price curves for iPhones, PS5s, or vintage furniture across UK and ZA monthly snapshots
- Compare regional used-car pricing — same make/model, mileage band, in London vs Manchester vs Cape Town vs Sydney
- Benchmark dealer asking prices against private-seller asking prices on the same model
- Build a "weeks on site" indicator from `postedAt` + `daysOnSite` to flag stale inventory

**Used-Car & Dealer Intelligence**

- Pull every Cars & Vehicles listing across UK, AU, and ZA on a single daily run, segmented by `sellerType`
- Mileage, year, transmission, fuel type, body type, make, model — already broken out under `attributes` for direct CSV column mapping
- Identify dealers running aged stock by joining `sellerName` + `postedAt` over a 30-day window
- Spot pricing anomalies (private listings 20%+ below dealer median for the same car) for arbitrage

**Lead Generation & Outreach**

- Capture seller name and (with `includePhone` on) phone number for direct dealer or seller outreach (best on ZA and AU cars)
- Filter by `sellerType: private` to find homeowners posting "wanted" ads in the For Sale category
- Build region-specific seller directories across the UK and South Africa from the Jobs, Pets, or For Sale catalogues

**Competitive & Reseller Intelligence**

- Watch a competitor's seller name across the UK For Sale category to track their full inventory
- Find arbitrage opportunities — low-price UK listings of items that resell at higher prices on eBay or Vinted
- Monitor new listings in a category every 6 hours by combining `sortBy: Most Recent` with `listingStartDate`
- Identify high-volume sellers (more than 50 active ads) for B2B prospecting

**Journalism & Public-Interest Research**

- Map UK rental-market data across regional postcodes (Property category, beds/baths in `attributes`)
- Track Jobs-category postings by location to surface regional hiring trends
- Quantify second-hand market activity in cost-of-living stories using listing counts and median asking prices

### Getting Started

#### Simple — UK keyword search

```json
{
    "searchKeyword": "iPhone 15",
    "region": "uk",
    "maxResults": 50
}
```

#### South Africa cars with a price range

```json
{
    "searchKeyword": "Toyota Hilux",
    "region": "za",
    "category": "cars-vehicles",
    "minPrice": 100000,
    "maxPrice": 300000,
    "sortBy": "price_low_high",
    "maxResults": 200
}
```

#### UK full-filter run with paste-mode URLs

```json
{
    "startUrls": [
        "https://www.gumtree.com/cars/uk/london",
        "https://www.gumtree.com/flats-houses/uk/manchester?max_price=1200"
    ],
    "searchKeyword": "Ford Focus",
    "region": "uk",
    "location": "Birmingham",
    "category": "cars-vehicles",
    "sortBy": "most_recent",
    "minPrice": 2000,
    "maxPrice": 8000,
    "includeListingDetails": true,
    "includePhone": true,
    "maxResults": 500
}
```

#### Daily incremental monitoring — UK new listings only

Run this every 24 hours with yesterday's date — pagination stops the moment Gumtree returns an ad older than the cutoff, so you only pay for new posts:

```json
{
    "searchKeyword": "MacBook Pro",
    "region": "uk",
    "category": "for-sale",
    "sortBy": "most_recent",
    "listingStartDate": "2026-05-15",
    "maxResults": 0
}
```

### Input Reference

#### What to Scrape

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `startUrls` | URL\[] | `[]` | Paste Gumtree search, category, or individual listing URLs. Works with gumtree.com (UK), gumtree.com.au (Australia), and gumtree.co.za (South Africa). Mix any combination — the region is detected per URL. Filters in the URL are kept as-is. |
| `searchKeyword` | string | `""` | Keyword to search across Gumtree (e.g. "iPhone 15", "Ford Focus", "2 bed flat"). Combined with the region, location, and category below. Leave blank to browse a whole category or region. |
| `region` | select | `United Kingdom (gumtree.com)` | Which Gumtree region to search when using the keyword/location/category fields. Options: **United Kingdom (gumtree.com)**, **Australia (gumtree.com.au)**, **South Africa (gumtree.co.za)**. Ignored when URLs are pasted — the URL's domain is used instead. |
| `location` | string | `""` | City, town, area, or postcode prefix to narrow the search (e.g. "London", "Perth", "Cape Town", "SW1A"). Leave blank to search the whole region. |
| `category` | select | `All Categories` | Top-level category. Options: **All Categories**, **Cars & Vehicles**, **Property (Houses & Flats)**, **For Sale (Goods)**, **Jobs**, **Pets**, **Community**. Note: Australia is currently supported for **Cars & Vehicles** only; UK and South Africa support every listed category. |

#### Filters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `sortBy` | select | `Most Recent` | Listing order. Options: **Most Recent**, **Best Match (Relevance)**, **Price: Low to High**, **Price: High to Low**, **Nearest First**. "Most Recent" is best with the date filter — pagination stops once listings get too old. |
| `minPrice` | integer | `null` | Minimum price in the region's local currency (GBP / AUD / ZAR). Leave blank for no lower bound. |
| `maxPrice` | integer | `null` | Maximum price in the region's local currency (GBP / AUD / ZAR). Leave blank for no upper bound. |
| `listingStartDate` | string | `""` | Only return listings posted on or after this date (YYYY-MM-DD). With sort = Most Recent, the actor stops paginating as soon as it crosses the cutoff. |

#### Output Detail & Limits

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `maxResults` | integer | `100` | Maximum listings to return across all URLs and searches. Set to `0` for unlimited (an internal cap of 50,000 still applies). A single keyword/category search reaches roughly 1,800 rows due to Gumtree's pagination depth — split into multiple `startUrls` to scale beyond that. The run overshoots the final page rather than mid-page-trimming. |
| `includeListingDetails` | boolean | `true` | Open each listing's detail page for full description, all images, structured attributes (beds/baths, mileage/year, etc.), and seller name. Disable for faster, cheaper runs that only return what's on the search-result cards. |
| `includePhone` | boolean | `false` | Include the seller's phone number when Gumtree publishes it in plain sight. Reliable on South Africa and on Australian car listings where the dealer has exposed digits. United Kingdom numbers stay behind a click-to-reveal step, so UK rows always report `phone: null`. Off by default to keep runs fast. |

### Output

Every listing is a flat row with the same 27 fields across UK, AU, and ZA. Here's a representative South African result (Cars & Vehicles, full details enabled):

```json
{
    "listingId": "10013564879631010343222609",
    "shortId": "1356487963",
    "url": "https://www.gumtree.co.za/a-cars-bakkies/durbanville/2008-toyota-rav4-2-0-vx-4x4/10013564879631010343222609",
    "region": "za",
    "title": "2008 Toyota RAV4 2.0 VX 4x4",
    "description": "2008 Toyota RAV4 D4D VX 4WD Manual. 259,000 km. Service history. Black leather interior. Aircon, power steering, central locking, electric windows, alloy wheels...",
    "price": 148700,
    "priceRaw": "R 148,700",
    "currency": "ZAR",
    "priceType": "fixed",
    "category": "Western Cape > Northern Suburbs > Used Automotive Vehicles for Sale > Cars & Bakkies",
    "categorySlug": "9077",
    "location": "Durbanville",
    "postcode": null,
    "latitude": -33.82753,
    "longitude": 18.65268,
    "postedAt": "2026-05-15T09:38:28Z",
    "daysOnSite": 0,
    "sellerName": "Value Auto",
    "sellerType": "business",
    "phone": "0826001533",
    "images": [
        "https://gms.gumtree.co.za/v2/images/za_ads_103432226_260508_69fdf9f4ad21e52aa17698eb?size=l"
    ],
    "imageCount": 1,
    "attributes": {
        "carYear": 2008,
        "carTransmission": "Manual",
        "forSaleBy": "Dealer",
        "fuelType": "Petrol",
        "carBodyType": "SUV",
        "carMake": "Toyota",
        "carModel": "RAV-4",
        "carMileageInKms": 259000,
        "carDriveType": "4x4"
    },
    "featured": false,
    "urgent": false,
    "scrapedAt": "2026-05-16T08:45:01Z"
}
```

#### Core Identifiers

| Field | Type | Description |
|-------|------|-------------|
| `listingId` | string | Unique Gumtree listing ID. Stable per region. |
| `shortId` | string | Short numeric ID where Gumtree exposes one (ZA only). `null` on UK and AU. |
| `url` | string | Canonical listing URL on the region's domain. |
| `region` | string | `uk`, `au`, or `za`. |
| `scrapedAt` | string | ISO 8601 UTC timestamp of when the row was captured. |

#### Listing Content

| Field | Type | Description |
|-------|------|-------------|
| `title` | string | Listing headline as posted by the seller. |
| `description` | string | The advert's full text when `includeListingDetails` is on. Without it, UK results carry the shortened preview Gumtree prints on the results page, ending in `…` when the advert continues. |
| `category` | string | The category the listing itself sits in, as Gumtree labels it (e.g. "Cats", "Cars & Bakkies", "Washing Machines & Tumble Dryers"). Populated on every UK and South African row. |
| `categorySlug` | string | URL-safe category slug or numeric category ID. |
| `images` | string\[] | Every full-resolution image URL on the listing. |
| `imageCount` | integer | Number of images in the listing. |

#### Pricing

| Field | Type | Description |
|-------|------|-------------|
| `price` | integer | Numeric price in the region's local currency (whole units). `null` for free / contact-for-price / swap listings. |
| `priceRaw` | string | Formatted price as it appears on the site (e.g. `"£1,295"`, `"R 148,700"`, `"$5,900"`). |
| `currency` | string | ISO 4217 currency code: `GBP`, `AUD`, or `ZAR`. |
| `priceType` | string | `fixed`, `free`, `swap-trade`, `contact`, or `negotiable`. |

#### Location & Geo

| Field | Type | Description |
|-------|------|-------------|
| `location` | string | Free-text location label (city, suburb, or area). |
| `postcode` | string | Postcode, on UK listings. South African adverts are filed by suburb and province rather than postal code, so this stays `null` there — use `latitude` / `longitude`, which are published on every South African listing page. |
| `latitude` | number | Listing latitude where Gumtree publishes geo data on the detail page. |
| `longitude` | number | Listing longitude where Gumtree publishes geo data on the detail page. |

#### Posted Date

| Field | Type | Description |
|-------|------|-------------|
| `postedAt` | string | ISO 8601 timestamp of the date Gumtree shows as the listing's posting date (UTC). A re-listed advert carries its most recent posting date, which is the same date the "Most Recent" sort orders by. On South African search cards this is Gumtree's rounded age label; switch on `includeListingDetails` for the advert's exact timestamp. Australian listings do not publish a date and stay `null`. |
| `daysOnSite` | integer | Whole days between `postedAt` and `scrapedAt`. |

#### Seller

| Field | Type | Description |
|-------|------|-------------|
| `sellerName` | string | Display name of the seller or dealership. |
| `sellerType` | string | `business` (dealer / shop) or `private` (individual). |
| `phone` | string | Seller's published phone number. Populated when `includePhone` is on and the seller has the digits in plain sight (typical on South Africa and Australian car listings). United Kingdom numbers stay behind Gumtree's click-to-reveal step and remain `null`. |

#### Attributes & Flags

| Field | Type | Description |
|-------|------|-------------|
| `attributes` | object | Free-form key-value map of listing-specific fields — `carMake`, `carModel`, `carYear`, `carMileageInKms`, `carTransmission`, `fuelType`, beds, baths, condition, etc. Keys vary by category. |
| `featured` | boolean | `true` when Gumtree is showing the advert as a paid promotion — the tiles pinned above the organic results on every page. `null` where the region publishes no promotion status (Australia). |
| `urgent` | boolean | `true` when the listing carries the "Urgent" badge. `null` where the region publishes no urgency status (South Africa, Australia). |

### Tips for Best Results

- **Daily monitoring? Set `listingStartDate` to yesterday.** With `sortBy: Most Recent`, pagination stops the moment Gumtree returns an ad older than the cutoff — a 24-hour delta run typically costs 5–10% of a full crawl on the same query.
- **Australia coverage focuses on Cars & Vehicles.** UK and South Africa support every category; AU runs default to Cars. If you pick another AU category the run finishes with an actionable hint to either switch region or switch to Cars & Vehicles.
- **Toggle details for speed vs. depth.** Turn off `includeListingDetails` for fast price-only sweeps (titles, prices, locations from search cards). Turn it on for full descriptions, image galleries, structured attributes, and seller names.
- **UK locations accept city names and postcode prefixes.** `London`, `Manchester`, `Birmingham`, `SW1A` resolve to the right region slug. Unknown inputs fall back to a national UK search so the run still returns results.
- **For runs over ~1,800 listings per query, split into multiple `startUrls`.** Gumtree's pagination tops out around 60 pages per search; use two or three category or location URLs in `startUrls` instead of pushing `maxResults` higher on a single search.
- **Use `sortBy: Most Recent` + `listingStartDate` for incremental crawls.** Together they make daily, hourly, or even 15-minute delta runs cheap — only new ads are paginated and charged.
- **Turn on listing details when the exact South African posting date matters.** Search cards there show a rounded age ("2h", "16d", "5mo"), and on dealer and agency ads that age tracks the advert's most recent re-listing. With `includeListingDetails` on, every South African row carries the advert's own timestamp to the second instead.
- **On Australia, use price bands when you need strict newest-first.** Gumtree Australia hands back at most 59 adverts per search, so a larger Australian pull is gathered by walking narrower price bands. The first 59 rows are the newest overall; later rows are the newest within their band. If you need every row in true recency order, run several narrower `minPrice`/`maxPrice` searches instead of one wide one.
- **Filter out the promoted tiles with `featured`.** The adverts pinned above the organic results repeat on every page of a UK or South African search. `featured: true` marks them, so you can drop them in one filter and keep a clean organic result set.
- **Filter by `sellerType` downstream.** `business` vs `private` is captured per row, so a single run can power both a "dealer inventory" report and a "private seller leads" report without re-crawling.
- **Start with `maxResults: 50–100` on a new query.** Confirm titles, prices, and attributes match what you expect, then scale up. Set `maxResults: 0` for the full 50,000-listing cap.

### Pricing

**$1.50 per 1,000 listings** — pay-per-result. You only pay for listings returned to your dataset; there are no compute, run-time, or storage charges from this actor.

| Listings | Cost |
|----------|------|
| 100 | $0.15 |
| 1,000 | $1.50 |
| 10,000 | $15.00 |
| 100,000 | $150.00 |

A "result" is any listing row in the output dataset. Apify platform fees (account plan, storage) may apply separately.

### Integrations

Export data in JSON, CSV, Excel, XML, or RSS. Connect to 1,500+ apps via:

- **Zapier** / **Make** / **n8n** — workflow automation
- **Google Sheets** — direct spreadsheet export
- **Slack** / **Email** — notifications on new results
- **Webhooks** — trigger custom APIs on run completion
- **Apify API** — full programmatic access

### Legal & Ethical Use

This actor extracts publicly visible classified listings for legitimate market research, competitive intelligence, and lead-generation use cases. Users are responsible for complying with applicable laws, Gumtree's Terms of Service, and the GDPR / POPIA / Australian Privacy Act rules that apply in each country. Do not use extracted data for spam, harassment, scraping at volumes that overwhelm the site, or any illegal purpose. Treat seller names, phone numbers, and personal details as personal data — store and process them accordingly.

# Actor input Schema

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

Paste Gumtree search, category, or individual listing URLs. Works with gumtree.com (UK), gumtree.com.au (Australia), and gumtree.co.za (South Africa). Mix any combination - the region is detected per URL. Filters in the URL are kept as-is.

## `searchKeyword` (type: `string`):

Keyword to search across Gumtree (e.g. 'iPhone 15', 'Ford Focus', '2 bed flat'). Combined with the Region, Location, and Category below. Leave blank to browse a whole category or region.

## `region` (type: `string`):

Which Gumtree region to search when using the keyword/location/category fields above. Ignored when 'Gumtree URLs' is populated — the URL's domain is used instead.

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

City, town, area, or postcode to narrow the search (e.g. 'London', 'Perth', 'Cape Town', 'SW1A'). Leave blank to search the whole region.

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

Top-level category to search within. The actor maps this to the right slug for each region. Pick 'All Categories' to search across everything. NOTE: Australia is supported for the 'Cars & Vehicles' category only — picking any other category with Region=Australia will return zero results with a hint to switch category or region.

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

How to order listings. 'Most Recent' is best when combined with the date filter below — pagination stops as soon as listings get too old. 'Nearest First' is only honoured when a Location is set. On Australia, Gumtree returns at most 59 adverts per search and offers no page control, so larger Australian pulls are gathered by splitting the price range: the first 59 rows are the newest overall, and later rows are the newest within each price band rather than the next-newest overall.

## `minPrice` (type: `integer`):

Only include listings priced at or above this amount, in the region's local currency (GBP / AUD / ZAR). Leave blank for no lower bound.

## `maxPrice` (type: `integer`):

Only include listings priced at or below this amount, in the region's local currency (GBP / AUD / ZAR). Leave blank for no upper bound.

## `listingStartDate` (type: `string`):

Only return listings posted on or after this date (YYYY-MM-DD). Most effective with sort 'Most Recent' — the actor stops paginating once it crosses the cutoff, so you don't pay for older rows.

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

Maximum number of listings to return across all URLs and searches. Set to 0 for unlimited (an internal cap of 50,000 still applies). A single keyword/category search reaches roughly 1,800 rows due to Gumtree's pagination depth — split into multiple URLs in 'Gumtree URLs' to scale beyond that. The actor stops requesting new pages once this number is reached but keeps the full final page, so the final count may slightly overshoot. Tip: start with 50–100 to test.

## `includeListingDetails` (type: `boolean`):

Open each listing's page for full description, all images, attributes (beds/baths, mileage/year, etc.), and seller name. Slower but much richer data. Disable for faster, cheaper runs that return only what's on the search-result cards. Not available for Australia — Australian adverts have no page we can open, so this setting is ignored there and rows carry only what the cars search itself publishes.

## `includePhone` (type: `boolean`):

Include the seller's phone number when Gumtree publishes the digits in plain sight. Best results on South Africa (`gumtree.co.za`), where sellers often expose the full number. United Kingdom (`gumtree.com`) listings keep the number behind a click-to-reveal step that we don't impersonate, and Australia (`gumtree.com.au`) never publishes one at all — the field stays `null` for both regions rather than returning a masked half-number, and this setting is ignored on Australia. Off by default: leave it off and no phone number is collected or returned on any region.

## Actor input object example

```json
{
  "startUrls": [],
  "region": "uk",
  "category": "all",
  "sortBy": "most_recent",
  "maxResults": 100,
  "includeListingDetails": true,
  "includePhone": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Table of scraped Gumtree listings with title, price, location, posting date, and link.

## `detail` (type: `string`):

All 27 fields per listing — including attributes, images, phone, and geo where Gumtree publishes them.

# 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 = {
    "startUrls": [],
    "searchKeyword": "",
    "region": "uk",
    "location": "",
    "category": "all",
    "sortBy": "most_recent",
    "listingStartDate": "",
    "maxResults": 100,
    "includeListingDetails": true,
    "includePhone": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidcode/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 = {
    "startUrls": [],
    "searchKeyword": "",
    "region": "uk",
    "location": "",
    "category": "all",
    "sortBy": "most_recent",
    "listingStartDate": "",
    "maxResults": 100,
    "includeListingDetails": True,
    "includePhone": False,
}

# Run the Actor and wait for it to finish
run = client.actor("solidcode/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 '{
  "startUrls": [],
  "searchKeyword": "",
  "region": "uk",
  "location": "",
  "category": "all",
  "sortBy": "most_recent",
  "listingStartDate": "",
  "maxResults": 100,
  "includeListingDetails": true,
  "includePhone": false
}' |
apify call solidcode/gumtree-scraper --silent --output-dataset

```

## MCP server setup

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