{
  "openapi": "3.0.1",
  "info": {
    "title": "Hemnet Slutpriser Pro — Swedish Sold Prices & Market Analytics",
    "description": "Swedish sold prices (slutpriser) plus the analytics layer Hemnet does not publish: area x month median/p25/p75 kr/m2, sale-to-asking ratio, days on market, comparables, mäklare league tables and BRF org numbers.",
    "version": "0.1",
    "x-build-id": "bd5mk8gPUn2lb8hGe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vhsgreed~hemnet-slutpriser/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vhsgreed-hemnet-slutpriser",
        "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/vhsgreed~hemnet-slutpriser/runs": {
      "post": {
        "operationId": "runs-sync-vhsgreed-hemnet-slutpriser",
        "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/vhsgreed~hemnet-slutpriser/run-sync": {
      "post": {
        "operationId": "run-sync-vhsgreed-hemnet-slutpriser",
        "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",
        "required": [
          "locationIds"
        ],
        "properties": {
          "locationIds": {
            "title": "Location ids (Hemnet numeric ids)",
            "uniqueItems": true,
            "type": "array",
            "description": "Numeric Hemnet location ids — one entry per search slice. Use numeric ids (e.g. 18028 = Solna kommun); municipality slugs like 'stockholms-kommun' also work, but stadsdel/sub-area slices MUST be numeric ids because slug paths 404 on /salda. Because an anonymous sold search caps at ~2,500 results per query, a large region must be split into municipalities or districts and passed as separate entries.",
            "items": {
              "type": "string"
            }
          },
          "maxRecords": {
            "title": "Max records",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on property records delivered across the whole run. 0 = no cap. Each delivered property record is charged one 'sold-property' event.",
            "default": 5000
          },
          "pagesPerLocation": {
            "title": "Pages per location",
            "minimum": 0,
            "type": "integer",
            "description": "Sold search pages to fetch per location id (50 records per page). 0 = walk to the ~2,500-per-query ceiling. Keep small for a fast, cheap run.",
            "default": 0
          },
          "includeListings": {
            "title": "Include active listings (till salu)",
            "type": "boolean",
            "description": "Also return active/upcoming listings (no final price). Off by default: the flagship dataset is sold prices (slutpriser). Turning it on doubles the requests and enables days-on-market matching for objects that later appear as sold.",
            "default": false
          },
          "enrichBrfFinancials": {
            "title": "Enrich BRF financials (Bolagsverket, best-effort)",
            "type": "boolean",
            "description": "BEST-EFFORT and usually returns null: attempts to look up each bostadsrattsforening's annual report in Bolagsverket's public bulk archive by organisationsnummer. In testing, 0 of 6 real BRF numbers had a digitally filed report there (the digital-filing duty covers aktiebolag, not bostadsrattsforeningar), so treat this as an optional probe rather than a dependable enrichment. OFF by default; fails soft per BRF.",
            "default": false
          },
          "housingFormGroups": {
            "title": "Housing form",
            "type": "string",
            "description": "Property type filter. Allowed values: ALL (default), APARTMENTS (lägenhet), VILLAS, HOUSES, ROW_HOUSES (radhus), COTTAGES (fritidshus), PLOTS, OTHER. Anything else is treated as ALL.",
            "default": "ALL"
          },
          "sort": {
            "title": "Sort",
            "type": "string",
            "description": "Result ordering. Allowed values: NEWEST (default), OLDEST, PRICE_DESC, PRICE_ASC, SQ_METER_PRICE_DESC, SQ_METER_PRICE_ASC.",
            "default": "NEWEST"
          },
          "askingPriceMin": {
            "title": "Utgångspris min (SEK)",
            "type": "integer",
            "description": "Lower bound on asking price, SEK. Leave empty for no bound.",
            "default": null
          },
          "askingPriceMax": {
            "title": "Utgångspris max (SEK)",
            "type": "integer",
            "description": "Upper bound on asking price, SEK. Leave empty for no bound.",
            "default": null
          },
          "roomsMin": {
            "title": "Rooms (rum) min",
            "type": "integer",
            "description": "Minimum rooms (Hemnet counts kitchen/living room). Leave empty for no bound.",
            "default": null
          },
          "roomsMax": {
            "title": "Rooms (rum) max",
            "type": "integer",
            "description": "Maximum rooms (Hemnet counts kitchen/living room). Leave empty for no bound.",
            "default": null
          },
          "onlyNewSince": {
            "title": "Only new since (incremental mode)",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD). In incremental/monitor mode, keep only sold records with sold_at on or after this date; change events are computed against the run watermark regardless. Leave empty for a full pull. DO NOT set this in the prefilled/default run — a narrow window can yield an empty dataset.",
            "default": null
          },
          "comparablesCount": {
            "title": "Comparables per record",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many similar sold comparables to attach per sold record (matched by area/size/rooms, with a price/m² percentile).",
            "default": 8
          },
          "emitAggregates": {
            "title": "Emit area aggregates & derived fields",
            "type": "boolean",
            "description": "Emit area x month aggregates (median/p25/p75 price per m², sale-to-asking ratio, days on market) and per-record derived ratios.",
            "default": true
          },
          "computeComparables": {
            "title": "Compute comparables & percentiles",
            "type": "boolean",
            "description": "Attach a comparables array and price-per-m² percentile to each sold record.",
            "default": true
          },
          "emitLeagueTables": {
            "title": "Emit mäklare league tables & BRF fee history",
            "type": "boolean",
            "description": "Emit per-area broker/agency league rows (volume, median sale-to-asking, median days on market) and BRF fee history reconstructed from our own sales.",
            "default": true
          },
          "fetchDetailPages": {
            "title": "Fetch sold detail pages",
            "type": "boolean",
            "description": "Follow each sold card's detail page to add boarea, avgift, byggår, exact kr/m², tenure and the BRF organisationsnummer (the tier-3 join key). Costs one extra request per record; keep on to expose brf_org_number.",
            "default": true
          },
          "includeBrokerContact": {
            "title": "Include mäklare contact (name/email/phone)",
            "type": "boolean",
            "description": "Off by default to minimise personal-data footprint (GDPR): these are professional contact details, but the default ships without them.",
            "default": false
          },
          "includeImages": {
            "title": "Include image URLs",
            "type": "boolean",
            "description": "Off by default. Image URLs (bilder.hemnet.se) are omitted unless requested.",
            "default": false
          },
          "brfMaxArchives": {
            "title": "BRF: max archives to scan",
            "minimum": 1,
            "type": "integer",
            "description": "When enrichBrfFinancials is on, how many weekly archives (newest first) to scan per BRF before giving up. Keeps the optional join bounded.",
            "default": 12
          },
          "brfMaxOrgs": {
            "title": "BRF: max org numbers to resolve",
            "minimum": 1,
            "type": "integer",
            "description": "When enrichBrfFinancials is on, cap how many distinct BRF organisationsnummer are resolved per run.",
            "default": 10
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Politeness delay between requests. Keep >= 300 ms.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Hemnet sits behind Cloudflare Bot Management; the actor sends a full browser client-hint header set and escalates to a Chrome-TLS client when challenged. Swedish residential proxies are the most reliable for sustained high-volume runs; direct often works for small runs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}