# Fotocasa Scraper (`ribtools/fotocasa-scraper`) Actor

Scrape Fotocasa.es property listings for sale and rent (flats, houses, rooms, garages, offices, plots, new builds) from any search, ad, agency or new-build URL: prices and price drops, m², bedrooms, full address and map pin, description, photos, agency name and phone.

- **URL**: https://apify.com/ribtools/fotocasa-scraper.md
- **Developed by:** [RibTools](https://apify.com/ribtools) (community)
- **Categories:** Real estate, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 property data 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/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

## Fotocasa Scraper

Scrape **Fotocasa** (fotocasa.es), Spain's property portal: pisos en venta, alquiler, compartir, obra nueva and particulares, with price and price drops, **price per m²**, m², bedrooms, bathrooms, floor, the full address down to the street, the map pin, description, photos and the agency. Type a place and a few filters, or paste any Fotocasa URL.

### What is Fotocasa Scraper?

**Fotocasa Scraper** collects property listings from [Fotocasa](https://www.fotocasa.es/): homes, rooms, garages, offices, commercial premises, storage rooms, plots and new-build developments for sale (comprar), for rent (alquiler), rooms to share (compartir), rent to own and business transfers (traspaso). It works like the site's own search box: fill the province `Madrid`, the city `Madrid` and the district `Chamberí`, choose rent or buy and a few filters, and get one structured item per property, ready for a price comparison, a market report or your own database.

Built for real-estate agents, investors, analysts and proptech teams, and for AI agents: it runs from ChatGPT, Claude or n8n through Apify's MCP server, and its input is plain fields an agent fills on the first try.

### What can this Actor do?

- **Search by place** — province, city (municipio), district (distrito), neighborhood (barrio) or street (calle), one field each, looked up in Fotocasa's own search box: one match runs, a name that matches several places is refused with the candidates, never guessed
- **Filter like the site** — operation, property type, home types, price, bedrooms, bathrooms, area, new build only, published within the last day/week/month, newest first
- **Paste any Fotocasa URL** — searches with any filters and tags, street areas, map view, new-build searches, private-owner pages (particulares), single ads, new-build developments, agency pages
- **Every page to its end** — up to the 9,990 results Fotocasa shows per search, each ad once even when two searches list it
- **Price drops and price per m²** — the previous price and the drop when the ad shows one
- **Seller add-on** — the agency's trading name, office phone, profile and logo, from the same page (no extra request)
- **Premium proxies included** — Spanish residential proxies built in at no extra cost

### What data can Fotocasa Scraper extract?

| Field | Description | Example |
| ----- | ----------- | ------- |
| **Title** | Type, operation and place, as the ad page writes it | Piso en venta en Calle de San Ildefonso, Embajadores - Lavapiés, Madrid |
| **Property type / subtype / label** | Fotocasa's type, home subtype and Spanish label | flat / flat / Piso |
| **Transaction / operation** | `sale` or `rent`; `buy`, `rent`, `share`, `rent_to_own`, `transfer` | sale / buy |
| **Price, old price, drop** | Euros (monthly rent for rentals), previous price, drop in % | 440000, 480000, 8.3 |
| **Price per m²** | Price / area | 5714.29 |
| **Area, plot area** | m² | 77 |
| **Bedrooms, bathrooms** | Habitaciones and baños | 1, 1 |
| **Floor** | Number (0 = bajos) and the label shown | 0, Bajos |
| **Address** | Community, province, city, district, neighborhood, postal code, street | Madrid, Madrid, Madrid, Centro, Embajadores - Lavapiés, 28012, Calle de San Ildefonso |
| **Map pin** | Latitude and longitude, as published | 40.4104, -3.6965 |
| **Description** | The ad text, verbatim | … |
| **Features** | Amenities, in Spanish | Ascensor, Terraza, Aire acondicionado |
| **Attributes** | Antigüedad, orientación, estado, agua caliente | orientation: Oeste |
| **Flags** | New build, occupied (okupada), auction (subasta), bare ownership (nuda propiedad), rented | false |
| **Photos, floor plans, video, virtual tour** | Media URLs | https://static.fotocasa.es/images/ads/… |
| **Seller** | `agency`, `developer` (new-build developments) or `private`; the professional's id, trading name and page | agency, Aproperties Real Estate Madrid |
| **Developments** | Lowest unit price, number of units, developer | 389900, 7, PREMIER MADRID |
| **Listed at** | Publication date (UTC) | 2026-04-30T10:45:34Z |

### How to scrape Fotocasa

#### Step-by-step tutorial:

1. **Fill a place** — a **Province** (`Madrid`) or a **City** (`Madrid`), then a **District** (`Chamberí`), **Neighborhood** or **Street**; or paste Fotocasa URLs
2. **Configure options** (optional) — operation, property type, filters, **Max results per search**, the seller add-on
3. **Run the scraper** — Click "Start"; the status message reads back what it searches
4. **Download results** — Export data in JSON, CSV, or Excel format

Proxies are included automatically — no setup required.

#### Compatible URL examples:

- **Search, any filters**: `https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l?maxPrice=400000&minRooms=2`
- **Rent, a district, page N**: `https://www.fotocasa.es/es/alquiler/viviendas/madrid-capital/chamberi/l/3` (starts at page 3)
- **Feature and long-tail tags**: `…/todas-las-zonas/2-habitaciones/l`, `/es/tag/comprar/viviendas/madrid-capital/todas-las-zonas/con-piscina/l`
- **Street area**: `https://www.fotocasa.es/es/comprar/viviendas/area/plaza-lavapies-madrid-capital/l`
- **Map view**: `…/todas-las-zonas/m`
- **New-build developments search**: `https://www.fotocasa.es/es/promociones-obra-nueva/comprar/viviendas/madrid-capital/todas-las-zonas/l`
- **Private owners (particulares)**: `https://www.fotocasa.es/es/comprar/viviendas/particulares/madrid-capital/todas-las-zonas/pl` (the 15 ads the page lists)
- **Ad**: `https://www.fotocasa.es/es/comprar/vivienda/madrid-capital/aire-acondicionado-calefaccion-trastero-ascensor/185678205/d` (any language, gallery links too)
- **New-build development**: `https://www.fotocasa.es/es/comprar/obra-nueva/madrid-capital/20678401`
- **Agency**: `https://www.fotocasa.es/es/pro/olisson/` and its tabs (`…/alquiler/viviendas/espana/todas-las-zonas/l`), old `/inmobiliarias/…` links too

`fotocasa.es` without `www` and `m.fotocasa.es` links work too. **Important**: Only URLs matching these patterns will work; the short `/es/anuncio/<id>` link is skipped (Fotocasa doesn't serve it).

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

Fotocasa Scraper uses **pay-per-result (PPR)** pricing — you only pay for successfully extracted properties.

#### Is scraping Fotocasa free?

The scraper follows Apify's PPR model with the following structure:

- **Base extraction**: one event per property returned, with every field above
- **Seller data add-on**: one more event per property whose agency data was added (never for private owners)

Pricing is optimized for efficiency, using minimal compute units while maintaining high success rates. Contact support for volume discounts on large-scale projects.

### Input configuration

The scraper accepts the following inputs. Fill a place, paste URLs, or both: one place search per run, plus every URL.

#### Province (provincia)

One of Spain's 52 provinces. Alone it searches the whole province; with a city it only tells apart cities that share a name (`Arroyomolinos` is in Madrid and in Cáceres).

#### City (municipio)

The municipality as Fotocasa names it (`Madrid`, `Barcelona`, `Getafe`), looked up in Fotocasa's search box. Several matches are refused with the candidates: add the province.

#### District (distrito)

A district of the city (`Chamberí`, `Salamanca`, `Eixample`). A district name alone that exists in several cities (`Centro` is in more than ten) is refused with the candidates: add the city.

#### Neighborhood (barrio)

A neighborhood of the city, inside the district when you fill one (`Trafalgar` is in Chamberí, Madrid). Fotocasa keeps districts and neighborhoods apart: a name typed in the wrong field is refused, and the reason says which field Fotocasa has it in.

#### Street (calle)

A street of the city (`Calle de Alcalá`), searched as Fotocasa's street area. It needs the city, and no district or neighborhood.

#### Fotocasa URLs

Any Fotocasa search, ad, development or agency URL (see above). A URL keeps the filters it carries. When you set filters and paste URLs without a place, the query filters (price, bedrooms, bathrooms, area, new build, published within, newest first) are added to plain search URLs that don't carry them already; the status message names every filter it could not apply (operation, type, home types, tagged searches, agency, ad and private-owner pages).

#### Max results per search

The most properties for the place search and for each URL (default 10). Each property is a charged event. Fotocasa shows at most 9,990 results per search (333 pages): the run stops there and says so; narrow a bigger search.

#### Operation

For sale (comprar), for rent (alquiler), rooms to share (compartir), rent to own (alquiler con opción a compra) or business transfer (traspaso), as on the site's tabs. Rooms to share and rent to own list homes only; transfers list commercial premises only: another pair is refused before anything runs.

#### Property type

One type per search, as Fotocasa searches them: homes (viviendas), new developments (promociones de obra nueva, one item per development), garages, commercial premises (locales), offices, storage rooms (trasteros), land (terrenos), buildings, or all properties (inmuebles).

#### Home types

Piso, apartamento, casa o chalet, adosado, ático, dúplex, loft, casa rural, bajo, estudio; empty means every home. For the property type Homes only.

#### Price from (€)

Lowest price, in euros: the monthly rent for rentals.

#### Price to (€)

Highest price, in euros: the monthly rent for rentals.

#### Bedrooms from

Fewest bedrooms (habitaciones), 0 to 4; 4 means 4 or more, as on the site.

#### Bedrooms to

Most bedrooms, 0 to 4.

#### Bathrooms from

Fewest bathrooms.

#### Bathrooms to

Most bathrooms.

#### Area from (m²)

Smallest area, in m².

#### Area to (m²)

Largest area, in m².

#### New build only (obra nueva)

Only newly built properties, as Fotocasa marks them.

#### Published within

Only ads published in the last day, two days, week or month. With **Newest first** it is what a daily or weekly monitoring run needs.

#### Sort

Fotocasa's own order, or newest first. A pasted URL keeps its own order.

#### Seller data add-on

Adds `seller` to each agency or developer ad: trading name, office phone (the number behind "Ver teléfono"), Fotocasa profile and logo, from the same page with no extra request. Private owners' ads never get one: their name and phone are not collected. Charged only for items that got seller data.

### Output example

```json
{
  "type": "property",
  "id": 189538966,
  "ad_uuid": "383fbf1b-c90a-4162-985d-239f687fa499",
  "url": "https://www.fotocasa.es/es/comprar/vivienda/madrid-capital/aire-acondicionado-calefaccion-terraza-trastero-ascensor-amueblado/189538966/d",
  "title": "Piso en venta en Calle de San Ildefonso, Embajadores - Lavapiés, Madrid",
  "property_type": "flat",
  "property_subtype": "flat",
  "property_label": "Piso",
  "transaction": "sale",
  "operation": "buy",
  "price": 440000,
  "currency": "EUR",
  "price_period": null,
  "old_price": 480000,
  "price_drop_pct": 8.3,
  "price_per_m2": 5714.29,
  "area_m2": 77.0,
  "terrain_area_m2": null,
  "bedrooms": 1,
  "bathrooms": 1,
  "floor": 0,
  "floor_label": "Bajos",
  "region": "Madrid",
  "subregion": "Madrid",
  "city": "Madrid",
  "city_district": "Centro",
  "neighborhood": "Embajadores - Lavapiés",
  "postal_code": "28012",
  "street": "Calle de San Ildefonso",
  "location_label": "Calle de San Ildefonso, Embajadores - Lavapiés",
  "latitude": 40.41040380637335,
  "longitude": -3.6964546858558323,
  "description": "PRECIOSO PISO REFORMADO A ESTRENAR CON PATIOS \n\nAproperties presenta precioso piso reformado a estrenar en calle San Idelfonso. Situado en la planta baja de una…",
  "seller_type": "agency",
  "seller_id": "9202756368671",
  "seller_name": "Aproperties Real Estate Madrid",
  "seller_url": "https://www.fotocasa.es/es/pro/aproperties-real-estate-madrid/",
  "is_promoted": true,
  "is_highlighted": false,
  "badges": [
    "IS_MODERN"
  ],
  "features": [
    "Aire acondicionado",
    "Armarios",
    "Calefacción",
    "Terraza",
    "Trastero",
    "Ascensor",
    "Amueblado",
    "Electrodomésticos",
    "Cocina Equipada"
  ],
  "attributes": {
    "hotWater": "Electricidad",
    "orientation": "Oeste"
  },
  "photos": [
    "https://static.fotocasa.es/images/ads/031b2b41-fb00-42e6-95b5-976fc17b3853?rule=original",
    "https://static.fotocasa.es/images/ads/26292685-3efc-4263-9128-7d00e95dce1d?rule=original"
  ],
  "floorplans": [],
  "video_url": null,
  "virtual_tour_url": null,
  "is_new_build": false,
  "is_new": false,
  "is_occupied": false,
  "is_auctioned": false,
  "is_bare_ownership": false,
  "is_rented": false,
  "is_development": false,
  "price_is_starting_from": null,
  "developer_name": null,
  "development_units": null,
  "listed_at": "2026-04-30T10:45:34Z",
  "search": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l",
  "seller": {
    "id": "9202756368671",
    "name": "Aproperties Real Estate Madrid",
    "phone": "+00000000002",
    "profile_url": "https://www.fotocasa.es/es/pro/aproperties-real-estate-madrid/",
    "logo_url": "https://static.fotocasa.es/images/client/5cbf9036-d1e9-422b-878f-1943c01d47df/20260309101652?rule=original"
  }
}
```

You can download the dataset extracted by **Fotocasa Scraper** in various formats such as **JSON, HTML, CSV, or Excel**. The data is automatically cleaned and normalized for immediate use in analysis tools, databases, or business applications.

### Use cases and applications

- **Comparables for a valuation** — the homes around a property with price per m², floor and condition
- **Rental and sale market reports** — prices and price per m² by district and neighborhood, across Spain
- **Price-drop monitoring** — newest first and published within the last day, scheduled daily
- **New-build tracking** — developments, their lowest prices and units by city

### Use with ChatGPT, Claude or n8n

Connect Apify's MCP server (mcp.apify.com) to ChatGPT or Claude, or use the Apify node in n8n, and ask in plain words. The agent fills the place and filter fields.

- *"Use the Fotocasa Scraper to find 2-bedroom flats for rent in Chamberí, Madrid, up to 1,800 € a month, newest first."*
- *"With the Fotocasa Scraper, get 100 homes for sale in Eixample, Barcelona and give me the median price per m²."*

### Integrations and API access

Fotocasa Scraper seamlessly integrates with popular platforms:

- **Zapier** — Automate data workflows and notifications (via [Apify Zapier integration](https://docs.apify.com/platform/integrations/zapier))
- **Make (Integromat)** — Create complex automation scenarios (via [Apify Make integration](https://www.make.com/en/integrations/apify))
- **Google Sheets** — Direct data export for analysis
- **REST API** — Programmatic access to extracted data ([instructions here](https://docs.apify.com/academy/api/run-actor-and-retrieve-data-via-api))
- **Python/Node.js SDKs** — Easy integration into applications ([instructions here](https://docs.apify.com/academy/api/run-actor-and-retrieve-data-via-api#javascript-and-python-client))

### FAQ and Support

#### Do I need to configure a proxy?

No. The Actor includes Spanish residential proxies automatically at no additional cost. There's nothing to configure.

#### Why was my place skipped?

The scraper looks the place up in Fotocasa's own search box and runs it only when exactly one place matches, so you are never charged for the wrong search. The status message says what to add: the province for a repeated city name, the city for a district or neighborhood found in several cities, or the field the name belongs in (`Trafalgar` is a neighborhood, not a district). The first results page is also checked: if Fotocasa answered with another place or dropped a filter, the search is skipped before anything is charged.

#### Does it collect private owners' data?

No. Ads by private owners (particulares) ship with `seller_type: private` and nothing about the person: no name, phone or account. The street ships when the ad page shows it, as Fotocasa publishes it.

#### How often is the data updated?

Fotocasa updates listings in real-time. For fresh data, schedule regular scraper runs or use our API for on-demand extraction.

#### What if some URLs don't work?

The scraper only supports specific URL patterns from Fotocasa. Ensure your URLs match the compatible formats listed above. URLs outside these patterns are skipped and named in the status message; a removed ad is skipped and counted.

#### Do you offer custom solutions?

Absolutely! We can customize the scraper for specific requirements, additional data points, or integration with your existing systems. Contact us through the Issues tab for enterprise solutions.

#### Need help or have feedback?

- **Report issues**: Use the Issues tab for bug reports and feature requests
- **Custom development**: Contact us for tailored solutions and enterprise integrations

# Changelog

This Actor's version history is a separate document: https://apify.com/ribtools/fotocasa-scraper/changelog.md

# Actor input Schema

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

One of Spain's 52 provinces: `Madrid`, `Barcelona`, `Málaga`. Alone it searches the whole province; with a city below it only tells apart cities that share a name (Arroyomolinos is in Madrid and in Cáceres).

## `city` (type: `string`):

The municipality, as Fotocasa names it: `Madrid`, `Barcelona`, `Getafe`. Looked up in Fotocasa's own search box: a name that matches several cities is refused with the candidates (add the province), never guessed.

## `district` (type: `string`):

A district of the city above: `Chamberí`, `Salamanca`, `Eixample`. Leave empty to search the whole city. Without a city, a district name found in several cities (`Centro`) is refused with the candidates.

## `neighborhood` (type: `string`):

A neighborhood of the city above, inside the district when that is filled: `Trafalgar` (in Chamberí, Madrid), `Gràcia`. Fotocasa keeps districts and neighborhoods apart: a name in the wrong field is refused and the reason says which field it belongs in.

## `street` (type: `string`):

A street of the city above, as Fotocasa names it: `Calle de Alcalá`, `Gran Vía`. Searched as Fotocasa's street area; needs the city and no district or neighborhood.

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

Pages copied from fotocasa.es: a search (`https://www.fotocasa.es/es/alquiler/viviendas/madrid-capital/chamberi/l`, any filters, tags, `/area/` streets, map view, new-build `/promociones-obra-nueva/` and private-owner `/pl` pages), an ad (`…/<id>/d`), a new-build promotion (`/comprar/obra-nueva/…/<id>`) or an agency (`/es/pro/<slug>/`). A URL keeps its own filters.

## `maxRequests` (type: `integer`):

Maximum number of properties for the place search and for each URL above (default 10); each property is a charged event. Fotocasa lists at most 9,990 per search: narrow a bigger one.

## `transaction` (type: `string`):

Buy (comprar), rent (alquiler), rooms to share (compartir), rent to own (alquiler con opción a compra) or a business transfer (traspaso). Rooms to share and rent to own list homes only; transfers list commercial premises only.

## `propertyType` (type: `string`):

One type per search, as Fotocasa searches them: homes (viviendas), new developments (obra nueva promotions, one item per development), garages, commercial premises (locales), offices, storage rooms (trasteros), land (terrenos), buildings or all of them (inmuebles).

## `homeTypes` (type: `array`):

Only these kinds of home; empty means every home. For the property type Homes only.

## `priceFrom` (type: `integer`):

Lowest price to include, in euros: the monthly rent for rentals.

## `priceTo` (type: `integer`):

Highest price to include, in euros: the monthly rent for rentals.

## `bedroomsFrom` (type: `integer`):

Fewest bedrooms (habitaciones) to include, 0 to 4; 4 means 4 or more.

## `bedroomsTo` (type: `integer`):

Most bedrooms to include, 0 to 4; 4 means 4 or more.

## `bathroomsFrom` (type: `integer`):

Fewest bathrooms to include.

## `bathroomsTo` (type: `integer`):

Most bathrooms to include.

## `areaFrom` (type: `integer`):

Smallest area to include, in square meters.

## `areaTo` (type: `integer`):

Largest area to include, in square meters.

## `newBuild` (type: `boolean`):

Only newly built properties, as Fotocasa marks them.

## `publishedWithin` (type: `string`):

Only ads published in the last day, two days, week or month: with Newest first, what a daily or weekly monitoring run needs.

## `sort` (type: `string`):

Order of the place search. A pasted URL keeps its own order.

## `sellerDataAddon` (type: `boolean`):

The agency's or developer's trading name, office phone, Fotocasa profile and logo, read from the same page (no extra request). Never a private owner's: their ads ship without a seller. Charged per item with seller data.

## Actor input object example

```json
{
  "province": "madrid",
  "city": "Madrid",
  "district": "Chamberí",
  "neighborhood": "Trafalgar",
  "street": "Calle de Alcalá",
  "startUrls": [
    "https://www.fotocasa.es/es/alquiler/viviendas/madrid-capital/chamberi/l"
  ],
  "maxRequests": 10,
  "transaction": "sale",
  "propertyType": "homes",
  "newBuild": false,
  "publishedWithin": "any",
  "sort": "default",
  "sellerDataAddon": false
}
```

# Actor output Schema

## `items` (type: `string`):

All scraped items.

# 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 = {
    "province": "madrid",
    "city": "Madrid",
    "district": "Chamberí",
    "maxRequests": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("ribtools/fotocasa-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 = {
    "province": "madrid",
    "city": "Madrid",
    "district": "Chamberí",
    "maxRequests": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("ribtools/fotocasa-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 '{
  "province": "madrid",
  "city": "Madrid",
  "district": "Chamberí",
  "maxRequests": 10
}' |
apify call ribtools/fotocasa-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ribtools/fotocasa-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/ePzuweYfGH6nNKnWu/builds/zYTmBnUJu1WKLcIrF/openapi.json
