{"openapi":"3.1.0","info":{"title":"PxBridge Official Statistical Office Gateway (Tilastokeskus, SCB, SSB, BFS)","version":"1.0.0","description":"Grounds Microsoft 365 Copilot and AI agents in 25+ official national statistical databases (Statistics Finland StatFin, Paavo postal code open data, Municipal Key Figures, Natural Resources Institute Luke, Sweden SCB, Norway SSB, Switzerland BFS, Estonia Statistikaamet). Automatically resolves municipality and postal code names into PxWeb codes and appends CC BY 4.0 attribution."},"servers":[{"url":"https://mcp.pxbridge.eu"}],"paths":{"/api/v1/agencies":{"get":{"operationId":"listStatisticalAgencies","summary":"List supported official national statistical offices and databases","parameters":[{"name":"country_code","in":"query","required":false,"schema":{"type":"string","default":"ALL"},"description":"ISO country code filter (e.g. FI, SE, NO, CH, EE, ALL)"}],"responses":{"200":{"description":"List of statistical agencies","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/search":{"get":{"operationId":"searchStatisticalTables","summary":"Search official statistical tables across Statistics Finland (StatFin, Paavo, Kuntien avainluvut), SCB, SSB, and 25+ offices","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string"},"description":"Natural language search keywords (e.g. 'väestö kunnittain', 'postinumeroalue paavo', 'huoltosuhde')"},{"name":"agency_id","in":"query","required":false,"schema":{"type":"string","default":"all"},"description":"Agency identifier (e.g. fi_statfin, fi_paavo, fi_kuntien_avainluvut, se_scb, no_ssb, all)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":15}}],"responses":{"200":{"description":"Matching statistical tables from FTS5 index","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/metadata":{"get":{"operationId":"getTableMetadata","summary":"Inspect dimensions, time range, and selectable area/indicator codes for a statistical table","parameters":[{"name":"table_uid","in":"query","required":true,"schema":{"type":"string"},"description":"Table UID from search (e.g. 'fi_statfin:11ra.px', 'fi_paavo:12ey.px', 'fi_kuntien_avainluvut:142h.px')"},{"name":"search_values","in":"query","required":false,"schema":{"type":"string"},"description":"Optional filter for variable value labels (e.g. 'Tampere', '00100')"}],"responses":{"200":{"description":"Table dimensions and value codes","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/query":{"post":{"operationId":"executeStatisticalQuery","summary":"Execute a validated statistical query and return a Markdown/CSV table with CC BY 4.0 source attribution","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["table_uid"],"properties":{"table_uid":{"type":"string","description":"Table UID (e.g. 'fi_kuntien_avainluvut:142h.px')"},"selections":{"type":"object","description":"Dimension selections using human names or codes (e.g. {'Alue': ['Tampere', 'Oulu'], 'Vuosi': ['2020-2025']})"},"format":{"type":"string","enum":["markdown","csv"],"default":"markdown"},"lang":{"type":"string","default":"fi"},"access_token":{"type":"string","description":"Optional PxBridge API key (pxb_free_..., pxb_pro_..., pxb_b2g_...)"}}}}}},"responses":{"200":{"description":"Formatted statistical table with official CC BY 4.0 attribution","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}