Imf Get Database
imf_get_databaseFetch a dataflow's dimension list with a codelist preview for each dimension. Resolves human-readable terms to SDMX codes (e.g. "United States" → USA, "Constant prices" → NGDP_RPCH). Required before imf_query_dataset — SDMX keys are opaque without codelist lookups. Each codelist is capped at the first 50 entries by default, including previews filtered by codelist_filter. Set dimension_id to retrieve one codelist with bounded limit/offset paging after the optional substring filter. Set available_only=true to page codes the dataflow actually publishes, with series and time coverage metadata; availability filtering happens before codelist_filter and paging. The imf://database/{dataflow_id} resource provides the same bounded discovery summary. Country codes are ISO 3-letter (USA, GBR, DEU), not ISO 2-letter (US, GB, DE). The key_format field shows the exact dimension order required by imf_query_dataset. Note: codelists enumerate the code universe, not actual coverage — valid codes can still return no_data if the combination has no series in this dataflow.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Entries to return from the selected dimension. Valid only with dimension_id; default 50, maximum 200. | |
| offset | No | Matching entries to skip in the selected dimension before this page. Valid only with dimension_id; default 0. | |
| version | No | Dataflow version, e.g. 9.0.0. Auto-detected from the dataflow list when omitted. | |
| agency_id | No | Agency ID that publishes this dataflow, e.g. IMF.RES or IMF.STA. Auto-detected from the dataflow list when omitted. | |
| dataflow_id | Yes | Dataflow identifier from imf_list_databases, e.g. WEO, BOP, CPI. Case-sensitive. | |
| dimension_id | No | Exact dimension ID from this tool, e.g. INDICATOR. Select one dimension to page beyond its preview. | |
| available_only | No | Return only codes reported by the dataflow-wide availability constraint. Default false keeps ordinary codelist discovery unchanged. | |
| codelist_filter | No | Optional case-insensitive substring to search within each dimension's codelist (code ID and name). Filtering runs before the 50-entry preview or selected-dimension page. Example: "CPI" or "Constant prices" surfaces matching WEO indicator codes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Human-readable dataflow name. | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Populated when a codelist_filter matched no entries anywhere, or when a dimension has no resolvable codelist, or when offset is past the final match. | |
| source | No | Attribution string required by IMF data terms: "Source: International Monetary Fund, <dataflow name>, <link>". | |
| version | No | Dataflow version string, e.g. 9.0.0. | |
| agency_id | No | Agency that publishes this dataflow, e.g. IMF.RES, IMF.STA. | |
| truncated | No | True when any returned dimension page omits matching codes. | |
| dimensions | No | All dimension previews, or the one selected dimension page. | |
| key_format | No | Dimension names in dot-separated keyPosition order, e.g. COUNTRY.INDICATOR.FREQUENCY. Use this exact format when constructing the key for imf_query_dataset. | |
| dataflow_id | No | Dataflow identifier, e.g. WEO, BOP, CPI. | |
| description | No | This dataflow's own description in full — not the shared DSD's, and not the shortened preview imf_list_databases returns for the same id. Absent when the dataflow publishes none. | |
| dsd_version | No | Version of the underlying data structure definition (DSD) that backs this dataflow. Differs from version when the dataflow references a shared DSD (e.g. IIP → DSD_BOP at 24.0.0). | |
| dimension_id | No | Selected dimension ID. Absent when previews for every dimension were returned. | |
| series_count | No | Total series published by the dataflow. Present when available_only is true. | |
| structure_ref | No | Identifier of the underlying DSD, e.g. DSD_BOP. Several dataflows can share one DSD. | |
| available_only | No | True when dimensions contain published availability coverage rather than codelists. | |
| codelist_filter | No | Echo of the codelist_filter that produced this result. Absent when no filter was applied — an empty codelist then means the codelist could not be resolved, not that the filter missed. | |
| time_period_end | No | Latest period with published data, or null when the constraint omits it. | |
| time_period_start | No | Earliest period with published data, or null when the constraint omits it. |