# milanuncios API scraper — Spain's largest classifieds site: marketplace search with price, condition, shipping and private/professional filters, cars and motorbikes (make, model, year, km, fuel, gearbox, power), real estate for sale and rent (bedrooms, bathrooms, m²), and the full ad record with shipping options and seller rating. No account, no browser; private sellers' names withheld.

> Search milanuncios, Spain's largest classifieds site, by keyword and/or category: price (unpublished prices labelled, price drops with the earlier price), region, province and city, private or professional seller, condition, shipping, highlighted (destacado) flag, reserved flag, first publication and last renewal dates, attributes, images and description. Filter by category, price, location, seller type, condition, shipping available, price dropped, offers or wanted ads.
> ReefAPI engine `milanuncios` · 4 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/milanuncios/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed calls are free except verified SHEIN NOT_FOUND on product/detail and price (4 credits).
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http, `Authorization: Bearer <key>`) and your assistant can call these actions directly.

## Endpoints

### POST /milanuncios/v1/search — 1 credit
Search milanuncios, Spain's largest classifieds site, by keyword and/or category: price (unpublished prices labelled, price drops with the earlier price), region, province and city, private or professional seller, condition, shipping, highlighted (destacado) flag, reserved flag, first publication and last renewal dates, attributes, images and description. Filter by category, price, location, seller type, condition, shipping available, price dropped, offers or wanted ads.

**Parameters:**
- `query` (string, optional) — Free-text keyword (Spanish), matched in titles and descriptions.
- `category` (string, optional) — milanuncios category id at any level, e.g. 31 = Deportes y náutica, 679 = Bicicletas, 83 = Telefonía, 30 = Casa y jardín, 1 = Motor, 32 = Inmobiliaria; category_path on a row gives the ids.
- `transaction` (enum, optional, default "offer") — offer (default) or wanted ads. [one of: offer, wanted]
- `condition` (enum, optional) — new, like_new, good, acceptable or poor. [one of: new, like_new, good, acceptable, poor]
- `shippable` (boolean, optional) — Only ads the seller ships (envío).
- `price_dropped` (boolean, optional) — Only ads whose price was lowered.
- `price_min` (number, optional) — Lowest price in EUR (monthly rent on rentals).
- `price_max` (number, optional) — Highest price in EUR (monthly rent on rentals).
- `seller_type` (enum, optional) — Only private (particular) or only professional sellers. [one of: private, professional]
- `region` (string, optional) — Region (comunidad autónoma) by name, accents and case ignored (andalucía, cataluña, comunidad valenciana, galicia…), or its id from location.region_id (53 = Galicia).
- `province` (string, optional) — Province by name, accents and case ignored — any of Spain's 52 incl. Ceuta and Melilla (madrid, barcelona, valencia, a coruña, las palmas…) — or its id from location.province_id (28 = Madrid).
- `city` (string, optional) — City id from location.city_id on a result row (13 = Barcelona, 44 = Madrid). For a name, use province.
- `page` (integer, optional, default 1) — Result page. milanuncios serves results up to offset 8,200.
- `limit` (integer, optional, default 30) — Rows per page, up to 100.
- `include_sponsored` (boolean, optional, default false) — Also return the separate paid top-ad list, apart, under sponsored[].
- `include_pii` (boolean, optional, default false) — Return private sellers' names (and, on listing, avatar and postcode).
- `max_rotations` (integer, optional, default 3) — Upstream attempts on fresh exits before giving up.

**Returns:** listings[]{ad_id, title, url, category_id, category, category_path[]{id, name}, transaction, price, currency, price_not_published, price_includes_taxes, financed_price, previous_price, price_drop_pct, published_at, renewed_at, updated_at, is_renewed, location{region_id, region, province_id, province, city_id, city, latitude, longitude, extra_provinces[]}, seller{type, seller_id, name (professional)}, is_highlighted, is_reserved, condition, condition_label, shipping{shippable, type, package_weight}, contact_methods, syndicated_from, attributes[]{key, label, value, value_label}, image_count, images[], thumbnail, description, vehicle{…} | property{…} | features[]}, count, total, total_is_lower_bound, page, limit, has_more, sort_applied, highlighted_count, duplicates_dropped, dropped_outside_price_range, sponsored_dropped, sponsored[]

**Example request body:**
```json
{
  "query": "bicicleta"
}
```

