{
  "openapi": "3.0.1",
  "info": {
    "title": "Asunnot Oikotie.fi Real Estate Scraper",
    "description": "Scrape Finnish property listings from asunnot.oikotie.fi by location, filters, or search/listing URLs. Optionally enrich each result with full listing details.",
    "version": "1.0",
    "x-build-id": "tjW1aBhOWWY0eLPgi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rigelbytes~asunnot-oikotie-fi/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rigelbytes-asunnot-oikotie-fi",
        "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/rigelbytes~asunnot-oikotie-fi/runs": {
      "post": {
        "operationId": "runs-sync-rigelbytes-asunnot-oikotie-fi",
        "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/rigelbytes~asunnot-oikotie-fi/run-sync": {
      "post": {
        "operationId": "run-sync-rigelbytes-asunnot-oikotie-fi",
        "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": {
          "startUrls": {
            "title": "Start URLs (priority)",
            "type": "array",
            "description": "Paste Oikotie search result URLs (e.g. https://asunnot.oikotie.fi/myytavat-asunnot?cardType=100&locations[]=helsinki) or listing URLs (e.g. https://asunnot.oikotie.fi/myytavat-asunnot/helsinki/24600052). When provided, these take priority over Search Locations. Query filters on search URLs are preserved.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQueries": {
            "title": "Search Locations",
            "type": "array",
            "description": "Cities, districts, or postal codes (e.g. Helsinki, Tampere, 00100). Ignored when Start URLs are provided. Leave empty with no Start URLs to search nationwide using the filters below.",
            "items": {
              "type": "string"
            }
          },
          "listingType": {
            "title": "Listing Type",
            "enum": [
              "FOR_SALE",
              "FOR_RENT",
              "HOLIDAY_FOR_SALE",
              "HOLIDAY_FOR_RENT",
              "PLOTS",
              "COMMERCIAL_FOR_SALE",
              "COMMERCIAL_FOR_RENT",
              "FARMS",
              "GARAGES",
              "NEW_DEVELOPMENT"
            ],
            "type": "string",
            "description": "Main listing category on Oikotie Asunnot.",
            "default": "FOR_SALE"
          },
          "buildingTypes": {
            "title": "Building Types",
            "uniqueItems": true,
            "type": "array",
            "description": "Leave empty for all building types. Applies mainly to residential for-sale/rent searches.",
            "items": {
              "type": "string",
              "enum": [
                "APARTMENT",
                "ROW_HOUSE",
                "DETACHED_HOUSE",
                "HOLIDAY_HOME",
                "SEMI_DETACHED_SEPARATE",
                "SEMI_DETACHED",
                "OTHER",
                "WALK_UP",
                "WOODEN_APARTMENT"
              ],
              "enumTitles": [
                "Apartment building (Kerrostalo)",
                "Row house (Rivitalo)",
                "Detached house (Omakotitalo)",
                "Holiday home",
                "Separate house (Erillistalo)",
                "Semi-detached (Paritalo)",
                "Other",
                "Walk-up apartment (Luhtitalo)",
                "Wooden apartment share (Puutalo-osake)"
              ]
            }
          },
          "roomCounts": {
            "title": "Room Counts",
            "uniqueItems": true,
            "type": "array",
            "description": "Leave empty for any room count. Use 5 for five or more rooms.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "1 room",
                "2 rooms",
                "3 rooms",
                "4 rooms",
                "5+ rooms"
              ]
            }
          },
          "priceMin": {
            "title": "Minimum Price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in euros (sale price or rent depending on listing type)."
          },
          "priceMax": {
            "title": "Maximum Price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in euros."
          },
          "sizeMin": {
            "title": "Minimum Living Area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum living area in square meters."
          },
          "sizeMax": {
            "title": "Maximum Living Area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum living area in square meters."
          },
          "yearMin": {
            "title": "Minimum Construction Year",
            "minimum": 1800,
            "type": "integer",
            "description": "Minimum construction year."
          },
          "yearMax": {
            "title": "Maximum Construction Year",
            "minimum": 1800,
            "type": "integer",
            "description": "Maximum construction year."
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "publishedDesc",
              "publishedAsc",
              "priceAsc",
              "priceDesc",
              "sizeAsc",
              "sizeDesc"
            ],
            "type": "string",
            "description": "Sort order for search results.",
            "default": "publishedDesc"
          },
          "extractDetails": {
            "title": "Extract Listing Details",
            "type": "boolean",
            "description": "When enabled, fetches the full listing for each result (long description, energy class, heating, contact emails/phones, image gallery, etc.) and charges the separate listing-details event.",
            "default": false
          },
          "detailConcurrency": {
            "title": "Detail Request Concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum parallel detail requests when Extract Listing Details is enabled.",
            "default": 5
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of listings to scrape (0 = unlimited).",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Residential proxy is recommended for reliable runs on Apify Cloud.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}