# Sverigesmiljomal — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access Sweden's environmental quality objectives (miljökvalitetsmål) and associated indicators from sverigesmiljomal.se. Retrieve national and regional data on gravel production, environmental indicators, groundwater goals, and annual follow-up reports. Supports time-series analysis across all 21 Swedish counties and all official environmental goal categories.

**Category:** Government & Public Data | **Website:** [sverigesmiljomal.se/](https://sverigesmiljomal.se/) | **Docs:** [parse.bot/marketplace/80704a86-a34e-447e-827d-b5d7a4e4dd8c/sverigesmiljomal-se-api](https://parse.bot/marketplace/80704a86-a34e-447e-827d-b5d7a4e4dd8c/sverigesmiljomal-se-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### Get annual followup

Retrieves the latest annual review report summary from the fakta-och-statistik page. Returns summary text describing the annual environmental goals follow-up and the source page URL.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/get_annual_followup \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get gravel share map data

Retrieves map data showing the percentage share of natural gravel per county. Uses Highcharts map codes (e.g. 'se-st' for Stockholm) for county identification. Returns series with [map_code, percentage] pairs.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/get_gravel_share_map_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get gravel usage by application national

Retrieves natural gravel extraction broken down by usage area at the national level. Returns time-series for application categories including Betong, Väg, Fyllnad, and Övrigt in millions of tonnes.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/get_gravel_usage_by_application_national \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get gravel usage by region snapshot

Retrieves a snapshot of natural gravel usage by region for the most recent available year. Returns usage in thousands of tonnes broken down by application for each of the 21 Swedish counties.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/get_gravel_usage_by_region_snapshot \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get groundwater goal overview

Retrieves the 'Grundvatten av god kvalitet' (Good Quality Groundwater) environmental goal overview page. Returns the goal name and its related indicators. Assessment status and definition may be empty if not rendered in the current page HTML.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/get_groundwater_goal_overview \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get indicator detail

Extracts all Highcharts chart configurations from any indicator page. Returns chart titles, subtitles, series data, and axis categories for every chart embedded in the page. Supports both absolute and relative URLs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Absolute or relative URL of the indicator page. Examples: 'https://sverigesmiljomal.se/miljomalen/grundvatten-av-god-kvalitet/grusanvandning/' or '/miljomalen/begransad-klimatpaverkan/klimatpaverkande-utslapp/'. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/get_indicator_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### Get indicator download data

Retrieves chart data for an indicator in a structured format suitable for data export. Functionally equivalent to get_indicator_detail — extracts all Highcharts chart data from the indicator page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Absolute or relative URL of the indicator page, e.g. 'https://sverigesmiljomal.se/miljomalen/grundvatten-av-god-kvalitet/grusanvandning/'. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/get_indicator_download_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### Get indicator regional detail

Retrieves regional data for an indicator that supports county-level breakdown. Returns chart data for the specified county. Not all indicators support regional data — for unsupported indicators, the data array will be empty.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `county_slug` | string | Yes | County slug, e.g. 'stockholms-lan', 'skane-lan', 'vasterbottens-lan'. |
| `goal_slug` | string | Yes | Goal slug, e.g. 'grundvatten-av-god-kvalitet', 'begransad-klimatpaverkan'. |
| `indicator_slug` | string | Yes | Indicator slug, e.g. 'grusanvandning', 'klimatpaverkande-utslapp'. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/get_indicator_regional_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"county_slug":"<string>","goal_slug":"<string>","indicator_slug":"<string>"}'
```

### Get national gravel production

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.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/get_national_gravel_production \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get regional gravel production

Retrieves gravel production data for a specific Swedish county (Län). Returns annual time-series of delivered quantities for Krossberg, Morän, and Naturgrus in thousands of tonnes. The county is specified by its URL slug.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `county_slug` | string | Yes | County slug as used in the site URL path. Values include: 'stockholms-lan', 'skane-lan', 'vasterbottens-lan', 'vastra-gotalands-lan', 'norrbottens-lan', 'hallands-lan', 'dalarnas-lan', 'jamtlands-lan', 'gavleborgs-lan', 'kronobergs-lan', 'jonkopings-lan', 'kalmar-lan', 'blekinge-lan', 'gotlands-lan', 'sodermanlands-lan', 'ostergotlands-lan', 'orebro-lan', 'vastmanlands-lan', 'varmlands-lan', 'vasternorrlands-lan', 'uppsala-lan'. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/get_regional_gravel_production \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"county_slug":"<string>"}'
```

### List all indicators

Lists all environmental indicators from the indicators index page. Each indicator includes its name, full URL, parent goal slug, and its own indicator slug. Useful for discovering available indicators and their slugs for use with other endpoints.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/list_all_indicators \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### List environmental goals

Lists Swedish environmental quality objectives from the miljömålen page. Returns 17 goals (Generationsmålet plus 16 environmental quality objectives) with their names, full URLs, and URL slugs.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/list_environmental_goals \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### List indicators for goal

Lists indicators associated with a specific environmental goal by filtering the full indicators list. Returns only indicators whose goal_slug matches the provided value. Use list_all_indicators or list_environmental_goals to discover valid goal slugs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `goal_slug` | string | Yes | Goal slug from list_environmental_goals results or list_all_indicators results. Examples: 'grundvatten-av-god-kvalitet', 'begransad-klimatpaverkan', 'frisk-luft', 'giftfri-miljo', 'generationsmalet'. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-sverigesmiljomal-se-api-80704a86/list_indicators_for_goal \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"goal_slug":"<string>"}'
```
