DOKUMENTASJON · UTVALG
Hele svaret eller et utvalg
Adresser, selskaper, regioner og svenske punkter svarer med seksjoner, og du velger selv hvor mange. Samme tre parametere virker i alle: sections, package og meta.
Innhold
Kort fortalt
- Et utvalg henter færre kilder og svarer raskere. Det koster likevel det samme ene oppslaget per objekt per dag som en full profil.
- Seksjoner nøkkelen ikke får lese, eller som ikke kan leveres akkurat nå, kommer med en status (restricted, unavailable). De utelates ikke.
- Det finnes ikke utvalg på feltnivå. Du velger seksjoner, ikke enkeltfelt.
Tre måter å spørre på
| Du vil ha | Send | Du får |
|---|---|---|
| Bestemte seksjoner | sections=a,b | Nøyaktig disse, i den rekkefølgen du oppgir. Ukjent seksjon gir 400 unknown_section, gjentatt gir 400 repeated_section. Adresser godtar include= som alias, men aldri begge samtidig. |
| Et ferdig sett | package=<id> | En pakke fra /catalog. En pakke er en forhåndsvisning av seksjoner, ikke en tilgang: nøkkelens tillatelser gjelder etter at pakken er utvidet. Kan ikke kombineres med sections (400 package_cannot_be_combined_with_include_or_section). |
| Alt | package=all | Hver seksjon nøkkelen kan lese. Det er mye data; bruk det når du trenger hele profilen. |
Standarden: core
Sender du verken sections eller package, får du familiens standardpakke, core, og en X-Sections-Hint-header som sier hvilken pakke som gjaldt og hvordan du velger annerledes. Vil du ha alle seksjonene, send package=all.
Regioner (0.4.0) og Sverige (1.1.0) svarte tidligere med alle seksjoner uten valg. Det gamle svaret får du med package=all. Se endringsloggen.
meta
meta=compact beholder det som identifiserer kontrakten hver seksjon ble levert under, og utelater den gjentatte feltbeskrivelsen (den står i /catalog). meta=full gjentar hele kildebeskrivelsen i hver seksjon. Adresser svarer compact når du ikke velger; regioner og Sverige svarer full.
Hva det koster
Én profil teller som ett oppslag per objekt (adresse, selskap, region eller punkt) per døgn, uansett om du ber om hele profilen eller to seksjoner. Gjentatte kall for samme objekt samme døgn teller ikke på nytt. Et utvalg sparer tid og båndbredde, ikke kvote.
Det som ikke kan leveres
Hver seksjon har sin egen status: available, not_found, restricted eller unavailable. En seksjon du ikke har tilgang til kommer som restricted med error section_not_granted, og en kilde som feiler kommer som unavailable. partial og failed_sections i svaret peker ut hvilke du bør prøve på nytt. Ingenting forsvinner stille fra svaret.
For GET /api/v1/addresses/{id} kan fields=address_details.address_type velge felt i postene. Oppgi flere som kommaseparerte seksjon.felt-par fra /catalog. Dette gjelder seksjonenes poster, ikke adresseobjektet øverst i svaret. Seksjoner du ikke navngir i fields beholder feltene sine; bruk sections for å begrense hvilke seksjoner du ber om. Datatilgangen og nøkkelens feltbegrensninger gjelder fortsatt — fields gir ingen nye rettigheter.
På samme adresserute gir format=summary status, freshness og record_count per seksjon uten poster. Det kan ikke kombineres med fields. Ingen av valgene endrer oppslagstellingen. Se det aktuelle API-ets OpenAPI før du bruker disse valgene i andre API-familier.
Eksempler per API
Nøkkelen leses fra miljøvariabelen APPROACH_API_KEY. MCP-kallet er argumentene til verktøyet i MCP-serveren.
Adresser (referanse)
curl -H "X-API-Key: $APPROACH_API_KEY" "https://api.approach.no/api/v1/addresses/285717643?sections=address_details,buildings"
curl -H "X-API-Key: $APPROACH_API_KEY" "https://api.approach.no/api/v1/addresses/285717643?package=fire"
curl -H "X-API-Key: $APPROACH_API_KEY" "https://api.approach.no/api/v1/addresses/285717643?package=all"
{"name":"datakilde_address","arguments":{"address_id":"285717643","sections":["address_details","buildings"]}}Selskaper (referanse)
curl -H "X-API-Key: $APPROACH_API_KEY" "https://api.approach.no/api/v1/companies/923609016?sections=identity,distress"
curl -H "X-API-Key: $APPROACH_API_KEY" "https://api.approach.no/api/v1/companies/923609016?package=identity"
curl -H "X-API-Key: $APPROACH_API_KEY" "https://api.approach.no/api/v1/companies/923609016?package=all"
{"name":"datakilde_company","arguments":{"org_number":"923609016","sections":["identity","distress"]}}Regioner (referanse)
curl -H "X-API-Key: $APPROACH_API_KEY" "https://api.approach.no/api/v1/regions/0301?sections=identity,employment"
curl -H "X-API-Key: $APPROACH_API_KEY" "https://api.approach.no/api/v1/regions/0301?package=labour_market"
curl -H "X-API-Key: $APPROACH_API_KEY" "https://api.approach.no/api/v1/regions/0301?package=all"
{"name":"datakilde_region","arguments":{"id":"0301","sections":["identity","employment"]}}Sverige (referanse)
curl -H "X-API-Key: $APPROACH_API_KEY" "https://api.approach.no/api/v1/sweden/locations/locations/58.94,11.17?sections=river_flood,coastal_flood"
curl -H "X-API-Key: $APPROACH_API_KEY" "https://api.approach.no/api/v1/sweden/locations/locations/58.94,11.17?package=flood"
curl -H "X-API-Key: $APPROACH_API_KEY" "https://api.approach.no/api/v1/sweden/locations/locations/58.94,11.17?package=all"
{"name":"datakilde_sweden_location","arguments":{"id":"58.94,11.17","sections":["river_flood","coastal_flood"]}}Pakker per API
Tabellene er hentet fra hvert API sin /catalog og kan ikke gå ut av takt med den. Standardpakken er merket.
Adresser
| package | Seksjoner |
|---|---|
| fire | nearby_fire_stations, fire_statistics, fire_and_rescue, fire_hydrants, fire_risk, wildfire_exposure Fire-service context, mapped hydrants, area statistics and labelled screening models. Not certified property risk, guaranteed response time or insurance advice. Section rights and source availability remain independent. |
| safety | nearby_security_offices, hazard_zones, hazard_warnings, nearby_fire_stations, nearby_police_stations, emergency_health_services, public_shelters Mapped hazards, warnings, known emergency-service premises and listed security-company offices (not verified dispatch bases). A package selects data; it grants no additional access and does not establish that a property is safe. |
| construction | address_details, buildings, building_source_status, plot, site_coverage, terrain, zoning_plan, planning, building_applications, road_building_limits Registered building and parcel context, terrain, plan references and building-case metadata. Coverage and access vary by section. Not a building permit, engineering clearance or complete document archive; packages grant no additional rights. |
| legal | zoning_plan, planning, road_building_limits, heritage_protection_zones, shore_zone, protected_nature_areas Mapped planning and protection context with source references where available. Plan titles and provisions/register links are lookup evidence, not verified legal applicability or legal advice. Document text and excerpts require separately admitted source projections; a package grants no additional access. |
| core (standard) | address_details, buildings, dwelling_units, building_source_status, hazard_zones, zoning_plan The small default-sized profile: identity, buildings and dwelling units with their source status, mapped hazard zones and the zoning plan. Fast and cheap to read; pick further packages or include ids for more. A package does not establish source completeness or grant rights. |
| home_profile | address_details, buildings, dwelling_units, building_source_status Address identity and cached housing facts. Building coverage and recipient permission must be checked; a package does not establish source completeness or grant rights. |
| prevention_context | weather, weather_forecast, nearby_fire_stations, nearby_police_stations, crime, fire_missions_postal_code, fire_and_rescue, fire_statistics, hazard_warnings, insurance_claims Observations, forecasts, active hazard warnings, fire-service callout statistics, known emergency-service premises and municipal crime context. Car travel is not response time; area statistics are not a household risk score. |
| area_context | population, income, nearest_traffic_sensors, commuting, migration, municipal_water_network, household_energy_baseline, construction_cost_index Optional municipal statistics and nearby traffic sensors. This is area context, not household characteristics or a live congestion service. |
| hazard_screen | hazard_exposure, fire_and_burglary_indicators, fire_risk, climate, rivers, hazard_zones, landslide_hazard_zones_detailed, landslide_hazard_zones_100, landslide_hazard_zones_5000, snow_avalanche_susceptibility, rockslide_tsunami_zones, storm_surge_zones_current, storm_surge_zones_2100, landslide_events, flood_protection_works, dams, radon, marine_clay_possibility, ground_integrity, lightning_activity, hazard_warnings Mapped natural-hazard zones, events and screening scores around the address. Mapped means prioritised areas only; an empty section is unmapped, not safe, and nothing here replaces a site assessment. |
| environment_nuisance | noise_model, road_noise_zones, traffic_exposure, rail_noise_zones, airport_noise_zones, shooting_ranges, power_lines, transformer_stations, planned_power_lines, contaminated_sites, wells, vessel_traffic, shipping_lanes Noise, grid and pollution context from strategic mapping and registers; zone membership and proximity, not measurements at the façade. |
| neighbourhood_life | service_distances, local_amenities, public_services, health_services, schools, kindergartens, education_institutions, churches, places_of_worship, community_organisations, leisure_facilities, micromobility_stations, rail_stations, public_transport, walk_score, vinmonopolet_stores Everyday destinations by straight-line distance from open registers and OpenStreetMap; presence and position are as published, and OSM content is ODbL. |
| outdoor_recreation | hiking_trails, ski_trails, cycling_trails, snowmobile_trails, recreation_areas, state_secured_recreation_areas, protected_nature_areas, marka_boundary, shore_zone, sea_speed_limits, sun_hours, viewshed Trails, recreation areas, nature protection and modelled sun and view around the address. |
| planning_restrictions | zoning_plan, zoning_plan_features, building_applications, sefrak_buildings, heritage_sites, heritage_monuments, heritage_protection_zones, cultural_environments, reindeer_husbandry_districts, road_building_limits, change_signals, planned_grid_investments, grid_concession_area, grid_company, power_price_zone, power_line_no_build_zone Plans, heritage protection, servitude-like constraints and change signals around the address. Constraints are indications to verify with the authority, never a legal opinion. |
| civil_protection | nearby_fire_stations, nearby_police_stations, emergency_health_services, defibrillators, fire_hydrants, public_shelters, emergency_dispatch_centres, emergency_dispatch_districts, civil_defence_districts, emergency_harbours, fire_statistics Emergency-service premises, shelters and dispatch geography. Straight-line proximity is not response time. |
| local_economy | companies_near_address, business_neighbourhood, household_profile, companies_in_postal_code, bankruptcies_in_postal_code, housing_cooperative_accounts, income, employment, election_results Registered companies at the address, on the same property and within 500 metres, plus aggregate business, insolvency and civic context for the wider area; nothing about an occupant. Sole traders are counted, never named. |
| fire_and_damage | fire_risk, fire_and_burglary_indicators, fire_response_time, wildfire_exposure, hazard_exposure, water_risk, storm_surge_freeboard, fire_statistics, fire_missions_postal_code, fire_and_rescue, fire_service_coverage, nearby_fire_stations, fire_hydrants, emergency_dispatch_districts, insurance_claims, hazard_zones, flood_awareness_areas, quick_clay_awareness_areas, lightning_activity, hazard_warnings, radon For insurers, banks and risk teams: how exposed the building is to fire, water and natural damage. The modelled building-fire rate, estimated fire-service arrival time, wildfire and surface-water exposure, insured damage claims in the area and mapped hazard zones. Area statistics and models are not a household risk score. |
| noise_and_nearby_projects | noise_model, noise_levels, traffic_exposure, nuisance_index, road_noise_zones, rail_noise_zones, airport_noise_zones, military_airfield_noise_zones, military_range_noise_zones, shooting_ranges, building_cases_nearby, nearby_building_permits, nearby_zoning_plans, planning_initiation, road_projects_nearby, road_project_areas, planned_power_lines, change_signals For estate agents and buyers: what can be heard at the address and what is about to be built around it. Modelled noise and noise zones, building cases and permits, zoning plans and notified planning starts, road projects and planned power lines. Building cases cover only the municipalities whose case records are published. |
| plot_and_zoning | plot, site_coverage, zoning_plan, zoning_plan_features, planning, building_applications, case_journal, heritage_sites, heritage_monuments, heritage_protection_zones, cultural_environments, sefrak_buildings, road_building_limits, power_line_no_build_zone, shore_zone, marka_boundary, ground_conditions, bedrock, marine_clay_possibility, terrain, building_cost_benchmark, build_time For developers, architects and planners: what may be built here and what it is likely to cost and take. The plot, zoning plan and its rules, building applications, heritage and other constraints, ground conditions and terrain, plus a cost benchmark and build-time model. Constraints are indications to verify with the authority, never a legal opinion. |
| traffic_and_sensors | nearest_traffic_sensors, traffic, traffic_hourly_history, traffic_sensor_links, traffic_volume, road_accidents, traffic_accidents, roads, road_infrastructure, toll_stations_nearby, public_transport, transit_stops, rail_stations, ferry_connections, micromobility_stations, commute_time, ev_charging, weather, vessel_traffic For logistics, mobility and municipal teams: how much traffic there is, what is measured nearby and how to get there. Counting points and hourly traffic, accidents, roads and tolls, public transport and travel time, charging, vessel traffic and the nearest weather station. Sensors are the published public stations, not a live feed from the address. |
| energy_and_power | grid_company, grid_concession_area, grid_tariffs, power_price_zone, power_lines, power_line_field, transformer_stations, planned_power_lines, planned_grid_investments, district_heating_area, household_energy_baseline, electricity_consumption, energy_certificate, energy_label_estimate, heat_pump_feasibility, local_solar_adoption, ev_charging, registered_electricians For energy companies, installers and property owners: which grid, price and energy options apply at the address. Grid company, tariff and price zone, nearby lines and planned investments, district heating, the energy certificate or estimated label, and heat-pump feasibility. |
| home_and_value | address_details, buildings, dwelling_units, building_status, building_source_status, plot, energy_certificate, market_value_estimate, asking_rent_estimate, dwelling_valuation, housing_statistics, municipal_fees, housing_cooperative_accounts For banks, agents and valuers: what the home is and what it is likely worth. Buildings and dwelling units, the plot, energy certificate, value and rent estimates, area housing statistics, municipal fees and housing-cooperative accounts. Most value sections need an agreement; an estimate is never a valuation. |
| models | dwelling_valuation, ground_subsidence, heat_pump_feasibility, snow_load, energy_label_estimate, build_time, market_value_estimate, asking_rent_estimate The estimates Datakilde fits to observations itself: statistical and machine-learning models, such as the likely energy label, the building-fire rate, settlement under the building, snow load and depth to bedrock, plus calibrated noise. Each record carries method, method_version, inputs and validation; an estimate is never the official figure it approximates. Physics, geometry and indices are in the calculations package. Same grants and lookup count as any section. |
| calculations | fire_and_burglary_indicators, terrain, site_coverage, walk_score, ground_integrity, hazard_exposure, viewshed, traffic_exposure, building_height, power_line_field, fire_response_time, nuisance_index, commute_time, storm_surge_freeboard, solar_potential, building_cost_benchmark What Datakilde computes from documented formulas rather than fits: physics, geometry and indices, such as storm-surge freeboard, solar potential, building height, fire-service response time, the hazard and nuisance indices and walkability. Not machine learning, and an index is not a probability. Each record carries method and inputs; experimental sections are left out until they answer. Same grants and lookup count as any section. |
Selskaper
| package | Seksjoner |
|---|---|
| core (standard) | identity, distress The small default: what the company is and whether it is alive (identity and distress; in the profile the groups identity, registration_status and industry_and_size, read from those two sections alone, so without registration_status's changes, aquaculture and electrical lists). What a call with neither sections nor package returns, with X-Sections-Hint. package=all returns everything. A package does not grant access. |
| identity | identity The sections behind the identity group of the profile (GET /:id/profile?package=identity). A package does not grant access. |
| registration_status | identity, distress, history, aquaculture, electrician_registration The sections behind the registration_status group of the profile (GET /:id/profile?package=registration_status). A package does not grant access. |
| industry_and_size | identity The sections behind the industry_and_size group of the profile (GET /:id/profile?package=industry_and_size). A package does not grant access. |
| addresses_and_locations | identity, locations The sections behind the addresses_and_locations group of the profile (GET /:id/profile?package=addresses_and_locations). A package does not grant access. |
| roles_summary | roles The sections behind the roles_summary group of the profile (GET /:id/profile?package=roles_summary). A package does not grant access. |
| ownership | ownership The sections behind the ownership group of the profile (GET /:id/profile?package=ownership). A package does not grant access. |
| financials | accounts The sections behind the financials group of the profile (GET /:id/profile?package=financials). A package does not grant access. |
| distress | distress, default_events The sections behind the distress group of the profile (GET /:id/profile?package=distress). A package does not grant access. |
| events | events The sections behind the events group of the profile (GET /:id/profile?package=events). A package does not grant access. |
| procurement | tenders_issued, tenders_won The sections behind the procurement group of the profile (GET /:id/profile?package=procurement). A package does not grant access. |
| news | news, industry_news The sections behind the news group of the profile (GET /:id/profile?package=news). A package does not grant access. |
| related_entities | identity, rd_projects The sections behind the related_entities group of the profile (GET /:id/profile?package=related_entities). A package does not grant access. |
| all | identity, accounts, ownership, group_structure, roles, distress, aquaculture, electrician_registration, central_approval, financial_supervision, events, default_events, tenders_issued, tenders_won, history, locations, rd_projects, public_procurement, hiring, news, industry_news, financial_signals Every section, or in the profile every group. Not the default: that is core. |
Regioner
| package | Seksjoner |
|---|---|
| core (standard) | identity, employment, population, income The default: which region this code is and was, people working and living here, the age profile and household income. Cheap to read; ask for more with sections or another package, or package=all for every section. |
| labour_market | identity, employment, industry, vacancies Jobs: workplace against residence, which industries employ people, and what employers advertise now. Kommune only for industry and vacancies. |
| hazard_exposure | identity, storm_surge_municipal_exposure Buildings, roads and land below storm-surge levels today and with sea-level rise. Kommune only. |
Sverige
| package | Seksjoner |
|---|---|
| core (standard) | river_flood, coastal_flood, cloudburst_mapping, weather_warnings, protected_nature The default: flood mapping at the point (river, coast, cloudburst), SMHI warnings in force and protected nature. Ask for more with sections or another package, or package=all for every section. |
| flood | river_flood, coastal_flood, cloudburst_mapping MCF flood mapping at the point: rivers and lakes, raised sea levels and municipal cloudburst mapping. |
| area_context | municipal_indicators, police_events, weather, wells Kolada municipal figures, Polisen events, nearest SMHI observations and SGU wells within 500 m. |