{
  "openapi": "3.0.1",
  "info": {
    "title": "Fotocasa Scrape- LowCost | HiQuality",
    "description": "▎ Reliable Fotocasa data, at a fair price. ▎ We built the most efficient scraper for Fotocasa because we believe quality data shouldn't cost a fortune. No captchas, no browser overhead — just ▎ clean, structured data that works. ▎ Questions or ideas? → info@inmocalc.com",
    "version": "0.0",
    "x-build-id": "UWzlgmcxaeafDVn10"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraper_gump~fotocasa-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraper_gump-fotocasa-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/scraper_gump~fotocasa-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scraper_gump-fotocasa-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/scraper_gump~fotocasa-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scraper_gump-fotocasa-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": {
          "location_query": {
            "title": "Find location code",
            "type": "string",
            "description": "Type a city or area name (e.g. \"madrid\", \"barcelona\", \"valencia\"). The scraper returns the matching location codes — copy the one you need into the Search section below.\n\n⚠️ When this field is filled in, the Search section is ignored."
          },
          "locations": {
            "title": "Location code",
            "type": "string",
            "description": "The full Fotocasa location string (combinedLocationIds), e.g. Madrid Capital → 724,14,28,173,0,28079,0,0,0\n\n⚠️ Use the complete comma-separated string, not just the municipal code — a bare code like 28079 returns results for all of Spain.\n\n💡 Don't have it? Use the \"Find location code\" field above.",
            "default": "724,14,28,173,0,28079,0,0,0"
          },
          "transaction_type": {
            "title": "Transaction type",
            "enum": [
              "SALE",
              "RENT",
              "TRANSFER",
              "SHARE",
              "RENT_WITH_OPTION_TO_BUY",
              "HOLIDAY_RENTAL"
            ],
            "type": "string",
            "description": "Buy, rent, or another operation.",
            "default": "SALE"
          },
          "property_type": {
            "title": "Property type",
            "enum": [
              "HOME",
              "GARAGE",
              "LAND",
              "COMMERCIAL_PREMISES",
              "OFFICE",
              "BOX_ROOM",
              "BUILDING"
            ],
            "type": "string",
            "description": "The kind of property to search.",
            "default": "HOME"
          },
          "max_pages": {
            "title": "Max pages",
            "minimum": 0,
            "type": "integer",
            "description": "How many pages to fetch (each page ≈ the Items-per-page value). The default (20 pages × 125 ≈ 2500 listings) finishes in a couple of minutes. Set to 0 to scrape every available page — a full city can be hundreds of pages and take 30–50 minutes with a real proxy cost.",
            "default": 20
          },
          "page_size": {
            "title": "Items per page",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many listings to request per page (max 200). The API honours large pages with no time penalty, so raising this is the cheap way to get more listings without adding requests.",
            "default": 125
          },
          "min_price": {
            "title": "Min price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Only show properties at or above this price. Leave empty for no lower bound."
          },
          "max_price": {
            "title": "Max price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Only show properties at or below this price. Leave empty for no upper bound."
          },
          "min_surface": {
            "title": "Min surface (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Only show properties with at least this many square metres. Leave empty for no lower bound."
          },
          "max_surface": {
            "title": "Max surface (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Only show properties up to this size. Leave empty for no upper bound."
          },
          "min_rooms": {
            "title": "Min rooms",
            "minimum": 0,
            "type": "integer",
            "description": "Only show properties with at least this many rooms. Leave empty to include all."
          },
          "min_bathrooms": {
            "title": "Min bathrooms",
            "minimum": 0,
            "type": "integer",
            "description": "Only show properties with at least this many bathrooms. Leave empty to include all."
          },
          "x_d_token": {
            "title": "Imperva token (x-d-token) override",
            "type": "string",
            "description": "The actor ships with a captured Imperva token. If runs start returning 403 (Imperva \"Pardon Our Interruption\"), capture a fresh x-d-token with mitmproxy on the Android app and paste it here.\n\nThis is the most likely thing to break — the token may not validate from a datacenter IP even through the residential proxy."
          },
          "device_token": {
            "title": "Device token (FCM) override",
            "type": "string",
            "description": "Firebase device token captured from the app. The shipped default works indefinitely for a fixed device; only set this if you need to rotate it."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}