{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain Tourist Rental Licence Registry & Checker (VUT, HUT)",
    "description": "Official Spanish tourist-rental licences from 10 regional registries (Catalonia HUT, Valencia, Andalusia, Canary Islands, Madrid, Balearics, Basque Country, Galicia, Castile-León, Navarre) in one clean feed. Validate Airbnb licence numbers, get new and removed licences daily. No owner data.",
    "version": "0.1",
    "x-build-id": "Mwenqr7FTdkB27nbD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/icarodata~spain-tourist-rental-registry/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-icarodata-spain-tourist-rental-registry",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/icarodata~spain-tourist-rental-registry/runs": {
      "post": {
        "operationId": "runs-sync-icarodata-spain-tourist-rental-registry",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/icarodata~spain-tourist-rental-registry/run-sync": {
      "post": {
        "operationId": "run-sync-icarodata-spain-tourist-rental-registry",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "list",
              "validate"
            ],
            "type": "string",
            "description": "List: download and filter the official registries. Validate: check the licence numbers you paste below against the registries (one row per number with a verdict).",
            "default": "list"
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Registries to read. Empty = all 10. In validate mode the region is detected from the licence format when possible.",
            "items": {
              "type": "string",
              "enum": [
                "CT",
                "VC",
                "AN",
                "CN",
                "MD",
                "CL",
                "PV",
                "IB",
                "GA",
                "NC"
              ],
              "enumTitles": [
                "Catalunya (HUT)",
                "Comunitat Valenciana (CV-VUT)",
                "Andalucía (VUT / VFT)",
                "Canarias (VV)",
                "Comunidad de Madrid (VT)",
                "Castilla y León",
                "Euskadi (REATE)",
                "Illes Balears – Mallorca & Menorca (ETV / HTV / ET)",
                "Galicia (VUT)",
                "Navarra (UAT / UVT / UCR)"
              ]
            },
            "default": []
          },
          "municipalities": {
            "title": "Municipalities",
            "type": "array",
            "description": "Optional. Exact municipality or locality names; accents, case and bilingual forms are ignored (e.g. 'Alicante' matches 'ALACANT/ALICANTE', 'Palmas de Gran Canaria' matches 'Las Palmas de Gran Canaria').",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "Optional. Province names, e.g. Málaga, Girona, Santa Cruz de Tenerife.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "postalCodes": {
            "title": "Postal codes (prefix)",
            "type": "array",
            "description": "Optional. Full postcodes or prefixes, e.g. 08001 or 290 (all of Málaga city area).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "addressContains": {
            "title": "Address contains",
            "type": "array",
            "description": "Optional. Keep licences whose registered address contains ANY of these words (e.g. a street name).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "minCapacity": {
            "title": "Minimum capacity (guests)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Minimum number of authorised guest places. Registries without capacity data (Madrid) are excluded when set."
          },
          "maxCapacity": {
            "title": "Maximum capacity (guests)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Maximum number of authorised guest places."
          },
          "registeredFrom": {
            "title": "Registered on or after",
            "type": "string",
            "description": "Optional (YYYY-MM-DD). Only licences registered on or after this date. Only Valencia, Andalucía, Euskadi and Mallorca publish dates; other regions are excluded when this is set — use 'Only new since last run' for them."
          },
          "operatorType": {
            "title": "Operator",
            "enum": [
              "any",
              "company"
            ],
            "type": "string",
            "description": "Company-operated = the registry publishes a legal-entity operator (SL, SA, CIF). Private individuals are never identified.",
            "default": "any"
          },
          "ruralOnly": {
            "title": "Rural only",
            "type": "boolean",
            "description": "Only dwellings flagged as rural by the registry (Valencia, Andalucía, Euskadi).",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run (alerts)",
            "type": "boolean",
            "description": "Schedule this Actor (daily/weekly) with the same input to get only licences that are NEW since the previous run, plus licences REMOVED from the registry. State is kept per input.",
            "default": false
          },
          "reportRemoved": {
            "title": "Also report removed licences",
            "type": "boolean",
            "description": "In only-new mode, also output licences that disappeared from the registry (status 'removed_from_registry'). If a source is down, its licences are never reported as removed.",
            "default": true
          },
          "firstRunBehaviour": {
            "title": "First only-new run",
            "enum": [
              "baseline",
              "output_all"
            ],
            "type": "string",
            "description": "What the very first only-new run does. 'baseline' saves the current registry silently and charges nothing, so the next runs only show changes.",
            "default": "baseline"
          },
          "licenceNumbers": {
            "title": "Licence numbers to validate",
            "type": "array",
            "description": "Validate mode only. One per line, as shown in listings, e.g. HUTB-012345, VUT/MA/12345, CV-VUT0514102-A, VV-38-4-0094285, VT-12345, ETV/1234, EBI00003, VUT-PO-001234. Separators, case and leading zeros are tolerated; VFT/ and VUT/ (Andalucía) are treated as the same number.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of rows to output (and charge) in this run.",
            "default": 1000
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}