sverigesmiljomal.se APIsverigesmiljomal.se ↗
Access Sweden's environmental quality objectives and indicators via API. Retrieve gravel production time-series, regional breakdowns, and indicator data for all 21 counties.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/4123503b-86ae-46e1-b6f0-7f0f653066d6/get_national_gravel_production' \ -H 'X-API-Key: $PARSE_API_KEY'
Scrapes the national-level gravel production data from the Grusanvändning indicator page. Returns annual time-series of delivered quantities for Naturgrus, Krossberg, and Morän in millions of tonnes.
No input parameters required.
{
"type": "object",
"fields": {
"title": "string, chart title",
"xAxis": "array of category labels or null",
"series": "array of objects with name and data (array of [year, value] pairs)",
"subtitle": "string, geographic scope (e.g. 'Sverige')"
},
"sample": {
"data": {
"title": "Naturgrusanvändning - krossberg, morän och naturgrus",
"xAxis": null,
"series": [
{
"data": [
[
1994,
28.6
],
[
2024,
84.9
]
],
"name": "Krossberg"
},
{
"data": [
[
1994,
3.2
],
[
2024,
0.9
]
],
"name": "Morän"
},
{
"data": [
[
1994,
43.8
],
[
2024,
3.83
]
],
"name": "Naturgrus"
}
],
"subtitle": "Sverige"
},
"status": "success"
}
}About the sverigesmiljomal.se API
This API exposes 13 endpoints covering Sweden's official environmental quality objectives (miljökvalitetsmål) and associated indicators from sverigesmiljomal.se. Endpoints like get_national_gravel_production return annual time-series data in millions of tonnes across material types (Naturgrus, Krossberg, Morän), while list_all_indicators enumerates every tracked environmental indicator with its goal association and slug for downstream lookups.
Environmental Goals and Indicators
The list_environmental_goals endpoint returns the names, URLs, and slugs of all Swedish environmental quality objectives found on the miljömålen index page. From there, list_all_indicators provides a full enumeration of every indicator with its goal_slug, indicator_slug, and page URL. You can narrow results by goal using list_indicators_for_goal, passing a goal_slug value such as grundvatten-av-god-kvalitet or begransad-klimatpaverkan. The get_groundwater_goal_overview endpoint targets the Good Quality Groundwater goal specifically, returning the goal name and a list of related indicators with their URLs.
Gravel Production and Usage Data
Several endpoints focus on the Grusanvändning (gravel use) indicator. get_national_gravel_production returns a national time-series with title, subtitle, xAxis categories, and a series array where each object contains a material name and an array of [year, value] pairs. For county-level data, get_regional_gravel_production accepts a county_slug (e.g. skane-lan, vasterbottens-lan) and returns the same structure scoped to that county. get_gravel_usage_by_application_national breaks down natural gravel extraction by application category (Betong, Väg, Fyllnad, Övrigt, etc.) over time. get_gravel_usage_by_region_snapshot returns a cross-county snapshot for the most recent year, while get_gravel_share_map_data provides per-county percentage shares keyed by Highcharts map codes such as se-st for Stockholm.
Arbitrary Indicator Data
get_indicator_detail and get_indicator_download_data are functionally equivalent: both accept an absolute indicator page URL and return all chart configurations found on that page as an array of objects, each with title, subtitle, xAxis, and series. This covers any indicator on the site, not just gravel. For county-level breakdowns, get_indicator_regional_detail takes a goal_slug, county_slug, and indicator_slug and returns the same chart structure — if the indicator does not support regional data, the response data array will be empty. The get_annual_followup endpoint retrieves the summary text from the fakta-och-statistik annual review page along with the source URL.
- Track annual trends in natural gravel vs. crushed rock extraction across Swedish counties using
get_regional_gravel_production. - Map natural gravel share by county using Highcharts map codes from
get_gravel_share_map_data. - Build a dashboard of all Swedish environmental quality objectives by iterating over results from
list_environmental_goalsandlist_all_indicators. - Pull time-series data for any environmental indicator by passing its page URL to
get_indicator_detail. - Compare gravel usage by application type (concrete, road, fill, other) over time using
get_gravel_usage_by_application_national. - Generate county-level reports on environmental indicator status using
get_indicator_regional_detailwith a specificcounty_slug. - Retrieve the latest annual environmental follow-up summary text programmatically via
get_annual_followup.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does sverigesmiljomal.se have an official developer API?+
What does `get_indicator_regional_detail` return when a county-level breakdown is not available for an indicator?+
data field that is an empty array. Not all indicators on sverigesmiljomal.se expose county-level chart data, so callers should check for an empty array before processing results.Does the API return goal assessment status or definition text for environmental goals other than groundwater?+
get_groundwater_goal_overview targets a specific goal overview page, and even that endpoint notes that definition and assessment_status may be empty depending on page rendering. The other goal overview pages are not individually addressed by dedicated endpoints. You can fork this API on Parse and revise it to add dedicated overview endpoints for other goals such as Begränsad klimatpåverkan or Ingen övergödning.Does the API expose historical gravel data broken down by both county and application type simultaneously?+
get_gravel_usage_by_region_snapshot provides application-type breakdowns across all 21 counties but only for the most recent available year. get_regional_gravel_production provides multi-year time-series per county but not by application type. A combined county-by-application time-series is not currently covered. You can fork this API on Parse and revise it to add an endpoint combining both dimensions if the underlying indicator page exposes that data.What county slugs are valid for endpoints like `get_regional_gravel_production`?+
stockholms-lan, skane-lan, vasterbottens-lan, and equivalents for all 21 Swedish counties (län). The slug format matches the Swedish county name lowercased with spaces replaced by hyphens.