Discover/sverigesmiljomal API
live

sverigesmiljomal 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.

Endpoint health
verified 4d ago
list_environmental_goals
list_all_indicators
get_gravel_share_map_data
get_regional_gravel_production
get_gravel_usage_by_application_national
13/13 passing latest checkself-healing
Endpoints
13
Updated
26d ago

What is the sverigesmiljomal 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.

Try it

No input parameters required.

api.parse.bot/scraper/4123503b-86ae-46e1-b6f0-7f0f653066d6/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/4123503b-86ae-46e1-b6f0-7f0f653066d6/get_national_gravel_production' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace sverigesmiljomal-se-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Sveriges Miljömål SDK — bounded, re-runnable; every call capped."""
from parse_apis.sveriges_miljömål_api import SverigesMiljomal, IndicatorNotFound

client = SverigesMiljomal()

# Get national gravel production trends — the primary dataset.
national = client.gravelproductions.get_national()
print(f"National: {national.title} ({national.subtitle})")
for series in national.series:
    print(f"  {series.name}: {len(series.data)} data points")

# List environmental goals and drill into one goal's indicators.
goal = client.goals.list(limit=3).first()
if goal:
    print(f"\nGoal: {goal.name} (slug={goal.slug})")
    for indicator in goal.indicators.list(limit=3):
        print(f"  Indicator: {indicator.name} [{indicator.indicator_slug}]")

# Get regional gravel production for a specific county.
regional = client.gravelproductions.get_regional(county_slug="stockholms-lan")
print(f"\nRegional: {regional.title} — {regional.subtitle}")
for series in regional.series:
    print(f"  {series.name}: {len(series.data)} data points")

# Get indicator chart detail with typed-error handling.
try:
    detail = client.indicatordetails.get(
        url="https://sverigesmiljomal.se/miljomalen/grundvatten-av-god-kvalitet/grusanvandning/"
    )
    for chart in detail.data:
        print(f"\nChart: {chart.title} ({chart.subtitle})")
except IndicatorNotFound as exc:
    print(f"Indicator not found: {exc}")

# Get annual follow-up summary.
followup = client.annualfollowups.get()
print(f"\nAnnual followup: {followup.summary[:80]}...")
print(f"Source: {followup.url}")

print("\nexercised: gravelproductions.get_national / goals.list / goal.indicators.list / gravelproductions.get_regional / indicatordetails.get / annualfollowups.get")
All endpoints · 13 totalmissing one? ·

Retrieves national-level gravel production time-series data from the Grusanvändning indicator page. Returns annual delivered quantities for Naturgrus, Krossberg, and Morän in millions of tonnes as [year, value] pairs. One chart object with title, subtitle (Sverige), and series array.

Input

No input parameters required.

Response
{
  "type": "object",
  "fields": {
    "title": "string, chart title describing the data series",
    "xAxis": "array of category labels or null when data uses [x,y] pairs",
    "series": "array of objects each with name (string) 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 API

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.

Reliability & maintenanceVerified

The sverigesmiljomal API is a managed, monitored endpoint for sverigesmiljomal.se — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when sverigesmiljomal.se changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official sverigesmiljomal.se API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
4d ago
Latest check
13/13 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • 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_goals and list_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_detail with a specific county_slug.
  • Retrieve the latest annual environmental follow-up summary text programmatically via get_annual_followup.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does sverigesmiljomal.se have an official developer API?+
Sverigesmiljomal.se does not publish an official developer API or documented data endpoint for programmatic access. This Parse API provides structured access to the data on the site.
What does `get_indicator_regional_detail` return when a county-level breakdown is not available for an indicator?+
It returns an object with a 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?+
Currently, only 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`?+
County slugs follow the URL path conventions used by sverigesmiljomal.se, such as 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.
Page content last updated . Spec covers 13 endpoints from sverigesmiljomal.se.
Related APIs in Government PublicSee all →
mimer.svk.se API
Monitor Swedish electricity grid data by retrieving real-time consumption and production statistics, settlement prices, and frequency containment reserve information from Svenska kraftnät. Access comprehensive grid settlement data and exchange rates to analyze energy market trends and grid performance across Sweden.
smhi.se API
Get accurate weather forecasts, current conditions, and severe weather warnings for any location across Sweden. Search for specific Swedish locations to retrieve detailed meteorological analysis and real-time weather data.
global-warming.org API
Access real-time climate and environmental data including temperature, CO2, methane, nitrous oxide levels, arctic sea ice coverage, and ocean warming metrics. Browse climate news updates and explore detailed information on deforestation trends through an integrated environmental monitoring platform.
allabolag.se API
Search and retrieve detailed information about Swedish companies, including their industry classifications and historical financial records from annual reports. Access comprehensive company profiles to analyze financial performance and business data for any registered Swedish business.
govdata.de API
Search and retrieve official German government datasets including demographics, economic indicators, and business statistics, or browse available organizations and categories to discover relevant open data resources. Filter results by high-value datasets and access site statistics to learn about recently updated information from Germany's Federal Open Data Portal.
data.stats.gov.cn API
Access comprehensive statistical data, economic indicators, and official reports from China's National Bureau of Statistics through simple searches and structured queries. Retrieve detailed articles, data releases, indicator trends, and downloadable documents to analyze China's economic and social statistics.
omgevingsloketinzage.omgeving.vlaanderen.be API
Search and retrieve Flemish environmental permits by location or keyword, accessing detailed project information, procedural phases, and building action specifics directly from the government portal. Find everything you need to know about environmental permits and their status in Flanders in one place.
esankhyiki.mospi.gov.in API
Access India's official macroeconomic statistics including RBI indicators, National Accounts data, and labor force surveys directly from the government's statistical database. Browse dashboards, infographics, and detailed metadata to explore economic trends, employment figures, and key financial indicators.