Till innehållet
kart-api.se

Sweden's authoritative geodata, as an API

Place names, municipal boundaries, elevation, land cover, water, live public transport and ready-made map images — from the Swedish Mapping Authority, Statistics Sweden, Trafiklab and OpenStreetMap. One URL for the map, one call for the image.

curl 'https://api.kart-api.se/v1/geocode?q=Fridhem'
live response

Fridhem is a place name in 217 of Sweden's 290 municipalities. Most geocoders hand you five hits and let you believe the name is unique. We tell you in the response, counted before the limit.

990,698place names
290municipalities
301terrain archives, 1 m

Counted in our database on 2026-09-11. How we measure.

Six things you can build tonight

A static map in one call

Map of Finspång with a marker
<img src="https://api.kart-api.se/v1/render/karta
     ?lat=58.7052&lng=15.7803&zoom=13
     &w=600&h=340&marker=15.7803,58.7052">

A PNG straight into an <img>. Attribution is burned into the image, so it cannot get lost downstream.

Geocoding that refuses to guess

curl 'https://api.kart-api.se/v1/geocode?q=Lugnet'
# spridning: { kommuner: 211, entydig: false }

A name found in 211 places should not look unique. The spridning field is counted before the limit, and entydig may be null — unmeasured, never the same as true. The error contract.

The Swedish basemap in your MapLibre

new maplibregl.Map({
  container: 'map',
  style: 'https://api.kart-api.se/v1/styles/ljus.json'
})

Vector tiles, fonts and sprites included. No key, and map tiles never count against your quota. How to wire it up.

Elevation, point by point

curl 'https://api.kart-api.se/v1/hojd?lat=58.705&lon=15.77'
# { "hojd_m": 24.39, "nodata": false }

From the national 1 m elevation model. Where there is no data you get null and nodata: true — never a zero that looks like sea level.

The buses, right now

curl 'https://api.kart-api.se/v1/trafik/otraf'
# GeoJSON: position, bearing, route, headsign

Live feeds from Swedish transit operators via Trafiklab (CC0). Six counties have no open feed — the API names them instead of answering empty. Live data.

3D terrain from the 1 m model

map.addSource('terrain', { type: 'raster-dem',
  url: 'pmtiles://https://api.kart-api.se/v1/tiles/terrain-rgb-0562-1m.pmtiles',
  encoding: 'terrarium' })

One archive per municipality, built from national LiDAR. Nobody else hands you Swedish terrain this detailed for free.

What makes this different

The data is authoritative, not crowdsourced. Place names, municipal boundaries and the elevation model come from Lantmäteriet, the Swedish national mapping authority; statistical areas from Statistics Sweden; transit from the operators' own real-time feeds. This is the data Swedish public agencies compute on themselves — not an approximation, and not a global database where Sweden is a corner.

Responses fail closed. An API that answers 200 with an empty list says two very different things with the same words: "there is nothing" and "I could not ask". We keep them apart. A map that cannot be filled is not delivered at all — you get 503 and the zoom level that would work. A place name that exists in 217 municipalities is reported as ambiguous even when you only asked for five hits. A field that could not be measured is null with a reason — never true.

Everything runs in the EU, on hardware we operate. Servers in Helsinki, Finland. No American cloud provider is involved, and we never log a complete IP address: the last octet is masked before the line is written.

Quickstart

curl 'https://api.kart-api.se/v1/geocode?q=Fridhem'
const r = await fetch('https://api.kart-api.se/v1/kommun/lookup?lat=58.705&lon=15.77');
const { kommunnamn, attribution } = await r.json();
import requests
d = requests.get('https://api.kart-api.se/v1/hojd', params={'lat': 58.705, 'lon': 15.77}).json()
print(d['hojd_m'], d['attribution'])
claude mcp add --transport http kart-api https://api.kart-api.se/mcp

Field names are Swedish and stay Swedish — hojd_m is elevation in metres, kommun is municipality. Translating them would have meant two vocabularies for the same contract. Full documentation: getting started.

Price

TierWhat you getPrice
No key200 calls per day per IP. Every endpoint. Map tiles and styles don't count.Free
With key10,000 calls per month. Same endpoints, higher ceiling.Free during beta
CompanyHigher limits, an agreement, a named contact.Get in touch

We are measuring demand. The ceilings are guesses until the logs say otherwise — tell us what you need.

Who uses it today

The platform powers the maps in Muskot's local news sites (290 municipalities), the event map in igloo.day and the map surfaces in a handful of register services in the same group. Measured in our access log on 2026-09-11: all traffic came from our own products. kart-api.se is the first time the surface is documented and open to anyone else. Saying so plainly, instead of "thousands of developers", is the same rule the rest of this site follows: no number without a measurement.