# Milanuncios Listings Scraper (`piotrv1001/milanuncios-listings-scraper`) Actor

The Milanuncios Listings Scraper exports classified ads from any Milanuncios search or category: title, price, category, city and province, seller name and type, attributes like km and year, description and photos. Ideal for second-hand price research in Spain.

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

## Pricing

from $1.50 / 1,000 listings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

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

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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

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

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

# README

### 🚀 Milanuncios Listings Scraper

Export classified ads from [Milanuncios](https://www.milanuncios.com), Spain's largest general classifieds site. The **Milanuncios Listings Scraper** turns any Milanuncios search (a keyword, a category such as cars, motorbikes, property, jobs, electronics or furniture, a location and any filters) into structured data: title, price, category path, city, province and region, seller name and type, item attributes (kilometres, year, fuel, condition, colour...), the full description and photos. Use it for second-hand price research, resale sourcing, car and property market analysis or lead lists of professional sellers.

### ✨ Features

- 🔎 **Any search you can build on Milanuncios**: paste the results URL after choosing keywords, category, location, price range or order. Every page of that search is collected.
- 🏷️ **Ad details**: title, price, full category path, item attributes as key/value pairs (for cars: kilómetros, año, combustible), reserved and featured flags, shipping option, publish and update dates.
- 👤 **Seller**: seller name, seller ID, private or professional, and whether a phone number is available on the ad.
- 📍 **Location**: city, province and region of every ad.
- ♻️ **No duplicates**: featured ads that Milanuncios repeats on every page, and ads shared by overlapping searches, are returned and charged once.

### 🛠️ How It Works

1. **Search on Milanuncios** – Open [Milanuncios](https://www.milanuncios.com/anuncios/?s=iphone), set the location and filters you want and copy the URL of the results page.
2. **Paste the URL(s)** – Add one or more search URLs. A URL with `pagina=3` starts from page 3.
3. **Set a limit** – `maxItems` caps the total number of listings (default 50).
4. **Run it** – Listings arrive page by page; the `SUMMARY` record shows, for each search, how many results Milanuncios reported and how many were collected.

### ⚙️ Input

| Field | Description |
|---|---|
| `startUrls` | Milanuncios search results URLs, e.g. `https://www.milanuncios.com/anuncios/?s=iphone`. |
| `maxItems` | Maximum number of listings across all searches. Default 50. |
| `proxyConfiguration` | Apify Proxy; the default (Spanish residential) works. |

```json
{
    "startUrls": [
        { "url": "https://www.milanuncios.com/anuncios/?s=iphone" },
        { "url": "https://www.milanuncios.com/coches-de-segunda-mano/" }
    ],
    "maxItems": 500
}
```

### 📊 Sample Output Data

```json
{
    "id": "605655801",
    "url": "https://www.milanuncios.com/fiat-de-segunda-mano/fiat-punto-1-3-multijet-16v-dynamic-605655801.htm",
    "title": "FIAT Punto 1.3 Multijet 16V Dynamic",
    "price": 3900,
    "category": "Fiat",
    "categoryPath": [
        "Motor",
        "Coches",
        "Fiat"
    ],
    "adType": "supply",
    "city": "Barbera del Valles",
    "province": "Barcelona",
    "region": "Cataluña",
    "sellerType": "professional",
    "sellerName": "MORENO AUTOMOCION S.L",
    "sellerId": "239024903",
    "hasPhone": true,
    "isReserved": null,
    "isFeatured": false,
    "shipping": null,
    "attributes": {
        "kilómetros": "131.980 kms",
        "año": "2006",
        "combustible": "diesel"
    },
    "description": "Vehículo 5 plazas \nCon daño exterior en lateral derecho leve , adjuntamos fotos.\nCon garantía en nuestro taller oficial de stellantis ( fiat )\n\n\n\nEste anunci…",
    "images": [
        "https://images.milanuncios.com/api/v1/ma-ad-media-pro/images/52bccc8f-ee82-45ed-8d87-4dcd324baf9e",
        "https://images.milanuncios.com/api/v1/ma-ad-media-pro/images/bd20bfae-70f8-4576-a6b8-81cf0af249ca"
    ],
    "publishedAt": "2026-07-15T14:10:46Z",
    "updatedAt": "2026-09-23T18:25:37Z",
    "searchUrl": "https://www.milanuncios.com/coches-de-segunda-mano/",
    "scrapedAt": "2026-10-10T10:07:29.825Z"
}
```

### 💰 Pricing

This Actor uses pay-per-event pricing:

| Event | Price |
|---|---|
| Listing returned to the dataset | $0.0015 ($1.50 per 1,000) |
| Actor start (once per run) | $0.00005 |

Examples: 100 listings cost $0.15005, 1,000 listings cost $1.50005. You pay only for listings delivered to the dataset; repeats are never charged. Set a maximum cost per run in Apify Console and the Actor stops when it is reached.

### ❓ FAQ

**How many ads can I get from one search?**
Milanuncios shows at most 10,000 ads (200 pages) for any search. When a search reaches that limit, the status message says so: split it with filters (category, province, price range) to get more.

**In which order are ads collected?**
In the order of your URL. A search without a chosen order is collected newest first: the default "relevance" order moves ads between pages from one page load to the next, which would skip and repeat ads.

**Does it return phone numbers?**
No. Milanuncios shows phone numbers only after a click on the ad; `hasPhone` tells you whether the seller published one.

**Is scraping Milanuncios legal?**
The Actor collects publicly visible listing data. Make sure your use of it complies with Milanuncios's terms and with data-protection law (GDPR), especially for contact details.

*Keywords: milanuncios scraper, milanuncios API, anuncios clasificados España, coches de segunda mano, segunda mano, precios.*

# Actor input Schema

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

Milanuncios search results pages, copied from the browser after choosing keywords, category, location, price or any other filter and order. Every page of each search is collected. A URL with pagina=3 starts from page 3.

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

Stop after this many listings across all searches. Each listing is returned once even when several searches include it.

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

Milanuncios works best from Spanish residential connections; the default works.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.milanuncios.com/anuncios/?s=iphone"
    }
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "startUrls": [
        {
            "url": "https://www.milanuncios.com/anuncios/?s=iphone"
        }
    ],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "ES"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/milanuncios-listings-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://www.milanuncios.com/anuncios/?s=iphone" }],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "ES",
    },
}

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

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.milanuncios.com/anuncios/?s=iphone"
    }
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}' |
apify call piotrv1001/milanuncios-listings-scraper --silent --output-dataset

```

## MCP server setup

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