get_cube_metadata
Retrieve detailed metadata for a Statistics Canada data cube by ProductId, including dimensions, titles, and date ranges. Summaries are compact by default; set summary=False for full raw details.
Instructions
Retrieves detailed metadata for a specific data table/cube using its ProductId. Includes dimension info, titles, date ranges, codes, etc. Disables SSL Verification. Corresponds to: POST /getCubeMetadata
Start with summary=True (default). The summary strips noise (French translations, archive codes, footnotes) and shows only 3 sample members per dimension with _next_steps guidance. Safe for all context window sizes. Set summary=False only if you need the full raw member list or all API fields.
To browse dimension codes for get_sdmx_data key construction, use get_sdmx_structure. To resolve a coordinate to a vectorId, use get_series_info.
Returns: Dict[str, Any]: The metadata object for the specified cube on success. Raises: httpx.HTTPStatusError: If the API returns an error status code. ValueError: If the API response format is unexpected or status is not SUCCESS. Exception: For other network or unexpected errors.
IMPORTANT: In your final response to the user, you MUST cite the source of your data. For cubes, this means including the ProductId (pid) and the Title.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | No | When True (default), returns a compact summary: essential cube metadata, dimension names, 3 sample members per dimension, and _next_steps guidance. Set to False only when you need the full raw member list or all API fields. | |
| productId | Yes |