{
  "openapi": "3.0.1",
  "info": {
    "title": "Habitissimo Spain Contractors Scraper — Phones & Addresses",
    "description": "Spanish reformas & trade companies from habitissimo.es: each company's own phone numbers (mobile + landline, E.164), trades, provinces served, rating and reviews, plus street address, postal code, city, description and published rates. Filter by trade + province/city. $4 per 1,000 companies.",
    "version": "0.1",
    "x-build-id": "I56aOpiEtUJCnxBPJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~habitissimo-spain-contractors-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-habitissimo-spain-contractors-scraper",
        "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/scrapersdelight~habitissimo-spain-contractors-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-habitissimo-spain-contractors-scraper",
        "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/scrapersdelight~habitissimo-spain-contractors-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-habitissimo-spain-contractors-scraper",
        "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": {
          "trades": {
            "title": "Trades or categories",
            "type": "array",
            "description": "Directory slugs as they appear in habitissimo.es/empresas/<slug>. Trades: electricistas, fontaneros, pintores, albaniles, reformas-banos, reformas-cocinas, reformas-viviendas, carpinteros, cerrajeros, placas-solares, aire-acondicionado, tejados, … (85 in total). Whole categories: reformas, obras-menores, instaladores, construccion, mantenimiento, tecnicos, mudanzas, tiendas, comercializadoras. Accents and spaces are normalised (\"Reformas baños\" → reformas-banos).",
            "default": [
              "electricistas"
            ],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Provinces or cities (optional)",
            "type": "array",
            "description": "Narrow each trade to a province (\"madrid\", \"barcelona\", \"valencia\", \"illes-balears\", …) or a city inside it (\"madrid/getafe\", \"barcelona/badalona\"). Each trade is searched once per location. Leave empty to search all of Spain. A company listed in several searches is delivered and charged once.",
            "default": [
              "madrid"
            ],
            "items": {
              "type": "string"
            }
          },
          "includeProfileDetails": {
            "title": "Open each company profile (address, website, rates)",
            "type": "boolean",
            "description": "Adds street address, postal code, city, province, website, Facebook, Instagram, full description, services offered, published hourly / call-out rates, member-since year and profile dates — one extra page per company. Off = listing fields only (name, phones, trades, provinces served, rating, reviews): faster, same price per row.",
            "default": true
          },
          "requirePhone": {
            "title": "Only companies with a phone number",
            "type": "boolean",
            "description": "Skip companies that publish no phone (measured: 2 of 3,770 electricians). Skipped companies are never charged.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating (0-5)",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep only companies rated at least this (companies with no reviews have no rating and are skipped when this is above 0). Skipped companies are never charged.",
            "default": 0
          },
          "minReviews": {
            "title": "Minimum number of reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only companies with at least this many customer reviews on Habitissimo. Skipped companies are never charged.",
            "default": 0
          },
          "maxResults": {
            "title": "Max companies",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after delivering this many companies (cost guard). Set 0 for no limit — every company in every search.",
            "default": 75
          },
          "maxPagesPerSearch": {
            "title": "Max listing pages per search",
            "minimum": 0,
            "type": "integer",
            "description": "Limit how deep each trade/location search goes (10 companies per page). 0 = every page the site states.",
            "default": 0
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many pages are fetched at once. The default is gentle on the site and fast enough for thousands of companies.",
            "default": 6
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Hard deadline for a single page request; a slow request is retried.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: habitissimo.es answers Apify's servers directly (the default, and the cheapest). If you do pick an Apify proxy, choose the RESIDENTIAL group. If a proxy cannot be set up the run continues without one.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}