← clify home · catalogue

pxdata-stat API for agents (unofficial) — JSON over curl | clify

Statistics Finland's PxWeb statistical databases (StatFin, Paavo postal-code data, etc.). The CLI uses the public PxWeb API v1 to browse databases, subject areas and tables, search tables, read table metadata and query table data.

Host: pxdata.stat.fi. Call these verified read commands with plain curl; no install, key, or account. Use the public JSON API with plain curl. No install, key, account, or browser is needed. Example: curl 'https://clify-dev.netlify.app/sites.json'. Start with /search?q=weather, then call /abc/COMMAND. Responses are one JSON object. The hosted MCP and GitHub repo are also available.

Commands

list-databases

List all databases on the server (StatFin, Postinumeroalueittainen_avoin_tieto, Hyvinvointialueet, ...) Params: lang

curl 'https://clify-dev.netlify.app/pxdata-stat/list-databases'

list-subject-areas

List the top-level subject areas (folders) of a database, e.g. StatFin subject areas like vaerak (population structure) Params: lang, database

curl 'https://clify-dev.netlify.app/pxdata-stat/list-subject-areas'

list-tables

List the tables (type 't') or sub-levels (type 'l') inside a subject area of a database Params: lang, database, area*

curl 'https://clify-dev.netlify.app/pxdata-stat/list-tables'

search-tables

Search a database's tables by free text, title words or variable value codes; query=* with filter=* lists every table with publish dates Params: lang, database, query*, filter

curl 'https://clify-dev.netlify.app/pxdata-stat/search-tables?query=population&filter=title'

get-table-metadata

Get a table's title and variables, with each variable's code, value codes and value texts (needed before querying data) Params: lang, database, area*, table*

curl 'https://clify-dev.netlify.app/pxdata-stat/get-table-metadata'

get-table-data

Query a table's data values, selecting on one variable (e.g. latest N years with filter=top on timeperiod_y); all other variables return all values Params: lang, database, area*, table*, code, filter, value, format

curl 'https://clify-dev.netlify.app/pxdata-stat/get-table-data'

get-api-limits

Get the API's usage limits: max cells/values per query, max calls per time window, CORS Params: lang

curl 'https://clify-dev.netlify.app/pxdata-stat/get-api-limits'