API

API documentation

Open datasets as JSON over HTTPS. Every response tells you where the data comes from and when it was fetched.

Getting started

Base URL: https://api.aleva.se. Every endpoint answers GET requests with JSON. Try it right away:

curl -s 'https://api.aleva.se/v1/aviation/airports'

The whole API is also available as an OpenAPI 3.1 document: https://api.aleva.se/openapi.json.

Using an AI assistant? The same data is available as tools over MCP.

Access

The API is free to use for now: no key and no sign-up, with low limits per IP address (see Limits). Endpoints marked Required are not open yet.

Need more than the limits allow? Register your interest at the bottom of this page and we will get back to you. If we have given you a key, send it in Authorization: Bearer alv_… or X-API-Key; an invalid key gives 401.

Limits

Limits are counted per minute and per day in cost units. Every endpoint has a cost tier:

  • light: Light, 1 unit
  • standard: Standard, 2 units
  • heavy: Heavy, 5 units

Without a key: 10 units per minute and 200 per day per IP address.

Requests without a key have lower limits and count per IP address. Every response has headers that show where you stand: RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset. Over the limit you get 429 with Retry-After (seconds to wait).

Pagination

Lists return at most limit rows (default 100; the maximum per endpoint is in its parameter table). When there are more rows the response has next_cursor; pass it back as cursor with the same filters to get the next page. A modified cursor gives 400.

curl -s 'https://api.aleva.se/v1/stats/nameservers?tld=se&limit=100'
curl -s 'https://api.aleva.se/v1/stats/nameservers?tld=se&limit=100&cursor=<next_cursor>'

Filters

Filter with name=value for equality and name.op=value for other operators. The parameters and operators each endpoint accepts are listed under the endpoint below. Unknown parameters give 400, so a typo never returns everything.

FormDescriptionExample
name=valueequalstld=se
name.ne=valuenot equaltld.ne=nu
name.lt / name.lteless than / less than or equaldate.lte=2026-10-01
name.gt / name.gtegreater than / greater than or equaldomains.gte=1000
name.in=a,bone of (comma-separated)tld.in=se,nu
name.prefix=valuestarts withoperator.prefix=cloud

Responses and errors

Lists respond with {"data": [...], "next_cursor": "...", "_meta": {...}}, single objects with {"data": {...}, "_meta": {...}}.

Every response carries _meta (endpoint, version, sources, licences and attribution where present, when the data was fetched and built) and the header X-Attribution. Show the attribution where you use the data.

Errors have the form {"error": {"code": "...", "message": "..."}}:

  • 400 bad_request: invalid or unknown parameter
  • 401: missing or invalid key
  • 404 not_found: no such object
  • 429 rate_limited: over the limit, see Retry-After

Endpoints

Passengers per airport and year

GET /v1/aviation/airports

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
yearintegerNoYear equals
year.gteintegerNoYear at least
year.lteintegerNoYear at most
airportstringNoAirport (as reported, upper case) equals
airport.prefixstringNoAirport (as reported, upper case) starts with
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
airportstring
international_sharenumber
monthsinteger (int64)Months reported (the current year is partial)
movementsinteger (int64)
passengersinteger (int64)
yearinteger (int32)

Example

curl -s 'https://api.aleva.se/v1/aviation/airports'

Air passengers in Sweden per month

GET /v1/aviation/passengers/monthly

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
monthstring (date)NoMonth equals
month.gtestring (date)NoMonth at least
month.ltestring (date)NoMonth at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
domesticinteger (int64)
internationalinteger (int64)
monthstring (date)
movementsinteger (int64)
passengersinteger (int64)

Example

curl -s 'https://api.aleva.se/v1/aviation/passengers/monthly'

Published court rulings

GET /v1/courts/rulings

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Standard, 2 units

Parameters

NameTypeRequiredDescription
court_codestringNoHDO Supreme Court, HFD Supreme Administrative Court, ... equals
court_code.instringNoHDO Supreme Court, HFD Supreme Administrative Court, ... one of (comma-separated)
decided_onstring (date)NoDecision day equals
decided_on.gtestring (date)NoDecision day at least
decided_on.ltestring (date)NoDecision day at most
limitinteger, max 500NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
case_numbersstring
courtstring
court_codestring
decided_onstring (date)
idstring
keywordsstring
kindstringREFERAT (case report), DOM_ELLER_BESLUT (judgment or decision), ...
lawsstringProvisions cited
published_atstring (date-time)
referencestringCase report number, e.g. NJA 2026:12
summarystring
typestring

