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 unitstandard: Standard, 2 unitsheavy: 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.
| Form | Description | Example |
|---|---|---|
name=value | equals | tld=se |
name.ne=value | not equal | tld.ne=nu |
name.lt / name.lte | less than / less than or equal | date.lte=2026-10-01 |
name.gt / name.gte | greater than / greater than or equal | domains.gte=1000 |
name.in=a,b | one of (comma-separated) | tld.in=se,nu |
name.prefix=value | starts with | operator.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 parameter401: missing or invalid key404 not_found: no such object429 rate_limited: over the limit, see Retry-After
Endpoints
Passengers per airport and year
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
year | integer | No | Year equals |
year.gte | integer | No | Year at least |
year.lte | integer | No | Year at most |
airport | string | No | Airport (as reported, upper case) equals |
airport.prefix | string | No | Airport (as reported, upper case) starts with |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
airport | string | |
international_share | number | |
months | integer (int64) | Months reported (the current year is partial) |
movements | integer (int64) | |
passengers | integer (int64) | |
year | integer (int32) |
Example
curl -s 'https://api.aleva.se/v1/aviation/airports' Air passengers in Sweden per month
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
month | string (date) | No | Month equals |
month.gte | string (date) | No | Month at least |
month.lte | string (date) | No | Month at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
domestic | integer (int64) | |
international | integer (int64) | |
month | string (date) | |
movements | integer (int64) | |
passengers | integer (int64) |
Example
curl -s 'https://api.aleva.se/v1/aviation/passengers/monthly' Published court rulings
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Standard, 2 units
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
court_code | string | No | HDO Supreme Court, HFD Supreme Administrative Court, ... equals |
court_code.in | string | No | HDO Supreme Court, HFD Supreme Administrative Court, ... one of (comma-separated) |
decided_on | string (date) | No | Decision day equals |
decided_on.gte | string (date) | No | Decision day at least |
decided_on.lte | string (date) | No | Decision day at most |
limit | integer, max 500 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
case_numbers | string | |
court | string | |
court_code | string | |
decided_on | string (date) | |
id | string | |
keywords | string | |
kind | string | REFERAT (case report), DOM_ELLER_BESLUT (judgment or decision), ... |
laws | string | Provisions cited |
published_at | string (date-time) | |
reference | string | Case report number, e.g. NJA 2026:12 |
summary | string | |
type | string |
Example
curl -s 'https://api.aleva.se/v1/courts/rulings' Rulings per court
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer, max 100 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
court | string | |
court_code | string | |
latest | string (date) | |
rulings | integer (int64) |
Example
curl -s 'https://api.aleva.se/v1/courts/rulings/by-court' Dropped .se and .nu domains on a date
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string (date) | Yes | Day (Europe/Stockholm), YYYY-MM-DD equals |
tld | string | No | Zone: se or nu equals |
tld.in | string | No | Zone: se or nu one of (comma-separated) |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
date | string (date) | Day the change was seen (Europe/Stockholm) |
detected_at | string (date-time) | |
domain | string | |
prev_has_ds | boolean | |
prev_nameservers | array<string> | Name servers before the change |
serial | integer (int64) | Serial the change was seen in |
tld | string |
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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Standard, 2 units
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tld | string | No | Zone: se or nu equals |
tld.in | string | No | Zone: se or nu one of (comma-separated) |
release_at | string (date) | No | Release day equals |
release_at.gte | string (date) | No | Release day at least |
release_at.lte | string (date) | No | Release day at most |
label_length | integer | No | Characters before the dot equals |
label_length.lte | integer | No | Characters before the dot at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
days_left | integer (int32) | Days from the list's date to the release date |
domain | string | |
in_zone | boolean | Still delegated in the latest zone snapshot |
label_length | integer (int32) | Characters before the dot |
release_at | string (date) | Day it can be registered again (from 04:00 UTC), unless renewed first |
tld | string |
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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Standard, 2 units
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
days_left.lte | integer | No | Days until release at most |
days_left.gte | integer | No | Days until release at least |
release_at | string (date) | No | Release day equals |
release_at.gte | string (date) | No | Release day at least |
release_at.lte | string (date) | No | Release day at most |
score.gte | integer | No | Minimum score at least |
tld | string | No | se or nu equals |
possible_trademark | boolean | No | Contains a well-known brand equals |
limit | integer, max 500 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
compound | boolean | |
days_left | integer (int32) | |
domain | string | |
length | integer (int32) | Characters before the dot |
possible_trademark | boolean | Contains a well-known brand: probably not usable |
reasons_en | string | Why, in English |
reasons_sv | string | Why, in Swedish |
release_at | string (date) | Day it can be registered again (from 04:00 UTC), unless renewed first |
score | integer (int32) | 0-100; higher is shorter, cleaner and closer to real words |
tld | string | |
word_en | boolean | |
word_sv | boolean |
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
Returns one object in data, or 404. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
{name} | string | Yes | Domain name, e.g. example.se equals |
Response fields
| Name | Type | Description |
|---|---|---|
domain | string | Domain name, lower-case |
ds_algorithms | array<integer> | DNSSEC algorithm numbers |
fetched_at | string (date-time) | When the zone was transferred |
glue_v4 | array<string> | In-zone glue A records |
glue_v6 | array<string> | In-zone glue AAAA records |
has_ds | boolean | DNSSEC signed delegation |
nameservers | array<string> | NS host names |
serial | integer (int64) | Zone serial the row comes from |
tld | string | se 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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string (date) | Yes | Day (Europe/Stockholm), YYYY-MM-DD equals |
tld | string | No | Zone: se or nu equals |
tld.in | string | No | Zone: se or nu one of (comma-separated) |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
date | string (date) | Day the change was seen (Europe/Stockholm) |
detected_at | string (date-time) | |
domain | string | |
has_ds | boolean | |
nameservers | array<string> | Name servers after the change (empty when removed) |
serial | integer (int64) | Serial the change was seen in |
tld | string |
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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
month | string (date) | No | Month equals |
month.gte | string (date) | No | Month at least |
month.lte | string (date) | No | Month at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
applications | integer (int64) | |
eservice_share | number | Share filed via the e-service |
men | integer (int64) | |
month | string (date) | |
women | integer (int64) |
Example
curl -s 'https://api.aleva.se/v1/economy/debt-restructuring' Debt restructuring per year and age
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
year | integer | No | Year equals |
year.gte | integer | No | Year at least |
year.lte | integer | No | Year at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
age_group | string | |
applications | integer (int64) | |
year | integer (int32) |
Example
curl -s 'https://api.aleva.se/v1/economy/debt-restructuring/by-age' Electricity production and use per year
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
year | integer | No | Year equals |
year.gte | integer | No | Year at least |
year.lte | integer | No | Year at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
series | string | |
twh | number | |
year | integer (int32) |
Example
curl -s 'https://api.aleva.se/v1/energy/electricity/balance' Electricity production per source with forecast
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
year | integer | No | Year equals |
year.gte | integer | No | Year at least |
year.lte | integer | No | Year at most |
series | string | No | Power source equals |
series.in | string | No | Power source one of (comma-separated) |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
series | string | Power source |
twh | number | |
year | integer (int32) |
Example
curl -s 'https://api.aleva.se/v1/energy/electricity/by-source' Foods and nutrients per 100 g
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | Name or its beginning, lower case equals |
name.prefix | string | No | Name or its beginning, lower case starts with |
food_id | integer | No | Food number equals |
food_id.in | string | No | Food number one of (comma-separated) |
protein_g.gte | number | No | Protein per 100 g at least |
protein_g.lte | number | No | Protein per 100 g at most |
fibre_g.gte | number | No | Fibre per 100 g at least |
fibre_g.lte | number | No | Fibre per 100 g at most |
energy_kcal.gte | number | No | kcal per 100 g at least |
energy_kcal.lte | number | No | kcal per 100 g at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
calcium_mg | number | |
carbohydrates_g | number | |
energy_kcal | number | |
fat_g | number | |
fibre_g | number | |
food_id | integer (int32) | |
iron_mg | number | |
kind | string | |
name | string | |
protein_g | number | |
salt_g | number | |
saturated_fat_g | number | |
sugars_g | number | |
vitamin_c_mg | number | |
vitamin_d_ug | number |
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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dimension | string | Yes | total, remote, occupation-field, region or municipality equals |
date | string (date) | No | Day equals |
date.gte | string (date) | No | Day at least |
date.lte | string (date) | No | Day at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
ads | integer (int64) | |
code | string | County or municipality code |
concept_id | string | JobTech taxonomy id |
date | string (date) | |
dimension | string | total, remote, occupation-field, region or municipality |
term | string |
Example
curl -s 'https://api.aleva.se/v1/jobs/ads?dimension=example' Open job ads in Sweden per day
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string (date) | No | Day equals |
date.gte | string (date) | No | Day at least |
date.lte | string (date) | No | Day at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
ads | integer (int64) | |
date | string (date) | |
remote | integer (int64) | |
remote_share | number |
Example
curl -s 'https://api.aleva.se/v1/jobs/ads/national' Medicine shortages
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ongoing | boolean | No | Still ongoing equals |
atc_code | string | No | ATC code or its beginning equals |
atc_code.prefix | string | No | ATC code or its beginning starts with |
starts | string (date) | No | First day equals |
starts.gte | string (date) | No | First day at least |
starts.lte | string (date) | No | First day at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
atc_code | string | |
atc_group | string | ATC main group (A alimentary tract, N nervous system, ...) |
ended | string (date) | |
ends_forecast | string (date) | |
holder | string | Marketing authorisation holder |
last_updated | string (date) | |
npl_pack_id | string | |
ongoing | boolean | |
package | string | |
product | string | |
shortage_id | string | |
starts | string (date) | |
substances | string |
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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer, max 50 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
atc_group | string | |
packages | integer (int64) | |
products | integer (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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
month | string (date) | No | Month equals |
month.gte | string (date) | No | Month at least |
month.lte | string (date) | No | Month at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
month | string (date) | |
packages | integer (int64) | Packages affected |
shortages | integer (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)
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
kpi | string | Yes | Kolada key figure id, e.g. N00900 equals |
kpi.in | string | No | Kolada key figure id, e.g. N00900 one of (comma-separated) |
municipality_id | string | No | Municipality or region id equals |
municipality_id.in | string | No | Municipality or region id one of (comma-separated) |
year | integer | No | Year equals |
year.gte | integer | No | Year at least |
year.lte | integer | No | Year at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
kpi | string | Kolada key figure id |
kpi_title | string | |
municipality | string | |
municipality_id | string | |
municipality_type | string | K municipality, L region |
value | number | |
year | integer (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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
kpi | string | Yes | Kolada key figure id equals |
kpi.in | string | No | Kolada key figure id one of (comma-separated) |
municipality_type | string | No | K municipality, L region equals |
municipality_id | string | No | Id equals |
municipality_id.in | string | No | Id one of (comma-separated) |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
kpi | string | |
kpi_title | string | |
municipality | string | |
municipality_id | string | |
municipality_type | string | |
value | number | |
year | integer (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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
series | string | Yes | SECBREPOEFF policy rate, SEKEURPMI, SEKUSDPMI, SEKGBPPMI equals |
series.in | string | No | SECBREPOEFF policy rate, SEKEURPMI, SEKUSDPMI, SEKGBPPMI one of (comma-separated) |
date | string (date) | No | Day equals |
date.gte | string (date) | No | Day at least |
date.lte | string (date) | No | Day at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
date | string (date) | |
description | string | |
series | string | SECBREPOEFF policy rate, SEKEURPMI, SEKUSDPMI, SEKGBPPMI |
value | number |
Attribution: Source: Sveriges riksbank, CC BY 4.0
Example
curl -s 'https://api.aleva.se/v1/rates/riksbank?series=example' Swestr per day
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string (date) | No | Day equals |
date.gte | string (date) | No | Day at least |
date.lte | string (date) | No | Day at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
date | string (date) | |
pctl12_5 | number | 12.5th percentile of the transactions' rates |
pctl87_5 | number | 87.5th percentile |
rate | number | Percent |
transactions | integer (int32) | |
volume_msek | number | Transaction 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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
party | string | No | Party, e.g. S equals |
party.in | string | No | Party, e.g. S one of (comma-separated) |
limit | integer, max 200 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
other_party | string | |
party | string | |
same | integer (int64) | |
share | number | |
votes | integer (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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
riksmote | string | No | Session, e.g. 2025/26 equals |
riksmote.in | string | No | Session, e.g. 2025/26 one of (comma-separated) |
limit | integer, max 200 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
absent_share | number | |
abstain_share | number | |
party | string | - is members without a party |
riksmote | string | Session, e.g. 2025/26 |
votes | integer (int64) |
Attribution: Source: Sveriges riksdag
Example
curl -s 'https://api.aleva.se/v1/riksdag/party-attendance' DNSSEC adoption per zone and day
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tld | string | No | Zone: se or nu equals |
tld.in | string | No | Zone: se or nu one of (comma-separated) |
date | string (date) | No | Day equals |
date.gte | string (date) | No | Day at least |
date.lte | string (date) | No | Day at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
date | string (date) | Day of the snapshot (Europe/Stockholm) |
domains | integer (int64) | |
ecdsa_p256 | integer (int64) | Signed with algorithm 13 (ECDSA P-256) |
rsa_sha256 | integer (int64) | Signed with algorithm 8 (RSA/SHA-256) |
share_signed | number | |
signed | integer (int64) | Domains with a DS record |
tld | string |
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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Standard, 2 units
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tld | string | No | Zone: se or nu equals |
tld.in | string | No | Zone: se or nu one of (comma-separated) |
operator | string | No | Operator (registered domain of the NS hosts) equals |
operator.prefix | string | No | Operator (registered domain of the NS hosts) starts with |
domains.gte | integer | No | Minimum number of domains at least |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
domains | integer (int64) | Domains with at least one name server at this operator |
fetched_at | string (date-time) | |
operator | string | Registered domain of the name server hosts, e.g. loopia.se |
serial | integer (int64) | |
share | number | domains / all domains in the zone |
tld | string |
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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
measure_code | string | No | 00000807 index, 00000804 12-month change, 00000806 monthly change equals |
measure_code.in | string | No | 00000807 index, 00000804 12-month change, 00000806 monthly change one of (comma-separated) |
month | string (date) | No | Month (first day) equals |
month.gte | string (date) | No | Month (first day) at least |
month.lte | string (date) | No | Month (first day) at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
measure | string | |
measure_code | string | 00000807 index, 00000804 12-month change, 00000806 monthly change |
month | string (date) | First day of the month |
value | number |
Example
curl -s 'https://api.aleva.se/v1/sweden/cpi' House price index
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
region_code | string | No | 00 Sweden, 0010 Greater Stockholm, ... equals |
region_code.in | string | No | 00 Sweden, 0010 Greater Stockholm, ... one of (comma-separated) |
year | integer | No | Year equals |
year.gte | integer | No | Year at least |
year.lte | integer | No | Year at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
index | number | 1981 = 100 |
region | string | |
region_code | string | |
year | integer (int32) |
Example
curl -s 'https://api.aleva.se/v1/sweden/house-prices' Population per region and year
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
region_code | string | No | 00 Sweden, 2 digits county, 4 digits municipality equals |
region_code.in | string | No | 00 Sweden, 2 digits county, 4 digits municipality one of (comma-separated) |
level | string | No | country, county or municipality equals |
year | integer | No | Year equals |
year.gte | integer | No | Year at least |
year.lte | integer | No | Year at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
level | string | |
population | integer (int64) | |
region | string | |
region_code | string | 00 Sweden, 2 digits county, 4 digits municipality |
year | integer (int32) |
Example
curl -s 'https://api.aleva.se/v1/sweden/population' Population in the latest year and change
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
region_code | string | No | Region code equals |
region_code.in | string | No | Region code one of (comma-separated) |
level | string | No | country, county or municipality equals |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
change_pct | number | Change since first_year, percent |
first_year | integer (int32) | |
level | string | |
population | integer (int64) | Population in the latest year |
region | string | |
region_code | string | |
year | integer (int32) | Latest year |
Example
curl -s 'https://api.aleva.se/v1/sweden/population/latest' Guest nights per month
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
month | string (date) | No | Month equals |
month.gte | string (date) | No | Month at least |
month.lte | string (date) | No | Month at most |
origin | string | No | Sverige or Utland equals |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
month | string (date) | |
nights | integer (int64) | |
origin | string | Sverige or Utland |
Example
curl -s 'https://api.aleva.se/v1/tourism/guest-nights' Foreign guest nights per country and year
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
year | integer | Yes | Year equals |
year.gte | integer | No | Year at least |
year.lte | integer | No | Year at most |
limit | integer, max 500 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
country | string | |
nights | integer (int64) | |
year | integer (int32) |
Example
curl -s 'https://api.aleva.se/v1/tourism/guest-nights/by-country?year=1' Guest nights per county and year
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
year | integer | No | Year equals |
year.gte | integer | No | Year at least |
year.lte | integer | No | Year at most |
county_code | string | No | County code equals |
county_code.in | string | No | County code one of (comma-separated) |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
county | string | |
county_code | string | |
foreign_share | number | |
nights | integer (int64) | |
year | integer (int32) |
Example
curl -s 'https://api.aleva.se/v1/tourism/guest-nights/by-county' Train punctuality per station and day
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string (date) | No | Day equals |
date.gte | string (date) | No | Day at least |
date.lte | string (date) | No | Day at most |
station | string | No | Location signature, e.g. Cst equals |
station.in | string | No | Location signature, e.g. Cst one of (comma-separated) |
arrivals.gte | integer | No | Minimum arrivals at least |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
arrivals | integer (int64) | |
avg_delay_min | number | Average delay, early counted as 0 |
canceled | integer (int64) | |
date | string (date) | |
on_time | integer (int64) | At most 5 minutes late |
on_time_share | number | Share on time among cancelled and reported arrivals |
station | string | Location signature |
station_name | string |
Example
curl -s 'https://api.aleva.se/v1/trains/punctuality' Train punctuality in Sweden per day
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string (date) | No | Day equals |
date.gte | string (date) | No | Day at least |
date.lte | string (date) | No | Day at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
arrivals | integer (int64) | |
avg_delay_min | number | |
canceled | integer (int64) | |
date | string (date) | |
on_time_share | number |
Example
curl -s 'https://api.aleva.se/v1/trains/punctuality/daily' Weather per hour and station
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Standard, 2 units
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
station_id | string | Yes | SMHI station id equals |
station_id.in | string | No | SMHI station id one of (comma-separated) |
parameter | string | No | Parameter equals |
parameter.in | string | No | Parameter one of (comma-separated) |
date | string (date) | No | Day equals |
date.gte | string (date) | No | Day at least |
date.lte | string (date) | No | Day at most |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
date | string (date) | Day (Europe/Stockholm) |
observed_at | string (date-time) | |
parameter | string | 1 temperature, 4 wind speed, 6 humidity, 7 precipitation |
quality | string | G checked, Y suspect (latest-hour data is not quality-controlled) |
station | string | |
station_id | string | SMHI station id |
unit | string | |
value | number |
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
Returns a list in data, with next_cursor when there are more rows. · Key: Optional · Cost: Light, 1 unit
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
parameter | string | No | 1 temperature, 4 wind, 6 humidity, 7 precipitation equals |
parameter.in | string | No | 1 temperature, 4 wind, 6 humidity, 7 precipitation one of (comma-separated) |
station_id | string | No | SMHI station id equals |
station_id.in | string | No | SMHI station id one of (comma-separated) |
limit | integer, max 1000 | No | Rows per page |
cursor | string | No | next_cursor from the previous page |
Response fields
| Name | Type | Description |
|---|---|---|
latitude | number | |
longitude | number | |
observed_at | string (date-time) | |
parameter | string | 1 temperature, 4 wind speed, 6 humidity, 7 precipitation |
parameter_name | string | |
quality | string | G checked, Y suspect (latest-hour data is not quality-controlled) |
station | string | |
station_id | string | SMHI station id |
unit | string | |
value | number |
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.