# Milanuncios Scraper — Spanish Car Listings (`blackfalcondata/milanuncios-scraper`) Actor

Scrape car listings from Milanuncios — Spain's biggest classifieds site — filtering by brand, region, province, price, year, mileage, fuel and gearbox. Each result includes the description, full specs and photo gallery, exported with seller and location as structured JSON.

- **URL**: https://apify.com/blackfalcondata/milanuncios-scraper.md
- **Developed by:** [Black Falcon Data](https://apify.com/blackfalcondata) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Stats:** 2 total users, 1 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 and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

### What does Milanuncios Scraper do?

Milanuncios Scraper extracts structured car-listing data from [milanuncios.com](https://milanuncios.com) — each result carries the full description, price, brand, model year, mileage, fuel type and gearbox, plus the seller and the listing's region, province and city. Filter by brand, location, price, year, mileage and fuel in a single run, and run incrementally to capture only new listings over time.

### How to use this actor

- 👉 **Register for a free Apify account** — no credit card required.
- 🎉 Just click **[Sign up free on Apify →](https://console.apify.com/sign-up?fpr=1h3gvi&fp_sid=ctarich)** and complete a quick signup.
- 💰 A free Apify account includes $5 in monthly credits — enough to test this actor.
- ⏳ Scrape during the free trial, with no commitment or upfront payment required.

### Key features

<!-- KEY_FEATURES:START -->
- **🚗 Vehicle data depth** — every car listing returns structured vehicle fields as first-class columns — brand, model year, mileage, fuel type, gearbox, horsepower, doors, seats, colour, and the environmental (eco) label — not buried in description text. Each record also carries the full seller description, the complete photo gallery, and pricing detail including the financed/monthly figure when the seller offers it — all in one pass, no separate detail step required. Filter by brand, price, year, mileage, fuel, and gearbox in a single run.
- **👤 Seller & contact data** — each listing tells you whether the seller is private or a professional dealer and which contact channels they accept — phone, in-app chat, or contact form — alongside the seller id, name, and the listing's region, province, and city. Filter to dealers for B2B prospecting, or to private sellers for direct deals. Turn on the optional seller-detail enrichment to add each seller's map coordinates, postal code, account age, email-verified status, and whether the car is already reserved.
- **🎯 Batch searches** — pass several brands, regions, or fuel types in one run — every combination is searched, results are merged and de-duplicated by listing id into a single dataset, and you pay one Actor-Start charge instead of one per search.
- **🔔 Notifications** — Telegram, Slack, Discord, WhatsApp Cloud API, and generic webhook out of the box. Pair with incremental for daily new-listing alerts without pipeline glue.
- **♻️ Incremental mode** — recurring runs emit and charge only for listings that are new or whose tracked content changed. First run builds the baseline; subsequent runs emit only NEW / UPDATED / REAPPEARED records (UNCHANGED + EXPIRED opt-in). Saves 80–95% on daily monitoring.
- **📦 Compact mode** — AI-agent and MCP-friendly payloads with core fields only.
- **✂️ Description truncation** — cap description length with `descriptionMaxLength` to control LLM prompt cost and dataset size — set 0 for full descriptions, or any char-limit to trim.
- **📤 Export anywhere** — Download the dataset as JSON, CSV, or Excel from the Apify Console, or stream live via the Apify API and integrations (Make, Zapier, Google Sheets, n8n, …).
- **🔌 MCP connectors** — export your results into Notion via Apify's MCP connectors — a clean run-summary page, no glue code. Opt-in via the App connector field; deterministic field-mapping, no AI. Built on Apify's connector framework, so more destinations open up as their catalog grows.
<!-- KEY_FEATURES:END -->

### What data can you extract from Milanuncios?

Each result includes Core listing fields (`listingId`, `adId`, `url`, `portalUrl`, `title`, `price`, `priceLabel`, and `currency`, and more), detail fields when enrichment is enabled (`description`), and contact information (`acceptsPhone`). In standard mode, all fields are always present — unavailable data points are returned as `null`, never omitted. In compact mode, only core fields are returned.

Enable detail enrichment in the input to get richer fields such as full descriptions and contact information where the source provides them.

### Input

The main inputs are a result limit. Additional filters and options are available in the input schema.

Key parameters:

- **`startUrls`** — Optional. Paste one or more Milanuncios search/results page URLs (the page you see after applying filters on the site). Their filters — brand, price, year, fuel, gearbox, province, free-text words — are read from the URL and combined with the filters below. Single-car listing URLs are skipped (paste a search page, not one ad).
- **`make`** — Car brand(s) to scrape, e.g. "BMW", "Mercedes-Benz", "Toyota". Leave empty to scrape all brands. Add several to combine brands.
- **`region`** — Autonomous community/region to limit results to, e.g. "Madrid", "Cataluña", "Andalucía". Leave empty for all of Spain. Add several to combine regions.
- **`province`** — Province to limit results to, e.g. "Barcelona", "Valencia", "Sevilla". More specific than region. Add several to combine provinces.
- **`priceMin`** — Only return cars priced at or above this amount, in euros.
- **`priceMax`** — Only return cars priced at or below this amount, in euros.
- **`yearMin`** — Only return cars from this model year or newer.
- **`yearMax`** — Only return cars from this model year or older.
- **`kmMin`** — Only return cars with at least this many kilometres.
- **`kmMax`** — Only return cars with at most this many kilometres.
- **`fuelType`** — Limit results to one or more fuel types.
- **`transmission`** — Limit results to a single gearbox type. (default: `""`)
- ...and 26 more parameters

### Input examples

**Brand & price search** — Find BMWs from 2018 or newer priced up to €20,000.

→ Full payload per result — description, specs, photos, seller and location, all populated where the source provides them.

```json
{
  "make": [
    "BMW"
  ],
  "yearMin": 2018,
  "priceMax": 20000,
  "maxResults": 100
}
````

**Start from a search URL** — Paste a Milanuncios results page (the page you see after applying filters on the site) — its brand, price, year, fuel and gearbox filters are read straight from the URL.

→ The same structured records as a manual search, configured entirely from the pasted URL.

```json
{
  "startUrls": [
    "https://www.milanuncios.com/audi-de-segunda-mano/?desde=10000&hasta=25000&combustible=diesel"
  ],
  "maxResults": 100
}
```

**Keyword filtering** — Keep only listings that mention a feature the site has no structured filter for, and drop damaged cars. Matching is case- and accent-insensitive across the title and description.

→ A narrowed result set — only listings whose text contains an include keyword and none of the exclude keywords.

```json
{
  "make": [
    "Mercedes-Benz"
  ],
  "includeKeywords": [
    "techo solar",
    "cuero"
  ],
  "excludeKeywords": [
    "accidentado",
    "para piezas"
  ],
  "maxResults": 100
}
```

**Incremental tracking** — Only emit vehicles that changed since the previous run with this `stateKey`.

→ First run builds the baseline state. Subsequent runs emit only records that are new or whose tracked content changed. Set `emitUnchanged: true` to include unchanged records as well.

```json
{
  "make": [
    "BMW"
  ],
  "maxResults": 200,
  "incrementalMode": true,
  "stateKey": "bmw-tracker"
}
```

**Compact output for AI agents** — Return only core fields for AI-agent and MCP workflows.

→ Small payload with the most important fields — ideal for piping into LLMs without token overhead.

```json
{
  "make": [
    "BMW"
  ],
  "maxResults": 50,
  "compact": true
}
```

### Output

Each run produces a dataset of structured listing records. Results can be downloaded as JSON, CSV, or Excel from the Dataset tab in Apify Console.

### Example listing record

```json
{
  "listingId": "321f3b8dadf8d278ed2d050cbb940edad50596b70239d4c5db6c4d2d60c6effc",
  "adId": "599704835",
  "url": "https://www.milanuncios.com/fiat-de-segunda-mano/fiat-grande-punto-599704835.htm",
  "portalUrl": "https://www.milanuncios.com/fiat-de-segunda-mano/fiat-grande-punto-599704835.htm",
  "title": "Fiat - Grande punto",
  "description": "Fiat Punto roja en muy buen estado. El vehículo cuenta con aproximadamente 150.000 km y funciona perfectamente. Recientemente se ha realizado una revisión completa, por lo que está lista para circular...",
  "price": 1800,
  "priceLabel": "1.800 €",
  "currency": "EUR",
  "priceIncludesTaxes": false,
  "isFinanced": false,
  "previousPrice": 2000,
  "priceDropPercent": -10,
  "make": "Fiat",
  "makeSlug": "fiat-de-segunda-mano",
  "year": 2006,
  "mileageKm": 1500,
  "fuelType": "gasoline",
  "transmission": "MANUAL",
  "powerHp": 80,
  "doors": 5,
  "seats": 5,
  "color": "rojo",
  "environmentalLabel": "NO_LABEL",
  "category": "Coches",
  "categoryId": 13,
  "sellerId": "233401499",
  "sellerName": "Emma",
  "sellerType": "private",
  "acceptsPhone": false,
  "acceptsChat": true,
  "acceptsForm": true,
  "region": "Canarias",
  "province": "Tenerife",
  "city": "Playa de los Cristianos",
  "location": "Playa de los Cristianos, Tenerife",
  "imageUrl": "https://images.milanuncios.com/api/v1/ma-ad-media-pro/images/0c28eed2-f21d-4581-8b3b-a97776595be2",
  "imageUrls": [
    "https://images.milanuncios.com/api/v1/ma-ad-media-pro/images/0c28eed2-f21d-4581-8b3b-a97776595be2",
    "https://images.milanuncios.com/api/v1/ma-ad-media-pro/images/c9d63f93-357c-4a1a-ab02-dfd37b9c2d93",
    "https://images.milanuncios.com/api/v1/ma-ad-media-pro/images/c75d21dd-ca8f-420d-b678-45e918bec8ea",
    "https://images.milanuncios.com/api/v1/ma-ad-media-pro/images/149a3d57-5551-4a7c-af27-070a29ef620b",
    "https://images.milanuncios.com/api/v1/ma-ad-media-pro/images/8d2048b1-0dda-4975-b756-2432c581e1db",
    "https://images.milanuncios.com/api/v1/ma-ad-media-pro/images/6f6fd805-b8b8-4a05-90b9-4bf88df1d456",
    "https://images.milanuncios.com/api/v1/ma-ad-media-pro/images/150a4e88-f6d3-43a9-beed-851c33d5b338",
    "https://images.milanuncios.com/api/v1/ma-ad-media-pro/images/aeb3153f-e47d-49c3-b367-06ce29fe8ae4"
  ],
  "isNew": false,
  "isFeatured": true,
  "isRepost": false,
  "publishedAt": "2026-06-09T22:13:55Z",
  "updatedAt": "2026-06-25T20:46:11Z",
  "attributes": [
    {
      "key": "kilometers",
      "label": "kilómetros",
      "value": "1500",
      "valueLabel": "1.500 kms"
    },
    {
      "key": "year",
      "label": "año",
      "value": "2006",
      "valueLabel": "2006"
    },
    {
      "key": "fuel",
      "label": "combustible",
      "value": "gasoline",
      "valueLabel": "gasolina"
    },
    {
      "key": "transmission",
      "label": "cambio",
      "value": "manual",
      "valueLabel": "manual"
    },
    {
      "key": "hp",
      "label": "CV",
      "value": "80",
      "valueLabel": "80 CV"
    },
    {
      "key": "doors",
      "label": "puertas",
      "value": "5",
      "valueLabel": "5 puertas"
    },
    {
      "key": "color",
      "label": "color",
      "value": "rojo",
      "valueLabel": "rojo"
    },
    {
      "key": "environmentalLabel",
      "label": "distintivo ambiental",
      "value": "NO_LABEL",
      "valueLabel": "NO_LABEL"
    },
    {
      "key": "seats",
      "label": "plazas",
      "value": "five_seats",
      "valueLabel": "5 plazas"
    }
  ],
  "contentHash": "050415023bebcc9980ed7a62d776076e044624c2273d283f9074a6a710ef4161",
  "source": "milanuncios.com",
  "scrapedAt": "2026-06-25T20:48:44.651Z"
}
```

### Incremental fields

When incremental mode is on, each record also carries:

- `changeType` — one of `NEW`, `UPDATED`, `UNCHANGED`, `REAPPEARED`, `EXPIRED`. Default output covers `NEW` / `UPDATED` / `REAPPEARED`; set `emitUnchanged: true` or `emitExpired: true` to opt into the others.
- `isRepost`, `repostOfId`, `repostDetectedAt` — populated when a new listing matches the tracked content of a previously expired one. Set `skipReposts: true` to drop detected reposts from the output.

### How to scrape Milanuncios

1. Go to [Milanuncios Scraper](https://apify.com/blackfalcondata/milanuncios-scraper?fpr=1h3gvi) in Apify Console.
2. Configure the input.
3. Set `maxResults` to control how many results you need.
4. Enable `includeDetails` if you need full descriptions, contact info.
5. Click **Start** and wait for the run to finish.
6. Export the dataset as JSON, CSV, or Excel.

### Use cases

- Extract listing data from Milanuncios for market research and competitive analysis.
- Track pricing trends across regions and categories over time.
- Monitor new and changed vehicles on scheduled runs without processing the full dataset every time.
- Feed structured data into AI agents, MCP tools, and automated pipelines using compact mode.
- Export clean, structured data to dashboards, spreadsheets, or data warehouses.

### How much does it cost to scrape Milanuncios?

Milanuncios Scraper uses [pay-per-event](https://docs.apify.com/platform/actors/paid-actors/pay-per-event) pricing. You pay a small fee when the run starts and then for each result that is actually produced.

- **Run start:** $0.005 per run
- **Per result:** $0.003 per listing record

Example costs:

- 10 results: **$0.035**
- 25 results: **$0.08**
- 100 results: **$0.3**
- 200 results: **$0.6**
- 500 results: **$1.5**

#### Example: recurring monitoring savings

These examples compare full re-scrapes with incremental runs at different churn rates. Churn is the share of vehicles that are new or whose tracked content changed since the previous run. Actual churn depends on your query breadth, source activity, and polling frequency — the scenarios below are examples, not predictions.

Example setup: 200 results per run, daily polling (30 runs/month). Event-pricing examples scale linearly with result count.

| Churn rate | Full re-scrape run cost | Incremental run cost | Savings vs full re-scrape | Monthly cost after baseline |
|---|---:|---:|---:|---:|
| 5% — stable niche query | $0.60 | $0.03 | $0.57 (94%) | $1.05 |
| 15% — moderate broad query | $0.60 | $0.10 | $0.51 (84%) | $2.85 |
| 30% — high-volume aggregator | $0.60 | $0.18 | $0.42 (69%) | $5.55 |

Full re-scrape monthly cost at daily polling: $18.15. First month with incremental costs $1.62 / $3.36 / $5.97 for the 5% / 15% / 30% scenarios because the first run builds baseline state at full cost before incremental savings apply.

Platform usage (compute and proxies) is billed separately by Apify based on actual consumption. Incremental runs consume less on result processing, though fixed per-run overhead stays the same.

### FAQ

#### How many results can I get from Milanuncios?

The number of results depends on the search query and available vehicles on Milanuncios. Use the `maxResults` parameter to control how many results are returned per run.

#### Does Milanuncios Scraper support recurring monitoring?

Yes. Enable incremental mode to only receive new or changed vehicles on subsequent runs. This is ideal for scheduled monitoring where you want to track changes over time without re-processing the full dataset.

#### Can I integrate Milanuncios Scraper with other apps?

Yes. Milanuncios Scraper works with Apify's [integrations](https://apify.com/integrations?fpr=1h3gvi) to connect with tools like Zapier, Make, Google Sheets, Slack, and more. You can also use webhooks to trigger actions when a run completes.

#### Can I use Milanuncios Scraper with the Apify API?

Yes. You can start runs, manage inputs, and retrieve results programmatically through the [Apify API](https://docs.apify.com/api/v2). Client libraries are available for JavaScript, Python, and other languages.

#### Can I use Milanuncios Scraper through an MCP Server?

Yes. Apify provides an [MCP Server](https://apify.com/apify/actors-mcp-server?fpr=1h3gvi) that lets AI assistants and agents call this actor directly. Use compact mode, `descriptionMaxLength`, a single `descriptionFormat`, and `excludeEmptyFields` to keep payloads manageable for LLM context windows.

#### Is it legal to scrape Milanuncios?

This actor extracts publicly available data from Milanuncios. Web scraping of public information is generally considered legal, but you should always review the target site's terms of service and ensure your use case complies with applicable laws and regulations, including GDPR where relevant.

#### Your feedback

If you have questions, need a feature, or found a bug, please [open an issue](https://apify.com/blackfalcondata/milanuncios-scraper/issues?fpr=1h3gvi) on the actor's page in Apify Console. Your feedback helps us improve.

### You might also like

- [🚗 mobile.de \[$1/1K💰\] Fast Scraper · Finance · Dealer GPS](https://apify.com/blackfalcondata/mobile-de-scraper?fpr=1h3gvi) — Scrape mobile.de — Germany's largest car marketplace (1.4M+ listings) at $1 / 1,000 results. Full.
- [AutoScout24 Scraper — European Car Listings with Dealer Data](https://apify.com/blackfalcondata/autoscout24-scraper?fpr=1h3gvi) — Scrape autoscout24.com — Europe's largest used-car marketplace with 770K+ listings across 8.
- [Autotrader AU \[$0.9💰\] Car & Caravan Scraper 🇦🇺](https://apify.com/blackfalcondata/autotrader-au-scraper?fpr=1h3gvi) — Scrape autotrader.com.au car & caravan listings — advertised + previous price with a computed.
- [Autotrader Canada Scraper — Car & Truck Listings + Dealers](https://apify.com/blackfalcondata/autotrader-ca-scraper?fpr=1h3gvi) — Scrape autotrader.ca — Canada's largest car marketplace. Get structured make/model/year/price.
- [Autotrader UK \[$0.75💰/1K\] - Car Scraper, Full Detail](https://apify.com/blackfalcondata/autotrader-uk-scraper?fpr=1h3gvi) — Scrape UK car listings from Auto Trader by make, model, price, year, mileage, fuel, and body type..
- [Bilbasen Scraper - Denmark’s Car Marketplace](https://apify.com/blackfalcondata/bilbasen-scraper?fpr=1h3gvi) — Scrape bilbasen.dk, Denmark’s largest car marketplace, with full vehicle specs, seller contacts,.
- [Coches.net Scraper — Used Cars, Vans & Motorbikes in Spain](https://apify.com/blackfalcondata/coches-scraper?fpr=1h3gvi) — Coches.net Scraper — scrape car, van, motorhome, classic & motorcycle listings from Spain's largest.
- [DBA Scraper - Denmark’s Largest Marketplace](https://apify.com/blackfalcondata/dba-listings-scraper?fpr=1h3gvi) — Scrape dba.dk — Denmark's largest classifieds platform. Covers both marketplace and vehicle.

### Getting started with Apify

New to Apify? [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=1h3gvi\&fp_sid=ctarich) — no credit card required.

1. Sign up — $5 platform credit included
2. Open this actor and configure your input
3. Click **Start** — export results as JSON, CSV, or Excel

Need more later? [See Apify pricing](https://apify.com/pricing?fpr=1h3gvi).

# Actor input Schema

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

Optional. Paste one or more Milanuncios search/results page URLs (the page you see after applying filters on the site). Their filters — brand, price, year, fuel, gearbox, province, free-text words — are read from the URL and combined with the filters below. Single-car listing URLs are skipped (paste a search page, not one ad).

## `make` (type: `array`):

Car brand(s) to scrape, e.g. "BMW", "Mercedes-Benz", "Toyota". Leave empty to scrape all brands. Add several to combine brands.

## `region` (type: `array`):

Autonomous community/region to limit results to, e.g. "Madrid", "Cataluña", "Andalucía". Leave empty for all of Spain. Add several to combine regions.

## `province` (type: `array`):

Province to limit results to, e.g. "Barcelona", "Valencia", "Sevilla". More specific than region. Add several to combine provinces.

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

Only return cars priced at or above this amount, in euros.

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

Only return cars priced at or below this amount, in euros.

## `yearMin` (type: `integer`):

Only return cars from this model year or newer.

## `yearMax` (type: `integer`):

Only return cars from this model year or older.

## `kmMin` (type: `integer`):

Only return cars with at least this many kilometres.

## `kmMax` (type: `integer`):

Only return cars with at most this many kilometres.

## `fuelType` (type: `array`):

Limit results to one or more fuel types.

## `transmission` (type: `string`):

Limit results to a single gearbox type.

## `includeKeywords` (type: `array`):

Keep only listings whose title or description contains at least one of these words/phrases (case- and accent-insensitive). Use to narrow by model or feature the marketplace has no structured filter for, e.g. "coupé", "cuero", "techo solar". Several entries act as OR.

## `excludeKeywords` (type: `array`):

Drop listings whose title or description contains any of these words/phrases (case- and accent-insensitive), e.g. "accidentado", "para piezas", "importación". Applied after Include Keywords.

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

Maximum number of car listings to return per run (1–5,000). For larger catalogs, narrow the filters and run several focused searches.

## `compact` (type: `boolean`):

Return a small set of core fields only (brand, year, mileage, price, location, URL) — ideal for AI-agent / MCP workflows.

## `includeDetails` (type: `boolean`):

Enrich each listing with extra seller info: map coordinates, postal code, account age, email-verified status, the seller's total number of active listings, and whether the car is reserved. Slower (extra lookups); off by default.

## `descriptionMaxLength` (type: `integer`):

Truncate each listing description to this many characters. 0 = no truncation.

## `descriptionFormat` (type: `string`):

Pick a single description representation. `all` keeps every variant; `text` / `html` / `markdown` drop the others.

## `excludeEmptyFields` (type: `boolean`):

Drop null, empty-string, and empty-array fields from each record before push. Smaller payloads for AI agents and dashboards.

## `incrementalMode` (type: `boolean`):

Compare against the previous run and tag each listing as NEW, UPDATED, UNCHANGED or EXPIRED. State is keyed automatically by your filters, so different searches never share state.

## `stateKey` (type: `string`):

Optional. Stable identifier for the tracked search. Leave empty to auto-generate from your filters.

## `skipReposts` (type: `boolean`):

When incremental, skip listings whose content matches a car that expired in a prior run (the same car relisted under a new ad).

## `emitUnchanged` (type: `boolean`):

When Incremental Mode is on, also output listings that are unchanged since the previous run (tagged UNCHANGED). Off by default — only new/updated/expired records are emitted.

## `emitExpired` (type: `boolean`):

When Incremental Mode is on, also output listings that disappeared since the previous run (tagged EXPIRED). Off by default.

## `telegramToken` (type: `string`):

Telegram bot token (from @BotFather). Required for Telegram notifications.

## `telegramChatId` (type: `string`):

Telegram chat or channel ID (e.g. "-100123456789"). Required when telegramToken is set.

## `discordWebhookUrl` (type: `string`):

Discord incoming webhook URL. Server Settings → Integrations → Webhooks → New Webhook.

## `slackWebhookUrl` (type: `string`):

Slack incoming webhook URL. api.slack.com/messaging/webhooks.

## `notificationLimit` (type: `integer`):

Maximum number of listings included in each notification message (1–20).

## `notifyOnlyChanges` (type: `boolean`):

When Incremental Mode is on, only send notifications for NEW and UPDATED listings. Has no effect outside incremental mode.

## `whatsappAccessToken` (type: `string`):

WhatsApp Cloud API permanent access token (System User token from Meta Business). Recipient must have messaged the business number within the last 24h (service-conversation window — free since Nov 2024).

## `whatsappPhoneNumberId` (type: `string`):

Your WhatsApp Business phone-number ID (numeric, from Meta dashboard). Required when whatsappAccessToken is set.

## `whatsappTo` (type: `string`):

Recipient phone in E.164 format without + (e.g. "436641234567"). Recipient must have messaged your business number within last 24h.

## `webhookUrl` (type: `string`):

Receives a JSON POST with {metadata, items} after each run. Universal escape hatch for n8n / Make / Zapier / custom backends.

## `webhookHeaders` (type: `object`):

Optional JSON object of custom headers (e.g. {"Authorization":"Bearer ..."}).

## `appConnector` (type: `string`):

Optional. Pick a connected app under Settings → API & Integrations to receive your results (including any contact details). Best-effort across MCP connectors as Apify expands its catalog.

## `mcpIssueTeam` (type: `string`):

Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one.

## Actor input object example

```json
{
  "make": [
    "BMW"
  ],
  "transmission": "",
  "maxResults": 5,
  "compact": false,
  "includeDetails": false,
  "descriptionMaxLength": 0,
  "descriptionFormat": "all",
  "excludeEmptyFields": false,
  "incrementalMode": false,
  "skipReposts": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "notificationLimit": 5,
  "notifyOnlyChanges": false
}
```

# Actor output Schema

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

No description

# 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 = {
    "make": [
        "BMW"
    ],
    "maxResults": 5,
    "includeDetails": false,
    "excludeEmptyFields": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("blackfalcondata/milanuncios-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 = {
    "make": ["BMW"],
    "maxResults": 5,
    "includeDetails": False,
    "excludeEmptyFields": False,
}

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

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

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

```

## CLI example

```bash
echo '{
  "make": [
    "BMW"
  ],
  "maxResults": 5,
  "includeDetails": false,
  "excludeEmptyFields": false
}' |
apify call blackfalcondata/milanuncios-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=blackfalcondata/milanuncios-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Milanuncios Scraper — Spanish Car Listings",
        "description": "Scrape car listings from Milanuncios — Spain's biggest classifieds site — filtering by brand, region, province, price, year, mileage, fuel and gearbox. Each result includes the description, full specs and photo gallery, exported with seller and location as structured JSON.",
        "version": "0.1",
        "x-build-id": "7d88R43JN4CjtFGN4"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/blackfalcondata~milanuncios-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-blackfalcondata-milanuncios-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/blackfalcondata~milanuncios-scraper/runs": {
            "post": {
                "operationId": "runs-sync-blackfalcondata-milanuncios-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/blackfalcondata~milanuncios-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-blackfalcondata-milanuncios-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startUrls": {
                        "title": "🔗 Start URLs",
                        "type": "array",
                        "description": "Optional. Paste one or more Milanuncios search/results page URLs (the page you see after applying filters on the site). Their filters — brand, price, year, fuel, gearbox, province, free-text words — are read from the URL and combined with the filters below. Single-car listing URLs are skipped (paste a search page, not one ad).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "make": {
                        "title": "🚗 Brand",
                        "type": "array",
                        "description": "Car brand(s) to scrape, e.g. \"BMW\", \"Mercedes-Benz\", \"Toyota\". Leave empty to scrape all brands. Add several to combine brands.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "region": {
                        "title": "🗺️ Region",
                        "type": "array",
                        "description": "Autonomous community/region to limit results to, e.g. \"Madrid\", \"Cataluña\", \"Andalucía\". Leave empty for all of Spain. Add several to combine regions.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "province": {
                        "title": "📍 Province",
                        "type": "array",
                        "description": "Province to limit results to, e.g. \"Barcelona\", \"Valencia\", \"Sevilla\". More specific than region. Add several to combine provinces.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "priceMin": {
                        "title": "💶 Min Price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only return cars priced at or above this amount, in euros."
                    },
                    "priceMax": {
                        "title": "💶 Max Price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only return cars priced at or below this amount, in euros."
                    },
                    "yearMin": {
                        "title": "📅 Min Year",
                        "minimum": 1900,
                        "maximum": 2100,
                        "type": "integer",
                        "description": "Only return cars from this model year or newer."
                    },
                    "yearMax": {
                        "title": "📅 Max Year",
                        "minimum": 1900,
                        "maximum": 2100,
                        "type": "integer",
                        "description": "Only return cars from this model year or older."
                    },
                    "kmMin": {
                        "title": "🛣️ Min Mileage (km)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only return cars with at least this many kilometres."
                    },
                    "kmMax": {
                        "title": "🛣️ Max Mileage (km)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only return cars with at most this many kilometres."
                    },
                    "fuelType": {
                        "title": "⛽ Fuel",
                        "type": "array",
                        "description": "Limit results to one or more fuel types.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "gasoline",
                                "diesel",
                                "hybrid",
                                "plug_in_hybrid",
                                "electric",
                                "glp"
                            ],
                            "enumTitles": [
                                "Gasoline",
                                "Diesel",
                                "Hybrid",
                                "Plug-in hybrid",
                                "Electric",
                                "LPG (GLP)"
                            ]
                        }
                    },
                    "transmission": {
                        "title": "⚙️ Gearbox",
                        "enum": [
                            "",
                            "manual",
                            "automatic"
                        ],
                        "type": "string",
                        "description": "Limit results to a single gearbox type.",
                        "default": ""
                    },
                    "includeKeywords": {
                        "title": "🔎 Include Keywords",
                        "type": "array",
                        "description": "Keep only listings whose title or description contains at least one of these words/phrases (case- and accent-insensitive). Use to narrow by model or feature the marketplace has no structured filter for, e.g. \"coupé\", \"cuero\", \"techo solar\". Several entries act as OR.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "excludeKeywords": {
                        "title": "🚷 Exclude Keywords",
                        "type": "array",
                        "description": "Drop listings whose title or description contains any of these words/phrases (case- and accent-insensitive), e.g. \"accidentado\", \"para piezas\", \"importación\". Applied after Include Keywords.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "💯 Max Results",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of car listings to return per run (1–5,000). For larger catalogs, narrow the filters and run several focused searches.",
                        "default": 50
                    },
                    "compact": {
                        "title": "📦 Compact Output",
                        "type": "boolean",
                        "description": "Return a small set of core fields only (brand, year, mileage, price, location, URL) — ideal for AI-agent / MCP workflows.",
                        "default": false
                    },
                    "includeDetails": {
                        "title": "🔍 Include Seller Details",
                        "type": "boolean",
                        "description": "Enrich each listing with extra seller info: map coordinates, postal code, account age, email-verified status, the seller's total number of active listings, and whether the car is reserved. Slower (extra lookups); off by default.",
                        "default": false
                    },
                    "descriptionMaxLength": {
                        "title": "✂️ Description Max Length",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Truncate each listing description to this many characters. 0 = no truncation.",
                        "default": 0
                    },
                    "descriptionFormat": {
                        "title": "📝 Description Format",
                        "enum": [
                            "all",
                            "text",
                            "html",
                            "markdown"
                        ],
                        "type": "string",
                        "description": "Pick a single description representation. `all` keeps every variant; `text` / `html` / `markdown` drop the others.",
                        "default": "all"
                    },
                    "excludeEmptyFields": {
                        "title": "Exclude empty fields from output",
                        "type": "boolean",
                        "description": "Drop null, empty-string, and empty-array fields from each record before push. Smaller payloads for AI agents and dashboards.",
                        "default": false
                    },
                    "incrementalMode": {
                        "title": "♻️ Incremental Mode",
                        "type": "boolean",
                        "description": "Compare against the previous run and tag each listing as NEW, UPDATED, UNCHANGED or EXPIRED. State is keyed automatically by your filters, so different searches never share state.",
                        "default": false
                    },
                    "stateKey": {
                        "title": "🔑 State Key",
                        "type": "string",
                        "description": "Optional. Stable identifier for the tracked search. Leave empty to auto-generate from your filters."
                    },
                    "skipReposts": {
                        "title": "🚫 Skip Reposts",
                        "type": "boolean",
                        "description": "When incremental, skip listings whose content matches a car that expired in a prior run (the same car relisted under a new ad).",
                        "default": false
                    },
                    "emitUnchanged": {
                        "title": "📤 Emit Unchanged",
                        "type": "boolean",
                        "description": "When Incremental Mode is on, also output listings that are unchanged since the previous run (tagged UNCHANGED). Off by default — only new/updated/expired records are emitted.",
                        "default": false
                    },
                    "emitExpired": {
                        "title": "🗑️ Emit Expired",
                        "type": "boolean",
                        "description": "When Incremental Mode is on, also output listings that disappeared since the previous run (tagged EXPIRED). Off by default.",
                        "default": false
                    },
                    "telegramToken": {
                        "title": "🔑 Telegram Bot Token",
                        "type": "string",
                        "description": "Telegram bot token (from @BotFather). Required for Telegram notifications."
                    },
                    "telegramChatId": {
                        "title": "💬 Telegram Chat ID",
                        "type": "string",
                        "description": "Telegram chat or channel ID (e.g. \"-100123456789\"). Required when telegramToken is set."
                    },
                    "discordWebhookUrl": {
                        "title": "🎮 Discord Webhook URL",
                        "type": "string",
                        "description": "Discord incoming webhook URL. Server Settings → Integrations → Webhooks → New Webhook."
                    },
                    "slackWebhookUrl": {
                        "title": "💼 Slack Webhook URL",
                        "type": "string",
                        "description": "Slack incoming webhook URL. api.slack.com/messaging/webhooks."
                    },
                    "notificationLimit": {
                        "title": "📊 Max Listings Per Notification",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum number of listings included in each notification message (1–20).",
                        "default": 5
                    },
                    "notifyOnlyChanges": {
                        "title": "🔄 Notify Only New/Updated",
                        "type": "boolean",
                        "description": "When Incremental Mode is on, only send notifications for NEW and UPDATED listings. Has no effect outside incremental mode.",
                        "default": false
                    },
                    "whatsappAccessToken": {
                        "title": "📱 WhatsApp Access Token",
                        "type": "string",
                        "description": "WhatsApp Cloud API permanent access token (System User token from Meta Business). Recipient must have messaged the business number within the last 24h (service-conversation window — free since Nov 2024)."
                    },
                    "whatsappPhoneNumberId": {
                        "title": "📞 WhatsApp Phone Number ID",
                        "type": "string",
                        "description": "Your WhatsApp Business phone-number ID (numeric, from Meta dashboard). Required when whatsappAccessToken is set."
                    },
                    "whatsappTo": {
                        "title": "📲 WhatsApp Recipient",
                        "type": "string",
                        "description": "Recipient phone in E.164 format without + (e.g. \"436641234567\"). Recipient must have messaged your business number within last 24h."
                    },
                    "webhookUrl": {
                        "title": "🪝 Generic Webhook URL",
                        "type": "string",
                        "description": "Receives a JSON POST with {metadata, items} after each run. Universal escape hatch for n8n / Make / Zapier / custom backends."
                    },
                    "webhookHeaders": {
                        "title": "📋 Webhook Headers",
                        "type": "object",
                        "description": "Optional JSON object of custom headers (e.g. {\"Authorization\":\"Bearer ...\"})."
                    },
                    "appConnector": {
                        "title": "Send results to a connected app",
                        "type": "string",
                        "description": "Optional. Pick a connected app under Settings → API & Integrations to receive your results (including any contact details). Best-effort across MCP connectors as Apify expands its catalog."
                    },
                    "mcpIssueTeam": {
                        "title": "Issue tracker team",
                        "type": "string",
                        "description": "Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
