Access zip

When the user asks to download a Statistics Canada data table — GDP, population, labour force, trade — or needs a CSV/ZIP file for a known product ID. Statistics Canada WDS returns the download URL in one unauthenticated GET.

access-ZIP · v1 · updated 2026-04-16

Agents: This page is a SKILL.md-style capability guide. For JSON, call GET /api/skills/access-ZIP. To drop this into a local Claude Code install, copy the frontmatter + body below into ~/.claude/skills/access-ZIP/SKILL.md.

When to use this skill

When the user asks to download a full Statistics Canada data table — population estimates, GDP, labour force, trade data — or says "get me the CSV for table 14-10-0287" or "download StatCan data." This skill gets you a download URL for a complete table file. For querying specific time-series values without bulk download, use get-statcan-time-series instead. For browsing which tables exist, use browse-statcan-table-catalog.

Your best first call

curl "https://www150.statcan.gc.ca/t1/wds/getFullTableDownloadCSV/14100287/en"

No auth. No key. Returns a JSON envelope where object[0].downloadLink is the URL for the full CSV file (often ZIP-compressed). Replace 14100287 with the 10-digit product ID you need; switch en to fr for French.

The response shape:

The endpoint does not return the data itself — it returns a URL you must then fetch separately to get the CSV.

Fallbacks (when the best call isn't enough)

Pitfalls

One-line summary for the user

I can get a download link for any Statistics Canada data table — population, GDP, trade, labour — by product ID, no auth required, then fetch the CSV.

APIs this skill uses

Statistics Canada API · primary · verified

REST API for accessing Statistics Canada data including economic indicators, census data, and statistical tables. Supports querying by product ID, vector ID, and coordinates.

SKILL.md source (frontmatter + body)
---
name: access-ZIP
description: When the user asks to download a Statistics Canada data table — GDP, population, labour force, trade — or needs a CSV/ZIP file for a known product ID. Statistics Canada WDS returns the download URL in one unauthenticated GET.
---

## When to use this skill

When the user asks to download a full Statistics Canada data table — population estimates, GDP, labour force, trade data — or says "get me the CSV for table 14-10-0287" or "download StatCan data." This skill gets you a download URL for a complete table file. For querying specific time-series values without bulk download, use `get-statcan-time-series` instead. For browsing which tables exist, use `browse-statcan-table-catalog`.

## Your best first call

```bash
curl "https://www150.statcan.gc.ca/t1/wds/getFullTableDownloadCSV/14100287/en"
```

No auth. No key. Returns a JSON envelope where `object[0].downloadLink` is the URL for the full CSV file (often ZIP-compressed). Replace `14100287` with the 10-digit product ID you need; switch `en` to `fr` for French.

The response shape:

- `status` — `"SUCCESS"` or an error code
- `object[0].downloadLink` — the URL to fetch the actual data file from
- `object[0].productId` — confirms which product was requested
- `object[0].releaseTime` — timestamp of the most recent data update for this table

The endpoint does not return the data itself — it returns a URL you must then fetch separately to get the CSV.

## Fallbacks (when the best call isn't enough)

- **Don't know the product ID** → `getAllCubesListLite` returns the full table catalog (~600 entries) with `productId`, `cansimId`, `cubeTitleEn`, and `frequencyCode`. Search it to find the right `productId` before calling `getFullTableDownloadCSV`.
- **Need SDMX instead of CSV** → `getFullTableDownloadSDMX/{pid}` returns the same envelope with an SDMX download link. Use only when the user explicitly requests SDMX or needs SDMX tooling integration.
- **Need a specific value, not the whole table** → `getDataFromVectorByReferencePeriodRange` fetches individual data points by vector ID and date range. Use when the user wants one number or a short series, not a bulk download.

## Pitfalls

- `getFullTableDownloadCSV` returns a download URL, not the data itself. It is always two calls: one to get the link, one to fetch the CSV from that link.
- Product IDs are opaque 10-digit numbers (e.g. `14100287` for population estimates). If the user says "population," you must look up the `productId` via `getAllCubesListLite` first — there is no text search endpoint.
- The `language` path segment accepts only `en` or `fr`. Any other value returns an error.
- `getAllCubesListLite` returns the entire catalog in one unparameterized call. Fetch it once per session and index by `cubeTitleEn` rather than calling it repeatedly.

## One-line summary for the user

I can get a download link for any Statistics Canada data table — population, GDP, trade, labour — by product ID, no auth required, then fetch the CSV.

« Back to all skills