# Milanuncios Scraper — Spain Classified Ads & Prices (`logiover/milanuncios-spain-classifieds-scraper`) Actor

Scrape Milanuncios.com, Spain's biggest classifieds site. Extract title, description, price in euros, category path, city, province and region, seller type (private or professional), seller ID, whether the ad is contactable, publish date, reserved flag, attribute tags and images. No API key.

- **URL**: https://apify.com/logiover/milanuncios-spain-classifieds-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** E-commerce, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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

## Milanuncios Scraper — Spain Classified Ads, Prices & Sellers

Spain's biggest classifieds site in rows: price in euros, full description, city, province and region, the private-versus-professional seller split, and whether the ad is an offer or a wanted request.

### What does the Milanuncios Scraper do?

This Actor collects live ads from **Milanuncios.com**, the general classifieds site Spain uses for cars, property, electronics, services and everything in between. Each result page ships its ads inside a JSON payload that the site's own front end renders from, so this Actor reads structured records rather than parsing markup — which is why the seller type, the full category path and the per-category attribute tags are all available without opening a single detail page.

Browse one of 18 top-level categories or search by keyword across the whole site, optionally narrowed to a province, and the Actor pages through roughly 41 ads per page. One detail is worth knowing: the province belongs in the URL path, not in a query parameter. Passed as a parameter it is accepted and then ignored, and a run comes back full of ads from the wrong end of the country. This Actor builds the path form, so a Madrid filter really does return Madrid.

### Who is it for?

- **Resellers and arbitrage traders** scanning Spanish second-hand supply for under-priced stock.
- **Automotive and property analysts** — Milanuncios is one of Spain's largest car and property listing pools.
- **Lead-generation teams** using the professional-seller flag and seller IDs to map dealers.
- **Market researchers** tracking Spanish resale prices region by region.
- **Marketplace operators** benchmarking supply, pricing and listing quality in Spain.

### Use cases

- Compare asking prices for the same category between Madrid, Barcelona and Valencia.
- Split a category by seller type to size how much of the supply is professional.
- Collect wanted ads specifically — the `adDirection` field separates demand from supply, which most datasets cannot.
- Track how long ads stay live by diffing `publishDate` against daily runs.
- Build a dealer list from `sellerId`, `sellerName` and the professional flag.
- Feed an AI agent live Spanish classifieds prices for valuation questions.

### Why use this Milanuncios Scraper?

- **Offer versus wanted** on every row — a demand signal most classifieds datasets throw away.
- **Private versus professional seller flag**, plus the seller ID and display name.
- **Province filtering that actually filters** — built as a URL path, not the query parameter the site silently ignores.
- **Full category path**, e.g. Motor > Coches > Mercedes-Benz, not just a leaf label.
- **Attribute tags per category** — mileage, year and fuel for cars; size and rooms for property.
- **Keyless and login-free** — nothing to register, nothing to rotate.

### What data can you extract?

One row per ad. Anything the source left blank comes back as `null`.

| Field | Type | Description |
|---|---|---|
| `adId` | string | Milanuncios ad identifier |
| `url` | string | Direct link to the ad |
| `title` | string | Ad title |
| `description` | string | Full ad description |
| `price` | number | Asking price in euros |
| `category` | string | Leaf category of the ad |
| `categoryPath` | string | Full category path from section to leaf |
| `city` | string | City or town |
| `province` | string | Province |
| `region` | string | Autonomous community |
| `sellerType` | string | private or professional |
| `isProfessional` | boolean | True where the seller is a business |
| `sellerId` | number | Milanuncios user ID |
| `sellerName` | string | Seller's public display name |
| `isContactable` | boolean | Seller accepts contact through the site |
| `adDirection` | string | offered for a sale ad, wanted for a demand ad |
| `isNew` | boolean | Item advertised as new |
| `isReserved` | boolean | Ad marked reserved |
| `isHighlighted` | boolean | Paid highlighted placement |
| `attributes` | string | Category attribute tags, e.g. "kilómetros: 109.000 kms | año: 2017" |
| `publishDate` | string | When the ad was first published |
| `updatedDate` | string | When it was last bumped or updated |
| `imageCount` | number | Number of photos |
| `imageUrl` | string | First photo |
| `scrapedAt` | string | When this row was collected |

#### Sample output

