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=home_profile"
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 |
|---|---|
| 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, 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 | 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. |
| models | dwelling_valuation, noise_model, fire_risk, ground_subsidence, heat_pump_feasibility, snow_load, energy_label_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, 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 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, events, default_events, tenders_issued, tenders_won, history, locations, rd_projects, 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. |