{"source":"husbanken","operation":"get_statistics","description":"Get published startl\u00e5n, bost\u00f8tte or housing-grant figures by municipality or year. Signature: get_statistics(statistic: one of: startlan, bostotte, housing_grants, required; group_by: one of: municipality, year, optional, default 'municipality'; year: integer, calendar year, optional, default None; municipality_number: string, optional, default None; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","signature":"get_statistics(statistic: one of: startlan, bostotte, housing_grants, required; group_by: one of: municipality, year, optional, default 'municipality'; year: integer, calendar year, optional, default None; municipality_number: string, optional, default None; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0)","parameters":[{"name":"statistic","type":"string","schema":{"enum":["startlan","bostotte","housing_grants"],"type":"string"},"required":true,"default":null,"description":"startlan, bostotte or housing_grants; see list_statistics.","unit":null},{"name":"group_by","type":"string","schema":{"enum":["municipality","year"],"type":"string"},"required":false,"default":"municipality","description":"municipality for comparisons, year for historical series.","unit":null},{"name":"year","type":"integer","schema":{"anyOf":[{"maximum":2100,"minimum":2008,"type":"integer"},{"type":"null"}]},"required":false,"default":null,"description":"Optional year filter. Without it the publisher aggregates all available years. Unit: calendar year.","unit":"calendar year"},{"name":"municipality_number","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Optional four-digit municipality code, e.g. 5001 for Trondheim. Historical codes and Oslo boroughs follow the publisher's geography.","unit":null},{"name":"limit","type":"integer","schema":{"maximum":100,"minimum":1,"type":"integer","default":25},"required":false,"default":25,"description":"Rows per page, 1\u2013100. Unit: items. Through this API: default 25, maximum 100.","unit":"items"},{"name":"offset","type":"integer","schema":{"minimum":0,"type":"integer"},"required":false,"default":0,"description":"Rows to skip. Unit: items.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/husbanken/get_statistics?statistic={statistic}&group_by=municipality&year={year}&municipality_number={municipality_number}&limit=25&offset=0","example_url":"https://allemannsdata.com/wiki/api/v1/kilder/husbanken/get_statistics?statistic=bostotte&year=2024&municipality_number=5001","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"statistic":{"type":["string","null"]},"group_by":{"type":["string","null"]},"year":{"type":["integer","null"]},"municipality_number":{"type":["string","null"]},"count":{"type":"integer"},"returned":{"type":"integer"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"kind":{"type":["string","null"]}},"additionalProperties":false}},"rows":{"type":"array","items":{"type":"object","properties":{"cells":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"value":{"type":["number","null"]}},"additionalProperties":false}}},"additionalProperties":false}},"source_url":{"type":["string","null"]},"note":{"type":["string","null"]}},"additionalProperties":false},"response_schema_status":{"status":"declared","codegen_safe":true,"description":"Maintained response contract."},"entity_projection":{"status":"intentionally_none","entity_types":[],"description":"No stable cross-source entity projection is defined for this operation; entities is intentionally empty."},"error_contract":{"scope":"top-level HTTP error response; never part of a success payload","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object"}},"additionalProperties":false,"required":["code","message","retryable"]},"suggestion":{"type":"string"},"_meta":{"type":"object","properties":{"retrieved_at":{"type":"string","format":"date-time"},"language":{"type":"string","const":"en"},"content_languages":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object"}}},"required":["retrieved_at","language","content_languages","sources"]},"_links":{"type":"object","properties":{"self":{"type":"string","format":"uri"},"api_index":{"type":"string","format":"uri"},"feedback":{"type":"string","format":"uri"}},"required":["self","api_index","feedback"],"additionalProperties":false}},"additionalProperties":false,"required":["error","suggestion","_meta","_links"]},"statuses":{"400":{"codes":["MISSING_PARAMETER","INVALID_PARAMETER","INVALID_REQUEST"],"retryable":false},"404":{"codes":["SOURCE_NOT_FOUND","OPERATION_NOT_FOUND","ENTITY_NOT_FOUND","ENDPOINT_NOT_FOUND"],"retryable":false},"405":{"codes":["METHOD_NOT_ALLOWED"],"retryable":false},"429":{"codes":["RATE_LIMITED","GATEWAY_RATE_LIMITED"],"retryable":true},"503":{"codes":["SOURCE_UNAVAILABLE"],"retryable":true},"500":{"codes":["INTERNAL_ERROR"],"retryable":false}}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/husbanken/get_statistics/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/husbanken/get_statistics","source":"https://allemannsdata.com/wiki/api/v1/kilder/husbanken","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["statistic","group_by","year","municipality_number","count","returned","columns","columns[].name","columns[].kind","rows","rows[].cells","rows[].cells[].text","rows[].cells[].value","source_url","note"],"output_fields_truncated":false,"canonical_field_aliases":{"name":["columns[].name"]},"response_example":{"source":"husbanken","operation":"get_statistics","parameters":{"statistic":"bostotte","year":2024,"municipality_number":"5001","limit":25,"offset":0},"data":{"statistic":"example value","group_by":"example value","year":1,"municipality_number":"example value","count":1,"returned":1,"columns":[{"name":"Example","kind":"example value"}],"rows":[{"cells":[{"text":"example value","value":1.0}]}],"source_url":"https://example.invalid/resource","note":"example value"},"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"husbanken","name":"Housing support (Husbanken)","description":"Compare startl\u00e5n, bost\u00f8tte and housing-grant indicators across municipalities or years. Returns Husbanken's published aggregate calculations and suppression through its anonymous Qlik service; this underlying interface is undocumented and may change. Money is NOK.","publisher":"Husbanken","license":"https://data.norge.no/nlod/no/1.0","cache_ttl_seconds":3600,"documentation":"https://statistikk.husbanken.no/"}]},"_provenance":{"data":{"source":"husbanken","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/husbanken"},"entities":{"source":"husbanken","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/husbanken","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/husbanken/get_statistics","source":"https://allemannsdata.com/wiki/api/v1/kilder/husbanken","wiki":"https://allemannsdata.com/wiki/kilder/husbanken/get_statistics/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