```json
{
  "adId": "495968332",
  "url": "https://www.milanuncios.com/casas-prefabricadas-en-cadiz-cadiz/transformacion-contenedor-maritimo-495968332...",
  "title": "TRANSFORMACION CONTENEDOR MARITIMO",
  "description": "Vendemos oficina, viviendas, bares, piscina a partir de la transformación de contenedores marítimos , tanto...",
  "price": 1,
  "category": "Casas prefabricadas",
  "categoryPath": "Inmobiliaria > Viviendas > Casas prefabricadas",
  "city": "Cádiz",
  "province": "Cádiz",
  "region": "Andalucía",
  "sellerType": "professional",
  "isProfessional": true,
  "sellerId": 226938569,
  "sellerName": "comercial: Global Container",
  "isContactable": false,
  "adDirection": "offered",
  "isNew": false,
  "isReserved": false,
  "isHighlighted": false,
  "attributes": null,
  "publishDate": "2023-10-03T21:41:49Z",
  "updatedDate": "2026-08-14T05:37:44Z",
  "imageCount": 9,
  "imageUrl": "https://images.milanuncios.com/api/v1/ma-ad-media-pro/images/4b4b81f0-ca89-422a-bafb-19d9a3410cb4",
  "scrapedAt": "2026-08-15T08:03:39.643Z"
}
```

### How to use the Milanuncios Scraper

#### Option A — a whole category

Pick a section such as motor, property, phones or home & garden, leave the keyword empty and set a result limit. Roughly 41 ads arrive per page.

#### Option B — a keyword across the site

Enter a search term such as `iphone` or `piso alquiler`. A keyword search runs across all categories, so the category selection is ignored in this mode.

#### Option C — one province

Add a province as it appears in a Milanuncios URL — `madrid`, `barcelona`, `valencia`, `sevilla`, `malaga` — with either of the modes above. National ads from relocatable sellers still appear, which is how the site itself behaves.

### Input parameters

| Input | Type | Description |
|---|---|---|
| `category` | string | Milanuncios section to browse. Ignored when a keyword is given, since a keyword search runs across the whole site. Default: `"motor"`. |
| `keyword` | string | Optional search term, e.g. iphone, bicicleta, piso alquiler. When set, the search runs across all categories. |
| `province` | string | Optional Spanish province, written as it appears in a Milanuncios URL: madrid, barcelona, valencia, sevilla, malaga, alicante, murcia, zaragoza. Leave empty for all of Spain. |
| `maxResults` | integer | Stop after this many ads. Each page returns about 41. Milanuncios caps one search at 10,000 ads, so narrow by category, keyword or province to reach beyond that. Default: `500`. |
| `proxyConfiguration` | object | Milanuncios serves Spanish exits. Residential proxy pinned to Spain is used automatically. |

### Tips for best results

- A single search stops at 10,000 ads. Split by category, province or keyword to go deeper rather than raising the limit.
- `adDirection` is worth filtering on: a category browse mixes sellers and buyers, and wanted ads distort a price analysis if left in.
- `updatedDate` moves when a seller bumps an ad, while `publishDate` does not — the gap between them shows how long something has been unsold.
- Professional sellers dominate some categories entirely; check the seller-type split before treating a category as a consumer market.
- Attribute tags differ per category, so parse them per category rather than expecting one shape across a mixed run.

### Integrations

Connect this Actor to Make, Zapier, n8n, Slack, Google Sheets, GitHub, Airtable or any HTTP endpoint through Apify integrations. Every finished run can push its dataset straight into your warehouse, or fire a webhook so a downstream job starts the moment the data lands.

### API usage