Example

curl -s 'https://api.aleva.se/v1/courts/rulings'

Rulings per court

GET /v1/courts/rulings/by-court

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
limitinteger, max 100NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
courtstring
court_codestring
lateststring (date)
rulingsinteger (int64)

Example

curl -s 'https://api.aleva.se/v1/courts/rulings/by-court'

Dropped .se and .nu domains on a date

GET /v1/domains/dropped

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
datestring (date)YesDay (Europe/Stockholm), YYYY-MM-DD equals
tldstringNoZone: se or nu equals
tld.instringNoZone: se or nu one of (comma-separated)
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
datestring (date)Day the change was seen (Europe/Stockholm)
detected_atstring (date-time)
domainstring
prev_has_dsboolean
prev_nameserversarray<string>Name servers before the change
serialinteger (int64)Serial the change was seen in
tldstring

Attribution: Contains data from the Swedish Internet Foundation (Internetstiftelsen), licensed under CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/domains/dropped?date=2026-10-16'

Domains about to be released

GET /v1/domains/expiring

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Standard, 2 units

Parameters

NameTypeRequiredDescription
tldstringNoZone: se or nu equals
tld.instringNoZone: se or nu one of (comma-separated)
release_atstring (date)NoRelease day equals
release_at.gtestring (date)NoRelease day at least
release_at.ltestring (date)NoRelease day at most
label_lengthintegerNoCharacters before the dot equals
label_length.lteintegerNoCharacters before the dot at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
days_leftinteger (int32)Days from the list's date to the release date
domainstring
in_zonebooleanStill delegated in the latest zone snapshot
label_lengthinteger (int32)Characters before the dot
release_atstring (date)Day it can be registered again (from 04:00 UTC), unless renewed first
tldstring

Attribution: Contains data from the Swedish Internet Foundation (Internetstiftelsen), licensed under CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/domains/expiring'

Domains about to be released, with a value score

GET /v1/domains/expiring/valuable

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Standard, 2 units

Parameters

NameTypeRequiredDescription
days_left.lteintegerNoDays until release at most
days_left.gteintegerNoDays until release at least
release_atstring (date)NoRelease day equals
release_at.gtestring (date)NoRelease day at least
release_at.ltestring (date)NoRelease day at most
score.gteintegerNoMinimum score at least
tldstringNose or nu equals
possible_trademarkbooleanNoContains a well-known brand equals
limitinteger, max 500NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
compoundboolean
days_leftinteger (int32)
domainstring
lengthinteger (int32)Characters before the dot
possible_trademarkbooleanContains a well-known brand: probably not usable
reasons_enstringWhy, in English
reasons_svstringWhy, in Swedish
release_atstring (date)Day it can be registered again (from 04:00 UTC), unless renewed first
scoreinteger (int32)0-100; higher is shorter, cleaner and closer to real words
tldstring
word_enboolean
word_svboolean

Attribution: Contains data from the Swedish Internet Foundation (Internetstiftelsen), licensed under CC BY 4.0 SALDO, Språkbanken Text (University of Gothenburg), CC BY 4.0 Word list from SCOWL, copyright Kevin Atkinson (wordlist.aspell.net)

Example

curl -s 'https://api.aleva.se/v1/domains/expiring/valuable'

One domain in the latest zone

GET /v1/domains/{name}

Returns one object in data, or 404. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
{name}stringYesDomain name, e.g. example.se equals

Response fields

NameTypeDescription
domainstringDomain name, lower-case
ds_algorithmsarray<integer>DNSSEC algorithm numbers
fetched_atstring (date-time)When the zone was transferred
glue_v4array<string>In-zone glue A records
glue_v6array<string>In-zone glue AAAA records
has_dsbooleanDNSSEC signed delegation
nameserversarray<string>NS host names
serialinteger (int64)Zone serial the row comes from
tldstringse or nu

Attribution: Contains data from the Swedish Internet Foundation (Internetstiftelsen), licensed under CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/domains/example.se'

New .se and .nu domains on a date

