hent_data
Fetch actual data values from StatFin tables as JSON-stat2. Apply filters by variable codes to select specific subsets.
Instructions
Fetch actual data values from a StatFin table as JSON-stat2. filtre is a flat object mapping each variable code (from hent_tabell) to a list of selected value codes, e.g. {Alue: ['SSS'], Vuosi: ['2024']}. Omit filtre for the table's default selection. Special selections: {filter:'top', values:['1']} for the latest value(s), {filter:'agg:...'} for groupings. Keep selections small — the API rejects queries over ~100 000 cells.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Language for titles/labels: 'en' (default), 'fi' or 'sv'. Table codes are language-independent. | |
| filtre | No | variabelkode → verdiliste, eller variabelkode → {filter, values} for spesialfiltre som 'top' | |
| tabell_id | Yes | Table id from sok_tabell, e.g. 'vaerak/statfin_vaerak_pxt_11ra.px' |