Run the Actor from your own code with the Apify API. Datasets can be exported as JSON, CSV, Excel, XML, RSS or HTML, and every run is available through the [Apify API reference](https://docs.apify.com/api/v2).

```bash
curl -X POST "https://api.apify.com/v2/acts/logiover~milanuncios-spain-classifieds-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"input": {"category": "motor", "keyword": "", "province": "madrid", "maxResults": 1000, "proxyConfiguration": {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "ES"}}}'
```

Python, JavaScript, PHP and CLI clients are documented under [Apify API clients](https://docs.apify.com/api/client).

### Use with AI agents (MCP)

This Actor is callable from any MCP-compatible client — Claude, Cursor, VS Code or your own agent — through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). An agent can call it to answer live questions about Spanish classified ad prices, regional supply and dealer versus private listings instead of guessing from stale training data.

### FAQ

#### Do I need a Milanuncios account or API key?

No. The Actor reads public ads with no login and no key.

#### Why does a province filter often fail on Milanuncios?

Because the site accepts a `provincias=` parameter and then ignores it — results come back nationwide with no error. The province has to be part of the URL path, which is what this Actor builds.

#### How many ads can one run return?

A category typically reports 10,000 reachable ads across 200 pages. Splitting by province or keyword multiplies what a run can reach.

#### What is the difference between an offer and a wanted ad?

`adDirection` is `offered` when someone is selling and `wanted` when they are looking to buy. Milanuncios carries a lot of both.

#### Can I get the seller's phone number?

No. Milanuncios keeps contact behind its own flow. The Actor collects the seller ID, display name, seller type and whether the seller accepts contact.

#### Which categories are supported?

18 top-level sections including motor, used cars, property, jobs, training, services, business, computing, image & sound, phones, games, home & garden, fashion, baby, hobbies, sport & boating, pets and community.

#### Why did my run return zero ads?

Usually a province spelled differently from the Milanuncios URL. Use `madrid`, not `Madrid` or `comunidad-de-madrid`.

#### Is the data in Spanish?

Yes. Titles, descriptions, categories and attribute tags are published in Spanish and collected as written.

#### Can I export to CSV or Excel?

Yes. Every run's dataset exports as JSON, CSV, Excel, XML, RSS or HTML from the Storage tab, the API, or automatically through an integration.

#### How fresh is the data?

Every run reads the site live at that moment, so the data is as fresh as the site itself. Schedule the Actor hourly, daily or weekly to build a time series.

#### How often is the Actor updated?

It is monitored and fixed when the site changes its markup or its endpoints. Report anything that looks wrong through the Issues tab and it gets picked up.

### Is it legal to scrape Milanuncios?

This Actor collects only publicly available information — the same pages any visitor can open without logging in. It does not bypass a login, and it does not touch private or personal accounts. Public data collection is legal in most jurisdictions, but how you *use* the data is your responsibility: if any record contains personal data, GDPR and comparable laws still apply, and you need a lawful basis for processing it. When in doubt, take legal advice. See Apify's [ethical web scraping](https://blog.apify.com/what-is-ethical-web-scraping-and-how-do-you-do-it/) guide.

### Related scrapers

- [Coches.net Scraper](https://apify.com/logiover/coches-net-scraper) — Spanish used cars with dealer phone numbers.
- [Pisos.com Scraper](https://apify.com/logiover/pisos-com-property-scraper) — Spanish property listings.
- [Habitaclia Scraper](https://apify.com/logiover/habitaclia-com-spain-scraper) — Catalan and Spanish property.
- [Kleinanzeigen Scraper](https://apify.com/logiover/kleinanzeigen-de-classifieds-scraper) — German classifieds.
- [Subito.it Scraper](https://apify.com/logiover/subito-it-property-scraper) — Italian classifieds.

# Actor input Schema

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

Milanuncios section to browse. Ignored when a keyword is given, since a keyword search runs across the whole site.

## `keyword` (type: `string`):

Optional search term, e.g. iphone, bicicleta, piso alquiler. When set, the search runs across all categories.

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

Optional Spanish province, written as it appears in a Milanuncios URL: madrid, barcelona, valencia, sevilla, malaga, alicante, murcia, zaragoza. Leave empty for all of Spain.

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

Stop after this many ads. Each page returns about 41. Milanuncios caps one search at 10,000 ads, so narrow by category, keyword or province to reach beyond that.

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

Milanuncios serves Spanish exits. Residential proxy pinned to Spain is used automatically.

## Actor input object example

```json
{
  "category": "motor",
  "keyword": "iphone",
  "province": "madrid",
  "maxResults": 500,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

# Actor output Schema

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

Every record collected in this run. Open the Dataset tab to browse, filter or export as JSON, CSV or Excel.

# API

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

## JavaScript example

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

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

// Prepare Actor input
const input = {
    "category": "motor",
    "maxResults": 500,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "ES"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/milanuncios-spain-classifieds-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 = {
    "category": "motor",
    "maxResults": 500,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "ES",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/milanuncios-spain-classifieds-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 '{
  "category": "motor",
  "maxResults": 500,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}' |
apify call logiover/milanuncios-spain-classifieds-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,logiover/milanuncios-spain-classifieds-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/Mc8JfJJkHScQKxzA4/builds/2N0DBTfHDSCR2NsvW/openapi.json
