scb.table_query
mock data$0.003 / callSCB Sweden Table Query
Run a statistical query against an SCB table — specify dimension filters to slice data by region, age, sex, year, etc. Returns JSON-stat2 format with labeled dimensions and numeric values. Always call scb.table_metadata first to discover valid dimension codes and value codes. Example: Sweden total population (Region='00', filter='vs:RegionRiket99'), latest year (Tid filter='top' values=['1']).
Input schema
Array of dimension filters. Each filter selects which values to include for one dimension. Example: [{code:'Region',selection:{filter:'vs:RegionRiket99',values:['00']}}, {code:'ContentsCode',selection:{filter:'item',values:['BE0101N1']}}, {code:'Tid',selection:{filter:'top',values:['1']}}]. Response is JSON-stat2 format with dimension labels and numeric values array.
Full path to the leaf table to query — same as scb.table_metadata table_path. Example: 'BE/BE0101/BE0101A/BefolkningNy'.
Call via REST
curl -X POST https://unifyapi.pro/api/call/scb.table_query \
-H "Authorization: Bearer uak_live_..." \
-H "Content-Type: application/json" \
-d '{"query":"<query>","table_path":"<table_path>"}'