{
  "openapi": "3.0.1",
  "info": {
    "title": "Flatinfo.ru Scraper — Moscow Property Data & API",
    "description": "Flatinfo.ru scraper and real estate data API for Moscow and Moscow Oblast. Sale and rent listings: flats, rooms, houses. Price, price/m2, rooms, area, floor, metro, GPS, photos, phone. Clean JSON/CSV.",
    "version": "1.0",
    "x-build-id": "HwfWjojG4gG5EIgfb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~flatinfo-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-flatinfo-property-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/sian.agency~flatinfo-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-flatinfo-property-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/sian.agency~flatinfo-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-flatinfo-property-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": {
          "scrapeMode": {
            "title": "⚡ Scrape mode",
            "enum": [
              "overview",
              "detail"
            ],
            "type": "string",
            "description": "⚡ **OVERVIEW** — fast and cheap. Pulls every core field from Flatinfo search cards (price, rooms, area, floor, metro, address, phone, cover photo).\n\n🔍 **DETAIL** — full fields per listing from the listing page: all photos, house characteristics, deposit, utilities, GPS.\n\n**TIP:** Start with Overview. Upgrade to Detail only when you need the extra fields.",
            "default": "overview"
          },
          "dealType": {
            "title": "🤝 Deal type",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "🤝 Whether to scrape properties **for sale** or **for rent**.",
            "default": "sale"
          },
          "region": {
            "title": "🌍 Region",
            "enum": [
              "all",
              "moscow",
              "moscow_oblast"
            ],
            "type": "string",
            "description": "🌍 Market to search. **All** paginates the main listing feed. **Moscow** and **Moscow Oblast** narrow the feed the same way the site's own navigation does.",
            "default": "all"
          },
          "city": {
            "title": "🏙️ City filter",
            "type": "string",
            "description": "🏙️ Optional free-text city or settlement to keep, e.g. `Москва`, `Химки`, `Шатура`. Applied after the listing card is parsed."
          },
          "offerType": {
            "title": "🏠 Property type",
            "enum": [
              "any",
              "flat",
              "room",
              "house",
              "studio"
            ],
            "type": "string",
            "description": "🏠 Optional. Restrict to one property kind.",
            "default": "any"
          },
          "rooms": {
            "title": "🛏️ Rooms",
            "uniqueItems": true,
            "type": "array",
            "description": "🛏️ Optional. Room counts to keep — add one or more (1–6). Use **6** for 6+ rooms. Example: `[\"1\", \"2\"]` returns 1- and 2-room listings.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6"
              ],
              "enumTitles": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6+"
              ]
            }
          },
          "searchUrls": {
            "title": "🔗 Search URLs",
            "type": "array",
            "description": "🔗 Optional Flatinfo search-results URLs (`/prodaja.asp` or `/arenda.asp`). Filters baked into the URL are preserved. When set, these override the region/deal builders.\n\n**BULK EDIT:** Click \"Bulk edit\" to paste many URLs, one per line.",
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "🆔 Listing URLs",
            "type": "array",
            "description": "🆔 **Detail mode only.** Specific Flatinfo listing URLs (`/prodaja_kvartir.asp?id=` or `/arenda_kvartir.asp?id=`) to fetch as full property pages.\n\n**BULK EDIT:** Click \"Bulk edit\" to paste many URLs, one per line.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "🔢 Max results",
            "minimum": 1,
            "type": "integer",
            "description": "🔢 Maximum listings to extract this run.\n\n- **FREE tier:** capped at 25 listings per run.\n- **PAID tier:** unlimited — set as high as you need.",
            "default": 50
          },
          "minPrice": {
            "title": "💸 Min price (₽)",
            "minimum": 0,
            "type": "integer",
            "description": "💸 Optional. Minimum price filter in roubles."
          },
          "maxPrice": {
            "title": "💰 Max price (₽)",
            "minimum": 0,
            "type": "integer",
            "description": "💰 Optional. Maximum price filter in roubles."
          },
          "minArea": {
            "title": "📐 Min area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "📐 Optional. Minimum total area in square metres."
          },
          "maxArea": {
            "title": "📐 Max area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "📐 Optional. Maximum total area in square metres."
          },
          "newBuild": {
            "title": "🏗️ New builds only",
            "type": "boolean",
            "description": "🏗️ Restrict to new-build (новостройки) offers when the listing feed supports 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}