get_statistical_data
Fetch statistical data from BFS datasets with optional dimension filtering. Use dataset metadata to discover filter options.
Instructions
Retrieve statistical data from a BFS dataset using the PXWEB API. You can optionally filter by specific dimensions. Use get_dataset_metadata first to see available dimensions and values for filtering. Returns data in JSON-stat format by default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| numberBfs | Yes | BFS number (FSO number) of the dataset (e.g., "px-x-1502040100_131") | |
| language | No | Language for results and labels | en |
| query | No | Optional dimension filters as key-value pairs. Keys are dimension codes, values are dimension value codes (string or array of strings). Example: {"Jahr": ["40", "41"], "Geschlecht": ["0", "1"]} | |
| format | No | Response format (default: json-stat) | json-stat |