GET /v1/domains/new

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
datestring (date)YesDay (Europe/Stockholm), YYYY-MM-DD equals
tldstringNoZone: se or nu equals
tld.instringNoZone: se or nu one of (comma-separated)
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
datestring (date)Day the change was seen (Europe/Stockholm)
detected_atstring (date-time)
domainstring
has_dsboolean
nameserversarray<string>Name servers after the change (empty when removed)
serialinteger (int64)Serial the change was seen in
tldstring

Attribution: Contains data from the Swedish Internet Foundation (Internetstiftelsen), licensed under CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/domains/new?date=2026-10-16'

Debt restructuring applications per month

GET /v1/economy/debt-restructuring

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
monthstring (date)NoMonth equals
month.gtestring (date)NoMonth at least
month.ltestring (date)NoMonth at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
applicationsinteger (int64)
eservice_sharenumberShare filed via the e-service
meninteger (int64)
monthstring (date)
womeninteger (int64)

Example

curl -s 'https://api.aleva.se/v1/economy/debt-restructuring'

Debt restructuring per year and age

GET /v1/economy/debt-restructuring/by-age

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
yearintegerNoYear equals
year.gteintegerNoYear at least
year.lteintegerNoYear at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
age_groupstring
applicationsinteger (int64)
yearinteger (int32)

Example

curl -s 'https://api.aleva.se/v1/economy/debt-restructuring/by-age'

Electricity production and use per year

GET /v1/energy/electricity/balance

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
yearintegerNoYear equals
year.gteintegerNoYear at least
year.lteintegerNoYear at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
seriesstring
twhnumber
yearinteger (int32)

Example

curl -s 'https://api.aleva.se/v1/energy/electricity/balance'

Electricity production per source with forecast

GET /v1/energy/electricity/by-source

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
yearintegerNoYear equals
year.gteintegerNoYear at least
year.lteintegerNoYear at most
seriesstringNoPower source equals
series.instringNoPower source one of (comma-separated)
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
seriesstringPower source
twhnumber
yearinteger (int32)

Example

curl -s 'https://api.aleva.se/v1/energy/electricity/by-source'

Foods and nutrients per 100 g

GET /v1/foods

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
namestringNoName or its beginning, lower case equals
name.prefixstringNoName or its beginning, lower case starts with
food_idintegerNoFood number equals
food_id.instringNoFood number one of (comma-separated)
protein_g.gtenumberNoProtein per 100 g at least
protein_g.ltenumberNoProtein per 100 g at most
fibre_g.gtenumberNoFibre per 100 g at least
fibre_g.ltenumberNoFibre per 100 g at most
energy_kcal.gtenumberNokcal per 100 g at least
energy_kcal.ltenumberNokcal per 100 g at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
calcium_mgnumber
carbohydrates_gnumber
energy_kcalnumber
fat_gnumber
fibre_gnumber
food_idinteger (int32)
iron_mgnumber
kindstring
namestring
protein_gnumber
salt_gnumber
saturated_fat_gnumber
sugars_gnumber
vitamin_c_mgnumber
vitamin_d_ugnumber

Attribution: Source: Livsmedelsverket's food composition database, CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/foods'

Open job ads per day

GET /v1/jobs/ads

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
dimensionstringYestotal, remote, occupation-field, region or municipality equals
datestring (date)NoDay equals
date.gtestring (date)NoDay at least
date.ltestring (date)NoDay at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
adsinteger (int64)
codestringCounty or municipality code
concept_idstringJobTech taxonomy id
datestring (date)
dimensionstringtotal, remote, occupation-field, region or municipality
termstring

Example

curl -s 'https://api.aleva.se/v1/jobs/ads?dimension=example'

Open job ads in Sweden per day

GET /v1/jobs/ads/national

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
datestring (date)NoDay equals
date.gtestring (date)NoDay at least
date.ltestring (date)NoDay at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
adsinteger (int64)
datestring (date)
remoteinteger (int64)
remote_sharenumber

Example

curl -s 'https://api.aleva.se/v1/jobs/ads/national'

Medicine shortages

