# Canarias Holiday Homes Scraper (Tourist Registry) (`steadfetch/canarias-vivienda-vacacional-extractor`) Actor

Extract holiday homes (vivienda vacacional) registered in the Canary Islands Tourist Registry as clean JSON: island, municipality, registry number, capacity and type. Official open data from datos.canarias.es, schema-validated. HTTP only, no browser.

- **URL**: https://apify.com/steadfetch/canarias-vivienda-vacacional-extractor.md
- **Developed by:** [Steadfetch](https://apify.com/steadfetch) (community)
- **Categories:** Travel
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 result delivereds

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

Ingestion connector for the Canary Islands tourist housing registry, built for [Steadfetch](https://apify.com/steadfetch) with TypeScript and plain HTTP (no browser). It downloads the official open-data CSV of holiday homes (vivienda vacacional) registered in the Registro General Turistico de Canarias, normalizes each row and pushes schema-validated JSON items. Development steps and the publishing checklist live in [PUBLISHING.md](PUBLISHING.md) and [CONTRIBUTING.md](../CONTRIBUTING.md).

### What it does

- Downloads one official CSV resource from datos.canarias.es (Gobierno de Canarias open data; no login, no paywall, no CAPTCHA bypass) and turns each registered holiday home into one dataset item.
- Normalizes every record to the fixed five-field contract agreed for the Steadfetch R2 product (`r2-canarias-esquema`): `municipio`, `isla`, `numero`, `plazas` and `tipo`. No personal data by design: names, addresses, phones, e-mails, floors/doors and cadastral references are never emitted.
- Cleans the source quirks instead of dumping them: quoted fields containing the `;` separator are parsed correctly (RFC 4180), registry ids map to their numeric tail (`A-38-4-0000685` -> 685), islands are matched case/accent-insensitively against the 7 islands, rows with unknown island/municipality (`_U`) or capacity below 1 are skipped and counted, and duplicated registry ids keep the last (updated) row.
- Validates every item against the dataset schema in `.actor/dataset_schema.json` before it reaches the dataset. With `strictSchema: true` (the default) invalid data is surfaced instead of published.

### How to use

1. Run it with the default input (first 5 registered homes), or raise `maxItems` for more:

   ```bash
   apify call steadfetch/canarias-vivienda-vacacional-extractor --input='{"csvUrl":"https://datos.canarias.es/catalogos/general/dataset/9f4355a2-d086-4384-ba72-d8c99aa2d544/resource/8ff8cc43-c00b-4513-8f42-a5b961c579e1/download/establecimientos-extrahoteleros-de-tipologia-vivienda-vacacional-inscritos-en-el-registro-genera.csv","maxItems":5,"strictSchema":true}'
   ```

2. Read results from the run's default dataset (JSON, CSV or the API).

#### Input fields

| Field | Type | Required | Default | Description | Example |
| --- | --- | --- | --- | --- | --- |
| `csvUrl` | string | Yes | official resource URL | Direct download URL of the official CSV resource. Change it only if the publisher moves the resource. | official datos.canarias.es download URL |
| `maxItems` | integer | No | 100 | Hard cap on results per run, so no run dumps the whole 70k+ registry. | `5` |
| `strictSchema` | boolean | No | true | Fail the run when an item does not match the OUTPUT schema. Keep enabled. | `true` |

#### Example input

Matches the declared `exampleRunInput` exactly:

```json
{
  "csvUrl": "https://datos.canarias.es/catalogos/general/dataset/9f4355a2-d086-4384-ba72-d8c99aa2d544/resource/8ff8cc43-c00b-4513-8f42-a5b961c579e1/download/establecimientos-extrahoteleros-de-tipologia-vivienda-vacacional-inscritos-en-el-registro-genera.csv",
  "maxItems": 5,
  "strictSchema": true
}
```

### Output

#### Example output

```json
{
  "url": "https://datos.canarias.es/catalogos/general/dataset/9f4355a2-d086-4384-ba72-d8c99aa2d544/resource/8ff8cc43-c00b-4513-8f42-a5b961c579e1/download/establecimientos-extrahoteleros-de-tipologia-vivienda-vacacional-inscritos-en-el-registro-genera.csv",
  "scrapedAt": "2026-11-06T12:00:00.000Z",
  "municipio": "San Miguel De Abona",
  "isla": "Tenerife",
  "numero": 685,
  "plazas": 10,
  "tipo": "Vivienda Vacacional"
}
```

(This README is ASCII, so the example spells the registry-number key `numero`; the real JSON key is the accented Spanish form used by the source and the schema: `numero` with an acute accent on the `o`.)

#### Output fields

| Field | Type | Description |
| --- | --- | --- |
| `url` | string | Source CSV resource URL (common Steadfetch envelope, required). |
| `scrapedAt` | date-time | ISO 8601 UTC timestamp of the ingestion run (common envelope, required). |
| `municipio` | string | Municipality of the Canary Islands, as published. |
| `isla` | string | One of the 7 Canary Islands. |
| `numero` | integer | Numeric part of the official registry id. The actual JSON key is the accented Spanish word (see the note above the example). |
| `plazas` | integer | Guest capacity (>= 1). |
| `tipo` | string | Accommodation typology, e.g. `Vivienda Vacacional`. |

The record core (`municipio`, `isla`, `numero`, `plazas`, `tipo`) is exactly the `r2-canarias-esquema` schema and nothing else is added, so downstream R2 code can rely on the shape.

### Pricing

Pay-per-event with the two synthetic platform events: `apify-actor-start` at 0.00005 USD per run (Apify-recommended default, includes the first 5 seconds of compute) and `apify-default-dataset-item` at 1.50 USD per 1,000 results. There is no custom per-item event and no `Actor.charge()` call, so users are never billed twice. Steadfetch keeps result prices between 1 and 10 USD per 1,000 results, set per Actor against its direct competitors on the Apify Store.

Measured cost (2026-11-06, local run at 256 MB): one run downloads the ~14 MB CSV and normalizes the full 72k-row registry in seconds, so compute cost per 1,000 results stays well below 0.01 USD; the 1.50 USD per 1,000 results price keeps a healthy margin over it.

Monitor Actors built from this template may add exactly one more event: the reserved `monitor-check`, charged once per watched item actually checked in a run, priced 0.01-1.00 USD per 1,000 checks. This connector is not a monitor and does not charge it; the pattern and the price measurement are documented in the repository `CONTRIBUTING.md`, section "Monitor Actors: charge per check"; the publish gate rejects every other custom event.

**Works on the Apify free plan** - about 3,300 results for the $5 monthly credit (5.00 USD minus run-start events at 256 MB, at 0.0015 USD per result).

### Other Steadfetch Actors

Real Actors built from the same template, sharing the same envelope and pricing model:

- [Spanish Cruise Port Schedule Scraper](https://apify.com/steadfetch/puerto-tenerife-cruceros-monitor) - cruise calls in Tenerife and other Spanish ports.
- [Canary Islands Electricity Scraper](https://apify.com/steadfetch/canarias-electricity-consumption-monitor) - daily electricity consumption in the Canary Islands.
- [Spain Tourism Statistics Scraper](https://apify.com/steadfetch/exceltur-indicadores-extractor) - Exceltur tourism indicators.
- [AENA Airport Stats Scraper](https://apify.com/steadfetch/aena-estadisticas-extractor) - monthly traffic of the Spanish airports.

### FAQ

**Does the Actor need a login or paid subscription to the target site?** No. The source is official open data from the Gobierno de Canarias, reusable under its Aviso legal; the Actor never bypasses logins, paywalls or CAPTCHAs.

**Why no browser (Playwright)?** The source is a plain CSV file: HTTP download + parsing is roughly 10x cheaper and faster, and no JavaScript rendering is needed.

**Is there personal data in the output?** No. The registry's open dataset does not include natural-person data, and the connector only emits the five normalized fields; commercial names and addresses are deliberately dropped.

**What happens with rows the connector cannot normalize?** They are skipped and counted (unknown island/municipality, capacity below 1, unparseable registry id) - nothing is invented. The run log reports the skip counts.

**When am I charged?** Once per run start (`apify-actor-start`) and once per result saved (`apify-default-dataset-item`). Failed runs that deliver no results only incur the start event.

**Is the output schema stable?** Yes. The five-field record core is fixed by the R2 schema; the envelope (`url`, `scrapedAt`) never changes.

**Can I request a new source?** Yes, open an issue in the Steadfetch actors repository describing the public page you want tracked.

### Support

Report bugs or request features through the Apify Store page (Issues tab) of the Actor you ran, or through the Steadfetch actors repository issues. Include the run ID and the input used.

### Maintenance

This Actor is **tested daily** through the monorepo CI (`npm test` and `npm run publish:check` on every push, plus the shared publish gate) and joins the daily catalog QA once it is published. Schema changes are announced through repository releases.

# Actor input Schema

## `csvUrl` (type: `string`):

Direct download URL of the official CSV resource (Registro General Turistico de Canarias, viviendas vacacionales, datos.canarias.es). Change it only if the publisher moves the resource.

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

Maximum number of results to push to the dataset (a hard cap so no run dumps the whole 70k+ registry).

## `strictSchema` (type: `boolean`):

Fail the run when an item does not match the OUTPUT schema. Keep enabled: Steadfetch never publishes Actors without output-schema validation.

## `saveSnapshot` (type: `boolean`):

When true and the run is started by the Steadfetch account, save a daily snapshot to the shared S3 bucket (D-08).

## Actor input object example

```json
{
  "csvUrl": "https://datos.canarias.es/catalogos/general/dataset/9f4355a2-d086-4384-ba72-d8c99aa2d544/resource/8ff8cc43-c00b-4513-8f42-a5b961c579e1/download/establecimientos-extrahoteleros-de-tipologia-vivienda-vacacional-inscritos-en-el-registro-genera.csv",
  "maxItems": 5,
  "strictSchema": true,
  "saveSnapshot": false
}
```

# Actor output Schema

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

Dataset items validated against the item schema in dataset_schema.json (fields).

# 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 = {
    "csvUrl": "https://datos.canarias.es/catalogos/general/dataset/9f4355a2-d086-4384-ba72-d8c99aa2d544/resource/8ff8cc43-c00b-4513-8f42-a5b961c579e1/download/establecimientos-extrahoteleros-de-tipologia-vivienda-vacacional-inscritos-en-el-registro-genera.csv",
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadfetch/canarias-vivienda-vacacional-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 = {
    "csvUrl": "https://datos.canarias.es/catalogos/general/dataset/9f4355a2-d086-4384-ba72-d8c99aa2d544/resource/8ff8cc43-c00b-4513-8f42-a5b961c579e1/download/establecimientos-extrahoteleros-de-tipologia-vivienda-vacacional-inscritos-en-el-registro-genera.csv",
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("steadfetch/canarias-vivienda-vacacional-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 '{
  "csvUrl": "https://datos.canarias.es/catalogos/general/dataset/9f4355a2-d086-4384-ba72-d8c99aa2d544/resource/8ff8cc43-c00b-4513-8f42-a5b961c579e1/download/establecimientos-extrahoteleros-de-tipologia-vivienda-vacacional-inscritos-en-el-registro-genera.csv",
  "maxItems": 5
}' |
apify call steadfetch/canarias-vivienda-vacacional-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,steadfetch/canarias-vivienda-vacacional-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/LzF2URuEmezlKXPcn/builds/cCUhJvDwkSzdhkO7Z/openapi.json
