# Spain Property Scraper – thinkSPAIN (Sale & Long-Term Rent) (`sn41lz/thinkspain-property-scraper`) Actor

Scrape Spanish property listings from thinkSPAIN: price, price drops, bedrooms, m², plot, features, new build or resale, town and photos. Any province, costa or town, for sale or long-term rent, with no 1,584-result limit.

- **URL**: https://apify.com/sn41lz/thinkspain-property-scraper.md
- **Developed by:** [Sergi Espí Zamora](https://apify.com/sn41lz) (community)
- **Categories:** Real estate, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 property saveds

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

## Spain Property Scraper – thinkSPAIN (Sale & Long-Term Rent)

Get **every property listing for any area of Spain** from [thinkSPAIN](https://www.thinkspain.com), one of the biggest property portals for international buyers, with hundreds of thousands of homes from Spanish estate agents and developers.

Type a location (**Malaga, Costa del Sol, Costa Blanca, Mallorca, Marbella, Torrevieja…**), choose sale or long-term rent, and get clean data: **price, price drops, bedrooms, bathrooms, built and plot m², price per m², new build or resale, features, town and photos**.

### Why this scraper?

- **No 1,584-result limit.** thinkSPAIN only lets you page through 99 pages of any search. This Actor detects bigger searches and splits them into price ranges automatically, so you get **every listing**, even for all of the Costa del Sol (38,000+ homes).
- **Price drops included.** When an agent has cut the price, you get the old price and the % drop. It's ideal for finding motivated sellers.
- **Sale and long-term rent**, every property type: apartments, villas, townhouses, fincas, plots, commercial, garages.
- **Optional full details:** full description, all features, energy rating and every photo URL.
- **No duplicates**, so you never pay twice for the same property.

### Who is it for?

- **Investors** comparing €/m² across towns and spotting price reductions.
- **Estate agents and developers** monitoring competing stock and prices in their area.
- **Relocation and buying agents** building shortlists for international clients.
- **Analysts and journalists** studying the Spanish property market for foreign buyers.

### What data do you get?

| Field | Example |
|---|---|
| `title`, `propertyType`, `condition` | Villa for sale in Pinoso, villa, resale |
| `price`, `previousPrice`, `priceDropPercent` | 365000, 385950, 5.4 |
| `bedrooms`, `bathrooms` | 4, 3 |
| `builtAreaM2`, `plotAreaM2`, `pricePerM2` | 177, 10250, 2062 |
| `town`, `province`, `locationSlug` | Pinoso, alicante, pinoso |
| `features` | Pool, Garden, Mountain Views, Fireplace… |
| `description` | Short description (full text with *Include full details*) |
| `agentReference`, `advertiserId` | The agent's own reference and an advertiser ID |
| `photosCount`, `image` | 49, photo URL |
| `url`, `id` | Link to the property |

With **Include full details**: `fullDescription`, the complete `features` list, `energyRating`, `areaHierarchy` (e.g. Valencia › Alicante › Costa Blanca › Dénia) and `images` (all photo URLs).

### How to use it

1. Add one or more **Locations**: a province, region, costa, island or town.
2. Choose **For sale** or **Long-term rent**, and optionally a property type and price range.
3. Set **Max results** to control cost, and click **Start**.
4. Download the results as Excel, CSV or JSON, or send them to Google Sheets.

**Need more filters?** Set them on thinkspain.com (bedrooms, sea view, pool, new build…), copy the URL of the results page and paste it into **Search URLs**.

**Tip:** schedule it weekly to track new listings and price drops in the areas you follow.

### How much does it cost?

**$2 per 1,000 properties** ($0.002 each), with or without full details. 500 villas in Marbella cost about $1. Use **Max results** to set a hard cap.

### Notes

- The Actor reads public search pages at a gentle pace and respects the site's robots.txt.
- It doesn't collect phone numbers or any personal data.

***

### En español

Extrae **todos los pisos, casas y chalets en venta o alquiler de larga duración** de thinkSPAIN, el portal inmobiliario de España para compradores extranjeros. Escribe una zona (Málaga, Costa del Sol, Costa Blanca, Mallorca, Marbella…) y obtén precio, **bajadas de precio**, habitaciones, baños, m² construidos y de parcela, €/m², obra nueva o segunda mano, características y fotos. Sin el límite de 1.584 resultados de la web. Cuesta 2 $ por cada 1.000 inmuebles.

# Actor input Schema

## `locations` (type: `array`):

Provinces, regions, costas, islands or towns in Spain, e.g. 'Malaga', 'Costa Blanca', 'Mallorca', 'Marbella', 'Torrevieja'. Large areas are split automatically so you get every listing.

## `listingType` (type: `string`):

Properties for sale or for long-term rent.

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

Only this type of property.

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

Only properties at or above this price. For rentals, the monthly rent.

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

Only properties at or below this price. For rentals, the monthly rent.

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

Or paste thinkSPAIN result pages with any filters you set on the site (bedrooms, features, new build…), e.g. https://www.thinkspain.com/property-for-sale/mallorca/apartments-flats?beds=e2

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

Stop after this many properties in total. 0 = no limit.

## `includeDetails` (type: `boolean`):

Also open each property page to get the full description, every feature, energy rating, area hierarchy and all photo URLs. Slower; same price per property.

## Actor input object example

```json
{
  "locations": [
    "Marbella"
  ],
  "listingType": "for-sale",
  "propertyType": "all",
  "maxItems": 100,
  "includeDetails": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `results` (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 = {
    "locations": [
        "Marbella"
    ],
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("sn41lz/thinkspain-property-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 = {
    "locations": ["Marbella"],
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("sn41lz/thinkspain-property-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 '{
  "locations": [
    "Marbella"
  ],
  "maxItems": 100
}' |
apify call sn41lz/thinkspain-property-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sn41lz/thinkspain-property-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/b6tjJtYRZcZNQLdMI/builds/NCqKLwGoCEZauj1G8/openapi.json