GET /v1/medicines/shortages

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
ongoingbooleanNoStill ongoing equals
atc_codestringNoATC code or its beginning equals
atc_code.prefixstringNoATC code or its beginning starts with
startsstring (date)NoFirst day equals
starts.gtestring (date)NoFirst day at least
starts.ltestring (date)NoFirst day at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
atc_codestring
atc_groupstringATC main group (A alimentary tract, N nervous system, ...)
endedstring (date)
ends_forecaststring (date)
holderstringMarketing authorisation holder
last_updatedstring (date)
npl_pack_idstring
ongoingboolean
packagestring
productstring
shortage_idstring
startsstring (date)
substancesstring

Attribution: Contains data from Läkemedelsverket, CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/medicines/shortages'

Ongoing shortages per ATC group

GET /v1/medicines/shortages/by-group

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
limitinteger, max 50NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
atc_groupstring
packagesinteger (int64)
productsinteger (int64)

Attribution: Contains data from Läkemedelsverket, CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/medicines/shortages/by-group'

New medicine shortages per month

GET /v1/medicines/shortages/monthly

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
monthstring (date)NoMonth equals
month.gtestring (date)NoMonth at least
month.ltestring (date)NoMonth at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
monthstring (date)
packagesinteger (int64)Packages affected
shortagesinteger (int64)Shortages that started

Attribution: Contains data from Läkemedelsverket, CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/medicines/shortages/monthly'

Key figures per municipality and year (Kolada)

GET /v1/municipalities/figures

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
kpistringYesKolada key figure id, e.g. N00900 equals
kpi.instringNoKolada key figure id, e.g. N00900 one of (comma-separated)
municipality_idstringNoMunicipality or region id equals
municipality_id.instringNoMunicipality or region id one of (comma-separated)
yearintegerNoYear equals
year.gteintegerNoYear at least
year.lteintegerNoYear at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
kpistringKolada key figure id
kpi_titlestring
municipalitystring
municipality_idstring
municipality_typestringK municipality, L region
valuenumber
yearinteger (int32)

Attribution: Source: Kolada (RKA), CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/municipalities/figures?kpi=example'

Key figures per municipality, latest year

GET /v1/municipalities/figures/latest

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
kpistringYesKolada key figure id equals
kpi.instringNoKolada key figure id one of (comma-separated)
municipality_typestringNoK municipality, L region equals
municipality_idstringNoId equals
municipality_id.instringNoId one of (comma-separated)
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
kpistring
kpi_titlestring
municipalitystring
municipality_idstring
municipality_typestring
valuenumber
yearinteger (int32)

Attribution: Source: Kolada (RKA), CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/municipalities/figures/latest?kpi=example'

Policy rate and exchange rates per day

GET /v1/rates/riksbank

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
seriesstringYesSECBREPOEFF policy rate, SEKEURPMI, SEKUSDPMI, SEKGBPPMI equals
series.instringNoSECBREPOEFF policy rate, SEKEURPMI, SEKUSDPMI, SEKGBPPMI one of (comma-separated)
datestring (date)NoDay equals
date.gtestring (date)NoDay at least
date.ltestring (date)NoDay at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
datestring (date)
descriptionstring
seriesstringSECBREPOEFF policy rate, SEKEURPMI, SEKUSDPMI, SEKGBPPMI
valuenumber

Attribution: Source: Sveriges riksbank, CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/rates/riksbank?series=example'

Swestr per day

GET /v1/rates/swestr

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
datestring (date)NoDay equals
date.gtestring (date)NoDay at least
date.ltestring (date)NoDay at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
datestring (date)
pctl12_5number12.5th percentile of the transactions' rates
pctl87_5number87.5th percentile
ratenumberPercent
transactionsinteger (int32)
volume_mseknumberTransaction volume, SEK million

Attribution: Source: Sveriges riksbank, CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/rates/swestr'

How often the parties vote alike

GET /v1/riksdag/party-agreement

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
partystringNoParty, e.g. S equals
party.instringNoParty, e.g. S one of (comma-separated)
limitinteger, max 200NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
other_partystring
partystring
sameinteger (int64)
sharenumber
votesinteger (int64)Votes where both parties voted yes or no

Attribution: Source: Sveriges riksdag

Example

curl -s 'https://api.aleva.se/v1/riksdag/party-agreement'

Votes and absence per party

