query_table
Pack: statfin-fi · Endpoint: https://gateway.pipeworx.io/statfin-fi/mcp
Get an actual figure out of a Statistics Finland (StatFin) table of Finnish official statistics — how many Finns hold a tertiary qualification, the current consumer price index, births and deaths, employment, and the rest of the Tilastokeskus catalogue. path is “folder/table.px” using the bare 4-character table id (e.g. “vkour/15ig.px”, “khi/11xs.px”); the longer “statfin_select with plain-English labels from the question — {“Information”: “tertiary level qualification”} against “vkour/15ig.px” returns the 1,672,232 Finns who hold one — and this pack resolves them against the table’s own metadata, defaults the year to the latest published and every other breakdown to its total, and reports each of those choices back in selection_resolved alongside a flattened figures list. select keys and values may be either the English label or the native Finnish code (“contentscode”, “kaste5T8”). Pass body instead for a raw PxWeb query object when you already know the codes.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
path | string | yes | folder/table.px with the bare 4-character table id, e.g. “vkour/15ig.px” or “khi/11xs.px”. |
select | object | no | Dimension → value, in plain English or native codes, e.g. {“Information”: “tertiary level qualification”, “Year”: “2024”} or {“contentscode”: “kaste5T8”}. A value may be an array to take several. Unnamed dimensions default to the latest year and to each dimension’s total. Omit entirely to get every measure in the table for the latest year. |
body | object | no | Raw PxWeb query, for callers who already have the codes: {query: [{code, selection: {filter: “item”, values: […]}}], response: {format: “json-stat2”}}. Takes precedence over select. Codes come from table_meta and are native Finnish. |
codes | unknown | no | |
selection | unknown | no | |
response | unknown | no |
Example call
Arguments
{
"path": "vkour/15ig.px",
"select": {
"Information": "tertiary level qualification"
}
}
curl
curl -X POST https://gateway.pipeworx.io/statfin-fi/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query_table","arguments":{"path":"vkour/15ig.px","select":{"Information":"tertiary level qualification"}}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('query_table', {
"path": "vkour/15ig.px",
"select": {
"Information": "tertiary level qualification"
}
});
More examples
{
"path": "vkour/15ig.px",
"select": {
"contentscode": "kaste5T8",
"Year": "2023",
"Gender": "Females"
}
}
{
"path": "vkour/15ig.px",
"body": {
"query": [
{
"code": "ikaryhma_10_20180101",
"selection": {
"filter": "item",
"values": [
"15-"
]
}
},
{
"code": "sukupuoli_9_20180101",
"selection": {
"filter": "item",
"values": [
"SSS"
]
}
},
{
"code": "syntypera_101_20180101",
"selection": {
"filter": "item",
"values": [
"SSS"
]
}
},
{
"code": "timeperiod_y",
"selection": {
"filter": "item",
"values": [
"2024"
]
}
},
{
"code": "contentscode",
"selection": {
"filter": "item",
"values": [
"kaste5T8"
]
}
}
],
"response": {
"format": "json-stat2"
}
}
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"statfin-fi": {
"url": "https://gateway.pipeworx.io/statfin-fi/mcp"
}
}
}
See Getting Started for client-specific install steps.