### POST /milanuncios/v1/cars/search — 1 credit
Search milanuncios motor ads — cars, off-roaders, classic cars, motorcycles, vans, trucks, caravans, campervans and quads: cash price (taxes included or not), financed price, make, year, mileage, fuel, gearbox, horsepower, doors, colour, environmental label, warranty, dealer or private seller, province and city, images. Filter by vehicle type, make, model, year, mileage, fuel, gearbox, power, price, seller type and location.

**Parameters:**
- `vehicle_type` (enum, optional, default "car") — car (default), offroad, classic_car, motorcycle, van, truck, caravan, campervan or quad. [one of: car, offroad, classic_car, motorcycle, van, truck, caravan, campervan, quad]
- `query` (string, optional) — Free-text keyword (Spanish), matched in titles and descriptions.
- `make` (string, optional) — Make, e.g. seat, volkswagen, mercedes-benz (cars, off-roaders, classic cars, vans).
- `model` (string, optional) — Model words, with make, e.g. ibiza, golf, serie 3, clase c (spaces, not hyphens).
- `year_min` (integer, optional) — Earliest year.
- `year_max` (integer, optional) — Latest year.
- `mileage_min` (number, optional) — Lowest mileage, km.
- `mileage_max` (number, optional) — Highest mileage, km.
- `fuel` (enum, optional) — diesel, gasoline, electric, hybrid, plug_in_hybrid or glp (LPG). [one of: diesel, gasoline, electric, hybrid, plug_in_hybrid, glp]
- `gearbox` (enum, optional) — manual or automatic. [one of: manual, automatic]
- `power_min` (number, optional) — Lowest power, hp.
- `power_max` (number, optional) — Highest power, hp.
- `price_min` (number, optional) — Lowest price in EUR (monthly rent on rentals).
- `price_max` (number, optional) — Highest price in EUR (monthly rent on rentals).
- `seller_type` (enum, optional) — Only private (particular) or only professional sellers. [one of: private, professional]
- `region` (string, optional) — Region (comunidad autónoma) by name, accents and case ignored (andalucía, cataluña, comunidad valenciana, galicia…), or its id from location.region_id (53 = Galicia).
- `province` (string, optional) — Province by name, accents and case ignored — any of Spain's 52 incl. Ceuta and Melilla (madrid, barcelona, valencia, a coruña, las palmas…) — or its id from location.province_id (28 = Madrid).
- `city` (string, optional) — City id from location.city_id on a result row (13 = Barcelona, 44 = Madrid). For a name, use province.
- `page` (integer, optional, default 1) — Result page. milanuncios serves results up to offset 8,200.
- `limit` (integer, optional, default 30) — Rows per page, up to 100.
- `include_sponsored` (boolean, optional, default false) — Also return the separate paid top-ad list, apart, under sponsored[].
- `include_pii` (boolean, optional, default false) — Return private sellers' names (and, on listing, avatar and postcode).
- `max_rotations` (integer, optional, default 3) — Upstream attempts on fresh exits before giving up.

**Returns:** listings[]{ad_id, title, url, category_id, category, category_path[]{id, name}, transaction, price, currency, price_not_published, price_includes_taxes, financed_price, previous_price, price_drop_pct, published_at, renewed_at, updated_at, is_renewed, location{region_id, region, province_id, province, city_id, city, latitude, longitude, extra_provinces[]}, seller{type, seller_id, name (professional)}, is_highlighted, is_reserved, condition, condition_label, shipping{shippable, type, package_weight}, contact_methods, syndicated_from, attributes[]{key, label, value, value_label}, image_count, images[], thumbnail, description, vehicle{make, year, mileage_km, fuel, gearbox, power_hp, doors, seats, colour, environmental_label, warranty}}, count, total, total_is_lower_bound, page, limit, has_more, sort_applied, highlighted_count, duplicates_dropped, dropped_outside_price_range, sponsored_dropped, sponsored[]

**Example request body:**
```json
{
  "make": "seat",
  "model": "ibiza"
}
```

### POST /milanuncios/v1/real_estate/search — 1 credit
Search milanuncios real estate for sale, rent, flat-share or holiday rent — flats, apartments, houses, chalets, penthouses, studios, lofts, commercial premises, offices, warehouses, rural estates, garages, storage rooms and buildings: price or monthly rent, bedrooms, bathrooms, m², price per m², floor, energy certificate, heating, features (lift, terrace, pool…), agency or private owner, region, province and city, images. Filter by transaction, property type, price, bedrooms, bathrooms, surface, seller type and location.

