curl --request POST \
--url https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"latest_n": 3,
"members": {
"Geography": [
"Canada",
"Edmonton, Alberta"
],
"Products and product groups": "All-items"
},
"table": "18100004"
}
'import requests
url = "https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data"
payload = {
"latest_n": 3,
"members": {
"Geography": ["Canada", "Edmonton, Alberta"],
"Products and product groups": "All-items"
},
"table": "18100004"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
latest_n: 3,
members: {
Geography: ['Canada', 'Edmonton, Alberta'],
'Products and product groups': 'All-items'
},
table: '18100004'
})
};
fetch('https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'latest_n' => 3,
'members' => [
'Geography' => [
'Canada',
'Edmonton, Alberta'
],
'Products and product groups' => 'All-items'
],
'table' => '18100004'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data"
payload := strings.NewReader("{\n \"latest_n\": 3,\n \"members\": {\n \"Geography\": [\n \"Canada\",\n \"Edmonton, Alberta\"\n ],\n \"Products and product groups\": \"All-items\"\n },\n \"table\": \"18100004\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"latest_n\": 3,\n \"members\": {\n \"Geography\": [\n \"Canada\",\n \"Edmonton, Alberta\"\n ],\n \"Products and product groups\": \"All-items\"\n },\n \"table\": \"18100004\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"latest_n\": 3,\n \"members\": {\n \"Geography\": [\n \"Canada\",\n \"Edmonton, Alberta\"\n ],\n \"Products and product groups\": \"All-items\"\n },\n \"table\": \"18100004\"\n}"
response = http.request(request)
puts response.read_body{
"attribution": "Source: Statistics Canada. Reproduced and distributed on an \"as is\" basis under the Statistics Canada Open Licence.",
"end_period": null,
"latest_n": 3,
"legend": {
"confidential": "suppressed to meet the confidentiality requirements of the Statistics Act (x)",
"status": {
"..": "not available for a specific reference period",
"...": "not applicable",
"0s": "value rounded to 0 where there is a meaningful distinction between true zero and the rounded value",
"<LOD": "less than the limit of detection",
"A": "data quality: excellent",
"B": "data quality: very good",
"C": "data quality: good",
"D": "data quality: acceptable",
"E": "use with caution",
"F": "too unreliable to be published"
},
"symbol": {
"p": "preliminary",
"r": "revised"
}
},
"missing": [],
"observed_at_ms": 1792968985914,
"selection": [
{
"defaulted": false,
"dimension": "Geography",
"members": [
{
"member_id": 2,
"name_en": "Canada"
},
{
"member_id": 24,
"name_en": "Edmonton, Alberta"
}
],
"position": 1
},
{
"defaulted": false,
"dimension": "Products and product groups",
"members": [
{
"member_id": 2,
"name_en": "All-items"
}
],
"position": 2
}
],
"series": [
{
"coordinate": "2.2.0.0.0.0.0.0.0.0",
"decimals": 1,
"frequency": "Monthly",
"members": [
{
"dimension": "Geography",
"member_id": 2,
"name_en": "Canada",
"name_fr": "Canada",
"position": 1
},
{
"dimension": "Products and product groups",
"member_id": 2,
"name_en": "All-items",
"name_fr": "Ensemble",
"position": 2
}
],
"point_count": 3,
"points": [
{
"confidential": false,
"ref_period": "2026-07-01",
"ref_period_end": null,
"release_time": "2026-08-17T08:30",
"status": null,
"symbol": null,
"value": 169.9
},
{
"confidential": false,
"ref_period": "2026-08-01",
"ref_period_end": null,
"release_time": "2026-09-14T08:30",
"status": null,
"symbol": null,
"value": 169.8
},
{
"confidential": false,
"ref_period": "2026-09-01",
"ref_period_end": null,
"release_time": "2026-10-19T08:30",
"status": null,
"symbol": null,
"value": 170
}
],
"product_id": 18100004,
"scalar_factor": "units",
"table_id": "18-10-0004-01",
"terminated": false,
"title_en": "Canada;All-items",
"title_fr": "Canada;Ensemble",
"unit": "2002=100",
"vector": "v41690973",
"vector_id": 41690973
},
{
"coordinate": "24.2.0.0.0.0.0.0.0.0",
"decimals": 1,
"frequency": "Monthly",
"members": [
{
"dimension": "Geography",
"member_id": 24,
"name_en": "Edmonton, Alberta",
"name_fr": "Edmonton, Alberta",
"position": 1
},
{
"dimension": "Products and product groups",
"member_id": 2,
"name_en": "All-items",
"name_fr": "Ensemble",
"position": 2
}
],
"point_count": 3,
"points": [
{
"confidential": false,
"ref_period": "2026-07-01",
"ref_period_end": null,
"release_time": "2026-08-17T08:30",
"status": null,
"symbol": null,
"value": 177.8
},
{
"confidential": false,
"ref_period": "2026-08-01",
"ref_period_end": null,
"release_time": "2026-09-14T08:30",
"status": null,
"symbol": null,
"value": 177.2
},
{
"confidential": false,
"ref_period": "2026-09-01",
"ref_period_end": null,
"release_time": "2026-10-19T08:30",
"status": null,
"symbol": null,
"value": 176.6
}
],
"product_id": 18100004,
"scalar_factor": "units",
"table_id": "18-10-0004-01",
"terminated": false,
"title_en": "Edmonton, Alberta;All-items",
"title_fr": "Edmonton, Alberta;Ensemble",
"unit": "2002=100",
"vector": "v41692918",
"vector_id": 41692918
}
],
"series_count": 2,
"source_url": "https://www150.statcan.gc.ca/t1/wds/rest/getDataFromVectorsAndLatestNPeriods",
"start_period": null,
"table": {
"archived": false,
"frequency": "Monthly",
"product_id": 18100004,
"release_time": "2026-10-19T08:30",
"table_id": "18-10-0004-01",
"title_en": "Consumer Price Index, monthly, not seasonally adjusted",
"title_fr": "Indice des prix à la consommation mensuel, non désaisonnalisé",
"url": "https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1810000401"
}
}Table data
To get numbers from a table: CPI for Edmonton, Alberta population, labour force by province, farm cash receipts. Use table_metadata first when member names are unknown.
curl --request POST \
--url https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"latest_n": 3,
"members": {
"Geography": [
"Canada",
"Edmonton, Alberta"
],
"Products and product groups": "All-items"
},
"table": "18100004"
}
'import requests
url = "https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data"
payload = {
"latest_n": 3,
"members": {
"Geography": ["Canada", "Edmonton, Alberta"],
"Products and product groups": "All-items"
},
"table": "18100004"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
latest_n: 3,
members: {
Geography: ['Canada', 'Edmonton, Alberta'],
'Products and product groups': 'All-items'
},
table: '18100004'
})
};
fetch('https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'latest_n' => 3,
'members' => [
'Geography' => [
'Canada',
'Edmonton, Alberta'
],
'Products and product groups' => 'All-items'
],
'table' => '18100004'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data"
payload := strings.NewReader("{\n \"latest_n\": 3,\n \"members\": {\n \"Geography\": [\n \"Canada\",\n \"Edmonton, Alberta\"\n ],\n \"Products and product groups\": \"All-items\"\n },\n \"table\": \"18100004\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"latest_n\": 3,\n \"members\": {\n \"Geography\": [\n \"Canada\",\n \"Edmonton, Alberta\"\n ],\n \"Products and product groups\": \"All-items\"\n },\n \"table\": \"18100004\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"latest_n\": 3,\n \"members\": {\n \"Geography\": [\n \"Canada\",\n \"Edmonton, Alberta\"\n ],\n \"Products and product groups\": \"All-items\"\n },\n \"table\": \"18100004\"\n}"
response = http.request(request)
puts response.read_body{
"attribution": "Source: Statistics Canada. Reproduced and distributed on an \"as is\" basis under the Statistics Canada Open Licence.",
"end_period": null,
"latest_n": 3,
"legend": {
"confidential": "suppressed to meet the confidentiality requirements of the Statistics Act (x)",
"status": {
"..": "not available for a specific reference period",
"...": "not applicable",
"0s": "value rounded to 0 where there is a meaningful distinction between true zero and the rounded value",
"<LOD": "less than the limit of detection",
"A": "data quality: excellent",
"B": "data quality: very good",
"C": "data quality: good",
"D": "data quality: acceptable",
"E": "use with caution",
"F": "too unreliable to be published"
},
"symbol": {
"p": "preliminary",
"r": "revised"
}
},
"missing": [],
"observed_at_ms": 1792968985914,
"selection": [
{
"defaulted": false,
"dimension": "Geography",
"members": [
{
"member_id": 2,
"name_en": "Canada"
},
{
"member_id": 24,
"name_en": "Edmonton, Alberta"
}
],
"position": 1
},
{
"defaulted": false,
"dimension": "Products and product groups",
"members": [
{
"member_id": 2,
"name_en": "All-items"
}
],
"position": 2
}
],
"series": [
{
"coordinate": "2.2.0.0.0.0.0.0.0.0",
"decimals": 1,
"frequency": "Monthly",
"members": [
{
"dimension": "Geography",
"member_id": 2,
"name_en": "Canada",
"name_fr": "Canada",
"position": 1
},
{
"dimension": "Products and product groups",
"member_id": 2,
"name_en": "All-items",
"name_fr": "Ensemble",
"position": 2
}
],
"point_count": 3,
"points": [
{
"confidential": false,
"ref_period": "2026-07-01",
"ref_period_end": null,
"release_time": "2026-08-17T08:30",
"status": null,
"symbol": null,
"value": 169.9
},
{
"confidential": false,
"ref_period": "2026-08-01",
"ref_period_end": null,
"release_time": "2026-09-14T08:30",
"status": null,
"symbol": null,
"value": 169.8
},
{
"confidential": false,
"ref_period": "2026-09-01",
"ref_period_end": null,
"release_time": "2026-10-19T08:30",
"status": null,
"symbol": null,
"value": 170
}
],
"product_id": 18100004,
"scalar_factor": "units",
"table_id": "18-10-0004-01",
"terminated": false,
"title_en": "Canada;All-items",
"title_fr": "Canada;Ensemble",
"unit": "2002=100",
"vector": "v41690973",
"vector_id": 41690973
},
{
"coordinate": "24.2.0.0.0.0.0.0.0.0",
"decimals": 1,
"frequency": "Monthly",
"members": [
{
"dimension": "Geography",
"member_id": 24,
"name_en": "Edmonton, Alberta",
"name_fr": "Edmonton, Alberta",
"position": 1
},
{
"dimension": "Products and product groups",
"member_id": 2,
"name_en": "All-items",
"name_fr": "Ensemble",
"position": 2
}
],
"point_count": 3,
"points": [
{
"confidential": false,
"ref_period": "2026-07-01",
"ref_period_end": null,
"release_time": "2026-08-17T08:30",
"status": null,
"symbol": null,
"value": 177.8
},
{
"confidential": false,
"ref_period": "2026-08-01",
"ref_period_end": null,
"release_time": "2026-09-14T08:30",
"status": null,
"symbol": null,
"value": 177.2
},
{
"confidential": false,
"ref_period": "2026-09-01",
"ref_period_end": null,
"release_time": "2026-10-19T08:30",
"status": null,
"symbol": null,
"value": 176.6
}
],
"product_id": 18100004,
"scalar_factor": "units",
"table_id": "18-10-0004-01",
"terminated": false,
"title_en": "Edmonton, Alberta;All-items",
"title_fr": "Edmonton, Alberta;Ensemble",
"unit": "2002=100",
"vector": "v41692918",
"vector_id": 41692918
}
],
"series_count": 2,
"source_url": "https://www150.statcan.gc.ca/t1/wds/rest/getDataFromVectorsAndLatestNPeriods",
"start_period": null,
"table": {
"archived": false,
"frequency": "Monthly",
"product_id": 18100004,
"release_time": "2026-10-19T08:30",
"table_id": "18-10-0004-01",
"title_en": "Consumer Price Index, monthly, not seasonally adjusted",
"title_fr": "Indice des prix à la consommation mensuel, non désaisonnalisé",
"url": "https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1810000401"
}
}Request contract
- Method and path: POST /apis/v1/statcan-gc-ca/economic-statistics/table-data
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/statcan-gc-ca/economic-statistics/table-data
{
"operationId": "statcan-gc-ca.economic-statistics.table-data",
"method": "POST",
"path": "/apis/v1/statcan-gc-ca/economic-statistics/table-data",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"latest_n": 3,
"members": {
"Geography": [
"Canada",
"Edmonton, Alberta"
],
"Products and product groups": "All-items"
},
"table": "18100004"
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"coordinates": {
"description": "Raw WDS coordinates instead of members.",
"items": {
"type": "string"
},
"type": "array",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"end_period": {
"description": "Range end, YYYY, YYYY-MM or YYYY-MM-DD; defaults to the latest period.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"latest_n": {
"description": "The latest N reference periods of each series (default 12 when no range is given).\n\nProvider reference: minimum 1; maximum 1000.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 1000,
"min": 1
}
},
"members": {
"additionalProperties": true,
"description": "Dimension name or position -> member name, member_id, or a list of them.",
"type": "object",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"start_period": {
"description": "Range start, YYYY, YYYY-MM or YYYY-MM-DD (reference period). Use instead of latest_n.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"table": {
"description": "Table id in any StatCan spelling: 18100004, 1810000401, 18-10-0004-01 or 18-10-0004.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"url": {
"description": "A StatCan table-viewer URL (https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1810000401), instead of table.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
}
},
"type": "object"
}
}
},
"required": false
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based pricing. Default request estimate: $0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.Authorizations
Body
A StatCan table-viewer URL (https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1810000401), instead of table.
Response
Values of one or more series of a Statistics Canada table, chosen by member names instead of raw coordinates. members maps a dimension (its English or French name, or its position) to one member or a list of members (name, unique part of a name, or member_id); every combination is fetched, up to 50 series. Dimensions left out use their first member (usually Canada or the total). A table-viewer URL's pickMembers selection is honoured when members is omitted; coordinates (e.g. 2.2.0.0.0.0.0.0.0.0) are accepted instead. Returns the latest_n periods (default 12) or a start_period/end_period range per series, each with its vector id, title, unit, scale, decimals, member names and data points (reference period, value, preliminary/revised symbol, status and confidentiality flags, release time). Series the table does not hold are listed in missing; when none exist the call is not_found. Requests over 20,000 data points are refused; narrow the range. WDS getCubeMetadata, getSeriesInfoFromCubePidCoord and getDataFromVectorsAndLatestNPeriods / getDataFromVectorByReferencePeriodRange; full-table CSV downloads are never fetched.
The response contains the tool result directly.
| Documented field | Provider type | Description |
|---|---|---|
attribution | string | |
end_period | string | |
latest_n | number | |
legend | object | Meaning of the symbol, status and confidential flags on data points. |
missing | object[] | |
observed_at_ms | number | |
selection | object[] | The members chosen per dimension (empty when coordinates were given). |
series | object[] | |
series_count | number | |
source_url | string | |
start_period | string | |
table | object |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.