GET /v1/riksdag/party-attendance

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
riksmotestringNoSession, e.g. 2025/26 equals
riksmote.instringNoSession, e.g. 2025/26 one of (comma-separated)
limitinteger, max 200NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
absent_sharenumber
abstain_sharenumber
partystring- is members without a party
riksmotestringSession, e.g. 2025/26
votesinteger (int64)

Attribution: Source: Sveriges riksdag

Example

curl -s 'https://api.aleva.se/v1/riksdag/party-attendance'

DNSSEC adoption per zone and day

GET /v1/stats/dnssec

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
tldstringNoZone: se or nu equals
tld.instringNoZone: se or nu one of (comma-separated)
datestring (date)NoDay equals
date.gtestring (date)NoDay at least
date.ltestring (date)NoDay at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
datestring (date)Day of the snapshot (Europe/Stockholm)
domainsinteger (int64)
ecdsa_p256integer (int64)Signed with algorithm 13 (ECDSA P-256)
rsa_sha256integer (int64)Signed with algorithm 8 (RSA/SHA-256)
share_signednumber
signedinteger (int64)Domains with a DS record
tldstring

Attribution: Contains data from the Swedish Internet Foundation (Internetstiftelsen), licensed under CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/stats/dnssec'

Name server operators and market share

GET /v1/stats/nameservers

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Standard, 2 units

Parameters

NameTypeRequiredDescription
tldstringNoZone: se or nu equals
tld.instringNoZone: se or nu one of (comma-separated)
operatorstringNoOperator (registered domain of the NS hosts) equals
operator.prefixstringNoOperator (registered domain of the NS hosts) starts with
domains.gteintegerNoMinimum number of domains at least
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
domainsinteger (int64)Domains with at least one name server at this operator
fetched_atstring (date-time)
operatorstringRegistered domain of the name server hosts, e.g. loopia.se
serialinteger (int64)
sharenumberdomains / all domains in the zone
tldstring

Attribution: Contains data from the Swedish Internet Foundation (Internetstiftelsen), licensed under CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/stats/nameservers'

Consumer price index per month

GET /v1/sweden/cpi

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
measure_codestringNo00000807 index, 00000804 12-month change, 00000806 monthly change equals
measure_code.instringNo00000807 index, 00000804 12-month change, 00000806 monthly change one of (comma-separated)
monthstring (date)NoMonth (first day) equals
month.gtestring (date)NoMonth (first day) at least
month.ltestring (date)NoMonth (first day) at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
measurestring
measure_codestring00000807 index, 00000804 12-month change, 00000806 monthly change
monthstring (date)First day of the month
valuenumber

Example

curl -s 'https://api.aleva.se/v1/sweden/cpi'

House price index

GET /v1/sweden/house-prices

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
region_codestringNo00 Sweden, 0010 Greater Stockholm, ... equals
region_code.instringNo00 Sweden, 0010 Greater Stockholm, ... one of (comma-separated)
yearintegerNoYear equals
year.gteintegerNoYear at least
year.lteintegerNoYear at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
indexnumber1981 = 100
regionstring
region_codestring
yearinteger (int32)

Example

curl -s 'https://api.aleva.se/v1/sweden/house-prices'

Population per region and year

GET /v1/sweden/population

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
region_codestringNo00 Sweden, 2 digits county, 4 digits municipality equals
region_code.instringNo00 Sweden, 2 digits county, 4 digits municipality one of (comma-separated)
levelstringNocountry, county or municipality equals
yearintegerNoYear equals
year.gteintegerNoYear at least
year.lteintegerNoYear at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
levelstring
populationinteger (int64)
regionstring
region_codestring00 Sweden, 2 digits county, 4 digits municipality
yearinteger (int32)

Example

curl -s 'https://api.aleva.se/v1/sweden/population'

Population in the latest year and change

GET /v1/sweden/population/latest

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
region_codestringNoRegion code equals
region_code.instringNoRegion code one of (comma-separated)
levelstringNocountry, county or municipality equals
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
change_pctnumberChange since first_year, percent
first_yearinteger (int32)
levelstring
populationinteger (int64)Population in the latest year
regionstring
region_codestring
yearinteger (int32)Latest year

Example

curl -s 'https://api.aleva.se/v1/sweden/population/latest'

Guest nights per month

GET /v1/tourism/guest-nights

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
monthstring (date)NoMonth equals
month.gtestring (date)NoMonth at least
month.ltestring (date)NoMonth at most
originstringNoSverige or Utland equals
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
monthstring (date)
nightsinteger (int64)
originstringSverige or Utland

