Bpstat Pt
v0.2.1BPstat — Banco de Portugal statistics API (Portuguese central bank).
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_domains
List Banco de Portugal's statistical domains (the full subject tree). Each domain has id, parent_id (tree links; null = top level), label/short_label/description (Portuguese by default), num_series, num_datasets, and has_series. Start here, then use a domain id with list_datasets. lang defaults to PT; pass "EN" for English.
| Parameter | Type | Description |
|---|---|---|
lang | string | Language: "PT" (default) or "EN". |
list_datasets
List the datasets within a statistical domain (use a domain id from list_domains). Returns a JSON-stat collection; each item has extension.id (the dataset id, a hex string) and extension.num_series. The dataset id feeds get_dataset. lang defaults to PT.
| Parameter | Type | Description |
|---|---|---|
domain_id * | integer | Domain id from list_domains, e.g. 3 (Balança de pagamentos). |
lang | string | Language: "PT" (default) or "EN". |
get_dataset
Fetch a dataset as JSON-stat — THIS is how you get actual data/observations. Returns the value[] and status[] arrays plus the dimension objects; observations align to dimension.reference_date (the time axis, ISO dates). extension.series[] lists every series (id + Portuguese label) the dataset contains. Requires both the parent domain_id and the dataset id (from list_datasets). Large datasets can be sizeable. lang defaults to PT.
| Parameter | Type | Description |
|---|---|---|
dataset_id * | string | Dataset id, e.g. "05e2845d5d567afd88b699a91b0c20b8". |
domain_id * | integer | Parent domain id (from list_domains / list_datasets). |
lang | string | Language: "PT" (default) or "EN". |
get_series_metadata
Look up metadata for one or more series by numeric series id. Returns label, short_label, description (Portuguese by default), dataset_id, domain_ids, and dimension_category. Use this to identify a series and find which dataset_id holds its observations, then call get_dataset. NOTE: this endpoint returns metadata only — it does NOT return the numeric values. lang defaults to PT.
| Parameter | Type | Description |
|---|---|---|
series_ids * | string | One or more numeric series ids, comma-separated, e.g. "8201" or "8201,8202". |
lang | string | Language: "PT" (default) or "EN". |