**Parameters:**
- `transaction` (enum, required) — sale, rent, share (flat-share; flats only) or holiday_rent. [one of: sale, rent, share, holiday_rent]
- `property_type` (enum, optional, default "flat") — flat (default), apartment, house, chalet, penthouse, studio, loft, commercial, office, warehouse, rural_estate, garage, storage_room, building. [one of: flat, apartment, chalet, penthouse, studio, loft, house, commercial, office, warehouse, rural_estate, garage, storage_room, building]
- `query` (string, optional) — Free-text keyword (Spanish), matched in titles and descriptions.
- `bedrooms_min` (integer, optional) — Fewest bedrooms.
- `bedrooms_max` (integer, optional) — Most bedrooms.
- `bathrooms_min` (integer, optional) — Fewest bathrooms.
- `surface_min` (number, optional) — Smallest surface, m².
- `surface_max` (number, optional) — Largest surface, m².
- `price_min` (number, optional) — Lowest price in EUR (monthly rent on rentals).
- `price_max` (number, optional) — Highest price in EUR (monthly rent on rentals).
- `seller_type` (enum, optional) — Only private (particular) or only professional sellers. [one of: private, professional]
- `region` (string, optional) — Region (comunidad autónoma) by name, accents and case ignored (andalucía, cataluña, comunidad valenciana, galicia…), or its id from location.region_id (53 = Galicia).
- `province` (string, optional) — Province by name, accents and case ignored — any of Spain's 52 incl. Ceuta and Melilla (madrid, barcelona, valencia, a coruña, las palmas…) — or its id from location.province_id (28 = Madrid).
- `city` (string, optional) — City id from location.city_id on a result row (13 = Barcelona, 44 = Madrid). For a name, use province.
- `page` (integer, optional, default 1) — Result page. milanuncios serves results up to offset 8,200.
- `limit` (integer, optional, default 30) — Rows per page, up to 100.
- `include_sponsored` (boolean, optional, default false) — Also return the separate paid top-ad list, apart, under sponsored[].
- `include_pii` (boolean, optional, default false) — Return private sellers' names (and, on listing, avatar and postcode).
- `max_rotations` (integer, optional, default 3) — Upstream attempts on fresh exits before giving up.

**Returns:** listings[]{ad_id, title, url, category_id, category, category_path[]{id, name}, transaction, price, currency, price_not_published, price_includes_taxes, financed_price, previous_price, price_drop_pct, published_at, renewed_at, updated_at, is_renewed, location{region_id, region, province_id, province, city_id, city, latitude, longitude, extra_provinces[]}, seller{type, seller_id, name (professional)}, is_highlighted, is_reserved, condition, condition_label, shipping{shippable, type, package_weight}, contact_methods, syndicated_from, attributes[]{key, label, value, value_label}, image_count, images[], thumbnail, description, property{transaction, bedrooms, bathrooms, surface_m2, price_per_m2, floor, energy_certificate, heating, hot_water, features[]}}, count, total, total_is_lower_bound, page, limit, has_more, sort_applied, highlighted_count, duplicates_dropped, dropped_outside_price_range, sponsored_dropped, sponsored[]

**Example request body:**
```json
{
  "transaction": "rent",
  "province": "8"
}
```

### POST /milanuncios/v1/listing — 1 credit
The full milanuncios ad by id or URL, in any category: title, price (unpublished prices labelled; cars: taxes included or not and financed price), description, all images, category path, condition, reserved flag, first publication and last renewal, attributes, vehicle or property details, shipping (envío) with carriers and their prices, contact methods, and the seller — type, member since, rating and review count, city; a professional's business name, a private seller's name withheld.

**Parameters:**
- `ad_id` (string, required) — The milanuncios ad id (the digits before .htm in an ad URL) or the full URL.
- `include_pii` (boolean, optional, default false) — Return private sellers' names (and, on listing, avatar and postcode).
- `max_rotations` (integer, optional, default 3) — Upstream attempts on fresh exits before giving up.

**Returns:** listing{ad_id, title, url, category_id, category, category_path[], transaction, price, currency, price_not_published, price_includes_taxes, financed_price, published_at, renewed_at, is_renewed, location{region, province, city, zone, street}, seller{type, account_type, seller_id, name, member_since, email_verified, city, province, rating, rating_scale, rating_count}, is_highlighted, is_reserved, condition, shipping{shippable, type, package_weight, carriers[]{carrier, service, price, price_before_discount, currency}}, contact_methods, syndicated_from, attributes[]{key, value}, image_count, images[], description, vehicle{} | property{} | features[]}

## More
- Try it live, no code: https://reefapi.com/playground?engine=milanuncios
- Human docs page: https://reefapi.com/docs/milanuncios
- Overview page: https://reefapi.com/milanuncios-api
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