Example

curl -s 'https://api.aleva.se/v1/tourism/guest-nights'

Foreign guest nights per country and year

GET /v1/tourism/guest-nights/by-country

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
yearintegerYesYear equals
year.gteintegerNoYear at least
year.lteintegerNoYear at most
limitinteger, max 500NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
countrystring
nightsinteger (int64)
yearinteger (int32)

Example

curl -s 'https://api.aleva.se/v1/tourism/guest-nights/by-country?year=1'

Guest nights per county and year

GET /v1/tourism/guest-nights/by-county

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
yearintegerNoYear equals
year.gteintegerNoYear at least
year.lteintegerNoYear at most
county_codestringNoCounty code equals
county_code.instringNoCounty code one of (comma-separated)
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
countystring
county_codestring
foreign_sharenumber
nightsinteger (int64)
yearinteger (int32)

Example

curl -s 'https://api.aleva.se/v1/tourism/guest-nights/by-county'

Train punctuality per station and day

GET /v1/trains/punctuality

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
datestring (date)NoDay equals
date.gtestring (date)NoDay at least
date.ltestring (date)NoDay at most
stationstringNoLocation signature, e.g. Cst equals
station.instringNoLocation signature, e.g. Cst one of (comma-separated)
arrivals.gteintegerNoMinimum arrivals at least
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
arrivalsinteger (int64)
avg_delay_minnumberAverage delay, early counted as 0
canceledinteger (int64)
datestring (date)
on_timeinteger (int64)At most 5 minutes late
on_time_sharenumberShare on time among cancelled and reported arrivals
stationstringLocation signature
station_namestring

Example

curl -s 'https://api.aleva.se/v1/trains/punctuality'

Train punctuality in Sweden per day

GET /v1/trains/punctuality/daily

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
datestring (date)NoDay equals
date.gtestring (date)NoDay at least
date.ltestring (date)NoDay at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
arrivalsinteger (int64)
avg_delay_minnumber
canceledinteger (int64)
datestring (date)
on_time_sharenumber

Example

curl -s 'https://api.aleva.se/v1/trains/punctuality/daily'

Weather per hour and station

GET /v1/weather/history

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Standard, 2 units

Parameters

NameTypeRequiredDescription
station_idstringYesSMHI station id equals
station_id.instringNoSMHI station id one of (comma-separated)
parameterstringNoParameter equals
parameter.instringNoParameter one of (comma-separated)
datestring (date)NoDay equals
date.gtestring (date)NoDay at least
date.ltestring (date)NoDay at most
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
datestring (date)Day (Europe/Stockholm)
observed_atstring (date-time)
parameterstring1 temperature, 4 wind speed, 6 humidity, 7 precipitation
qualitystringG checked, Y suspect (latest-hour data is not quality-controlled)
stationstring
station_idstringSMHI station id
unitstring
valuenumber

Attribution: Contains data from SMHI (Swedish Meteorological and Hydrological Institute), CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/weather/history?station_id=example'

Current weather per SMHI station

GET /v1/weather/now

Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit

Parameters

NameTypeRequiredDescription
parameterstringNo1 temperature, 4 wind, 6 humidity, 7 precipitation equals
parameter.instringNo1 temperature, 4 wind, 6 humidity, 7 precipitation one of (comma-separated)
station_idstringNoSMHI station id equals
station_id.instringNoSMHI station id one of (comma-separated)
limitinteger, max 1000NoRows per page
cursorstringNonext_cursor from the previous page

Response fields

NameTypeDescription
latitudenumber
longitudenumber
observed_atstring (date-time)
parameterstring1 temperature, 4 wind speed, 6 humidity, 7 precipitation
parameter_namestring
qualitystringG checked, Y suspect (latest-hour data is not quality-controlled)
stationstring
station_idstringSMHI station id
unitstring
valuenumber

Attribution: Contains data from SMHI (Swedish Meteorological and Hydrological Institute), CC BY 4.0

Example

curl -s 'https://api.aleva.se/v1/weather/now'

The API is free to try

Every open endpoint works without a key, at low limits per IP address, while we keep building. If you need more, or want to be there from the start when we launch, register your interest and we will get back to you.