# Yaencontre Property Extractor (`kawsar/yaencontre-property-extractor`) Actor

Pulls property listings, prices, and photos from yaencontre.com search pages, so you can track the Spanish housing market without clicking through listings one by one.

- **URL**: https://apify.com/kawsar/yaencontre-property-extractor.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Categories:** Real estate, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 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/actors/running/actors-in-store.md#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

## Yaencontre Property Extractor

Extract property listings from yaencontre.com search results as structured, ready-to-use data — no manual copy-pasting, no clicking through pages one by one.

Yaencontre is one of Spain's larger property portals, covering flats, houses, and rentals across the country. This actor takes a search URL, such as a city page or a filtered property-type page, walks through the paginated results, and returns clean data for every listing it finds.

### What it does

Give it a yaencontre.com search page and it will:

1. Load the search results and read the listings embedded in the page.
2. Move to the next result page automatically, up to the limit you set.
3. Repeat for every search URL you provide.
4. Return each listing as a separate row in the dataset, ready to export.

It works on any yaencontre.com search page — sales or rentals, any city, any property type — as long as the URL points to a list of results rather than a single listing.

### What you get for each listing

| Field | Description |
|---|---|
| `listingTitle` | Listing title |
| `listingDescription` | Full listing description |
| `operation` | `BUY` or `RENT` |
| `propertyFamily` | Property type (flat, house, etc.) |
| `price` | Asking price |
| `squareMeterPrice` | Price per square meter |
| `area` | Surface area in m² |
| `rooms` | Number of rooms |
| `bathrooms` | Number of bathrooms |
| `isNewConstruction` | Whether the listing is new construction |
| `locationName` | Neighborhood, district, city, and province |
| `latitude` / `longitude` | Approximate geolocation |
| `characteristics` | Features listed on the page (terrace, heating, condition, etc.) |
| `images` | Full-size photo URLs |
| `ownerName` / `ownerType` | Publishing agency or private owner |
| `listingUrl` | Direct link to the listing |
| `reference` / `listingId` | Listing identifiers |
| `scrapedAt` | Timestamp of extraction |

### Input

| Field | Type | Required | Description |
|---|---|---|---|
| `startUrls` | array of strings | Yes | One or more yaencontre.com search result URLs |
| `maxItems` | integer | No | Maximum number of listings to collect in total (default 100, max 1000) |
| `maxPagesPerUrl` | integer | No | Maximum number of result pages to visit per search URL (default 5) |
| `requestTimeoutSecs` | integer | No | Per-request timeout in seconds (default 30) |

#### Example input

```json
{
    "startUrls": [
        "https://www.yaencontre.com/venta/pisos/madrid",
        "https://www.yaencontre.com/alquiler/pisos/barcelona"
    ],
    "maxItems": 200,
    "maxPagesPerUrl": 10
}
```

#### Example output

```json
{
    "listingTitle": "Piso en Pueblo Nuevo, Madrid",
    "operation": "BUY",
    "propertyFamily": "FLAT",
    "price": 390000,
    "squareMeterPrice": 3714.29,
    "area": 105,
    "rooms": 4,
    "bathrooms": 2,
    "isNewConstruction": false,
    "locationName": "Pueblo Nuevo, Ciudad Lineal, Madrid, Madrid (provincia)",
    "latitude": 40.4299839,
    "longitude": -3.6455282,
    "characteristics": ["Planta 1ª", "Calefacción", "Terraza", "Buen estado", "Exterior"],
    "images": [
        "https://media.yaencontre.com/img/photo/w1200/38586/38586-57372894-1512127076.jpg"
    ],
    "ownerName": "SERVICHECK Inmobiliaria",
    "ownerType": "REAL_ESTATE_AGENCY",
    "listingUrl": "https://www.yaencontre.com/venta/piso/inmueble-38586-112282950",
    "reference": "38586-112282950",
    "scrapedAt": "2026-08-15T10:15:37.190888+00:00"
}
```

### Who this is for

- **Real estate agencies** checking what competitors are listing and at what price
- **Analysts and researchers** tracking how prices move across Spanish cities and neighborhoods
- **Developers** feeding listings into a property search app or internal tool
- **Anyone doing market research** on the Spanish housing market who needs the data in bulk instead of one listing at a time

### How to run it

1. Open the actor on Apify and go to the **Input** tab.
2. Paste one or more yaencontre.com search URLs into `startUrls`.
3. Adjust `maxItems` and `maxPagesPerUrl` if you want to limit the run.
4. Click **Start**.
5. Once the run finishes, open the **Output** tab or download the dataset as JSON, CSV, or Excel.

### Notes and limits

- `startUrls` must point to a search results page, not a single listing page.
- Pagination follows yaencontre's own page numbering, so `maxPagesPerUrl` controls exactly how many result pages get visited per URL.
- If a page fails to load or parse, the run logs it and moves on instead of stopping — you'll still get the listings that did come through.
- Geolocation is approximate, matching what yaencontre itself displays on listing pages.

### Support

Found an issue or have a feature request? Open an issue on the actor's page or reach out through Apify's contact options, and it'll get looked at.

# Actor input Schema

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

One or more yaencontre.com search result pages, e.g. https://www.yaencontre.com/venta/pisos/madrid

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

Maximum number of property listings to collect across all search URLs.

## `maxPagesPerUrl` (type: `integer`):

Maximum number of result pages to paginate through for each search URL.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.yaencontre.com/venta/pisos/madrid"
  ],
  "maxItems": 40,
  "maxPagesPerUrl": 5,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `properties` (type: `string`):

All extracted yaencontre.com property listings, one row per property.

# 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": [
        "https://www.yaencontre.com/venta/pisos/madrid"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/yaencontre-property-extractor").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": ["https://www.yaencontre.com/venta/pisos/madrid"] }

# Run the Actor and wait for it to finish
run = client.actor("kawsar/yaencontre-property-extractor").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": [
    "https://www.yaencontre.com/venta/pisos/madrid"
  ]
}' |
apify call kawsar/yaencontre-property-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kawsar/yaencontre-property-extractor"
        }
    }
}

```

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/cWw7AzHSbpQcTuIWq/builds/kxb9K5l1t3q0854wg/openapi.json
