# Milanuncios Scraper (`rastriq/milanuncios-scraper`) Actor

Scrape listings from Milanuncios.com (Spain largest classifieds). Supports any category, search queries, price/location filters, and optional detail page enrichment.

- **URL**: https://apify.com/rastriq/milanuncios-scraper.md
- **Developed by:** [Rastriq — Structured data from the world](https://apify.com/rastriq) (community)
- **Categories:** E-commerce, Lead generation
- **Stats:** 12 total users, 5 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.25 / 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/platform/actors/running/actors-in-store#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

### What data can you scrape from Milanuncios?

Extract structured listings from **Milanuncios.com** — Spain's largest classifieds marketplace with 9M+ active listings across 30+ categories.

- **Any category** — Cars, real estate, electronics, jobs, motorcycles, furniture — if it's on Milanuncios, you can scrape it
- **Two extraction levels** — Quick search-only (33 fields) or full detail enrichment (68 fields)
- **Geographic filtering** — Filter by any of Spain's 50 provinces
- **Export anywhere** — JSON, CSV, Excel, or via the Apify API and integrations

***

### Output: Milanuncios data structure

#### Search mode (33 fields per listing)

| Field | Label | Format |
|-------|-------|--------|
| `id` | Listing ID | text |
| `title` | Title | text |
| `description` | Description | text |
| `url` | URL | link |
| `price` | Price (€) | number |
| `financedPrice` | Financed price (€) | number |
| `categoryName` | Category | text |
| `categorySlug` | Category slug | text |
| `categoryTree` | Category tree | array |
| `sellerType` | Seller type | text |
| `cityName` | City | text |
| `provinceName` | Province | text |
| `regionName` | Region | text |
| `images` | Image URLs | array |
| `imageCount` | Photo count | number |
| `publishDate` | Published | datetime |
| `updateDate` | Updated | datetime |
| `isHighlighted` | Promoted | boolean |
| `isVipContent` | VIP | boolean |
| `tag_km` | Mileage (tag) | text |
| `tag_year` | Year (tag) | text |
| `tag_fuel` | Fuel (tag) | text |

#### Detail enrichment mode (+35 fields = 68 total)

Enable `fetchDetails` to also extract: full vehicle attributes (km, year, fuel, transmission, HP, doors, color, warranty), seller shop info (name, phone, address, zip, province, URL), coordinates (lat/lng), listing stats (favorites, shares), Schema.org structured data (brand, model, fuel type, mileage, transmission, engine), and more.

#### Example output (one record)

```json
{
  "id": "603742385",
  "title": "BMW Serie 3 320d Automático 190cv",
  "description": "Vendo BMW 320d en perfecto estado, revisiones al día...",
  "url": "https://www.milanuncios.com/coches-de-segunda-mano/bmw-serie-3-320d-603742385.htm",
  "price": 22500,
  "financedPrice": 289,
  "categoryId": 60,
  "categoryName": "Coches de segunda mano",
  "categorySlug": "coches-de-segunda-mano",
  "sellerType": "professional",
  "cityName": "Madrid",
  "provinceName": "Madrid",
  "regionName": "Comunidad de Madrid",
  "images": ["https://cdn.milanuncios.com/..."],
  "imageCount": 12,
  "publishDate": "2026-07-15T10:30:00Z",
  "updateDate": "2026-07-20T08:00:00Z",
  "tag_km": "87.000 km",
  "tag_year": "2019",
  "tag_fuel": "Diésel",
  "scraped_at": "2026-07-23T12:00:00Z"
}
```

***

### Quick start

1. Click **Start** with the default input to test (~10 listings from "coches de segunda mano", under 30 seconds).
2. Open the **Output** tab to preview results.
3. Export as CSV / Excel / JSON, or connect via API.

***

### How to scrape Milanuncios — input options

#### Option 1: Paste a URL (easiest)

Copy any Milanuncios search URL from your browser and paste it in **URL de búsqueda**. The Actor extracts all parameters automatically.

Works with any search or category URL:

- `https://www.milanuncios.com/coches-de-segunda-mano/?precio_max=15000`
- `https://www.milanuncios.com/motos-de-segunda-mano-en-madrid/honda.htm`
- `https://www.milanuncios.com/alquiler-de-pisos-en-barcelona/`

When you paste a URL, the filter fields below are skipped.

#### Option 2: Use filters

| Field | Description | Default |
|-------|-------------|---------|
| **Category** | Category slug from the URL — e.g. `coches-de-segunda-mano`, `motos`, `alquiler-de-pisos`, `informatica`. | `coches-de-segunda-mano` |
| **Keywords** | Free-text search within the category — e.g. `ford focus`, `iphone 15`. | — |
| **Min / Max price (€)** | Price range filter. Leave blank for no bounds. | — |
| **Province** | Province slug — e.g. `madrid`, `barcelona`, `bizkaia`. Leave empty for all of Spain. | — |
| **Max results** | Hard cap on listings. | `10` |
| **Max pages** | Page-count cap. Each page has ~41 listings. | `5` |
| **Enrich with details** | Visit each listing page for 68 fields instead of 33. Slower (1 extra request per listing). | `false` |

***

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

This Actor uses **Pay-Per-Event** pricing — you pay only for results delivered, not for compute time.

| Plan | What you get |
|------|-------------|
| **Free tier** | $5/month of platform credits — enough for thousands of listings |
| **Paid plans** | Scale to tens of thousands of results per run |

***

### Use cases

- **Used car market analysis** — Monitor competitor pricing and inventory across Spain's largest classifieds platform.
- **Real estate tracking** — Track rental and sale prices by neighborhood, province, or property type.
- **Price monitoring** — Schedule daily runs to detect price changes on products, vehicles, or properties.
- **Market research** — Analyze supply, demand, and pricing trends across 30+ categories.
- **Inventory monitoring** — Watch new listings daily for any category to catch underpriced items or fast-moving inventory.

***

### Integrations & scheduling

- **Schedule** daily/weekly runs from the Apify Console for automated data collection.
- Push results to **Google Sheets, Slack, Zapier, Make, webhooks** or any database.
- Fetch datasets via the **Apify REST API** or the official JavaScript/Python clients.

***

### Is it legal to scrape Milanuncios?

This Actor collects only **publicly available** data. It does not log in, bypass paywalls, or access private information. You are responsible for using the extracted data in compliance with the site's Terms of Service and applicable data protection laws (including GDPR where relevant).

***

### FAQ

**Can I access the data via API?**
Yes. Every run stores its dataset on Apify. Fetch it via REST API or use the official JavaScript/Python clients.

**What export formats are supported?**
JSON, CSV, Excel (XLSX), XML, and HTML table. You can also push data directly to Google Sheets or any webhook endpoint.

**Do I need proxies?**
Yes — Milanuncios requires Spanish residential proxies. The Actor auto-configures Apify residential proxies (Spain) by default — no setup needed.

**What categories are supported?**
All Milanuncios categories: `coches-de-segunda-mano`, `motos`, `alquiler-de-pisos`, `venta-de-pisos`, `informatica`, `electronica`, `muebles`, `empleo`, and 20+ more. Use the category slug from the URL.

**What's the difference between search mode and detail enrichment?**
Search mode extracts 33 fields per listing from the search results page — fast and lightweight. Detail enrichment visits each listing's page for 68 fields including vehicle specs, seller contact data, Schema.org metadata, and coordinates. Detail mode is slower (1 extra request per listing).

### Related Scrapers by Rastriq — Used Cars & Marketplaces

- [Wallapop Cars Scraper](https://apify.com/rastriq/wallapop-cars-scraper) — Spain's largest classifieds app
- [Cochesnet Spain Scraper](https://apify.com/rastriq/cochesnet-spain) — Spain's largest dealer marketplace
- [Autoscout24 Scraper](https://apify.com/rastriq/autoscout24-scraper) — Pan-European used car marketplace
- [Mobile.de Scraper](https://apify.com/rastriq/mobile-de-scraper) — Germany's largest car marketplace

# Actor input Schema

## `searchUrl` (type: `string`):

Pega cualquier URL de Milanuncios con filtros ya aplicados. Tiene prioridad sobre los campos de abajo.<br><br>Formatos aceptados:<br><code>https://www.milanuncios.com/coches-de-segunda-mano/</code><br><code>https://www.milanuncios.com/motos/honda.htm?precio\_max=5000</code>

## `categorySlug` (type: `string`):

Slug de la categoría en Milanuncios. Lo encontrarás en la URL: <code>milanuncios.com/<b>coches-de-segunda-mano</b>/</code>.<br>Se ignora si proporcionas una URL de búsqueda arriba.

## `keywords` (type: `string`):

Términos de búsqueda dentro de la categoría. Ejemplo: <code>ford focus</code>, <code>iphone 15</code>.

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

Filtrar anuncios con precio igual o superior a este valor (en €).

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

Filtrar anuncios con precio igual o inferior a este valor (en €).

## `province` (type: `string`):

Slug de la provincia. Ejemplo: <code>madrid</code>, <code>barcelona</code>, <code>bizkaia</code>. Déjalo vacío para buscar en toda España.

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

Número máximo de anuncios a extraer. Usa un valor bajo (10-50) para pruebas. Sin límite si se deja vacío.

## `maxPages` (type: `integer`):

Número máximo de páginas de resultados a recorrer. Cada página tiene ~41 anuncios.

## `fetchDetails` (type: `boolean`):

Activa para visitar cada anuncio y extraer <b>68 campos</b> (atributos técnicos, datos del vendedor, coordenadas, Schema.org). Desactivado = solo datos de listado (<b>33 campos</b>). <br><br>⚠️ Más lento y consume más proxy (1 request extra por anuncio).

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

Milanuncios requiere proxies residenciales españoles. Si no configuras nada, se usarán automáticamente los proxies residenciales de Apify (ES).

## Actor input object example

```json
{
  "searchUrl": "https://www.milanuncios.com/coches-de-segunda-mano/",
  "categorySlug": "coches-de-segunda-mano",
  "maxItems": 10,
  "maxPages": 5,
  "fetchDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

All scraped listings with category, price, location, and optional enrichment fields (vehicle specs, seller data, Schema.org metadata).

# 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 = {
    "searchUrl": "https://www.milanuncios.com/coches-de-segunda-mano/",
    "categorySlug": "coches-de-segunda-mano",
    "maxItems": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "ES"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rastriq/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 = {
    "searchUrl": "https://www.milanuncios.com/coches-de-segunda-mano/",
    "categorySlug": "coches-de-segunda-mano",
    "maxItems": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "ES",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("rastriq/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 '{
  "searchUrl": "https://www.milanuncios.com/coches-de-segunda-mano/",
  "categorySlug": "coches-de-segunda-mano",
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}' |
apify call rastriq/milanuncios-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/dey1Dsy7CvBOWdn5W/builds/UfARcjCaFXVbXvPEB/openapi.json
