Selecting an Indicator
The Data Hub allows economists and researchers to access a wide range of Labour Market Indicator values in Canada. Selecting an indicator to query is amongst the first steps in using the Data Hub. Only one indicator can be selected per query, and the data can be from multiple data sources. It is important to be mindful that indicators cannot all be queried in the same way. This section will demonstrate the basics of selecting an indicator for an API request.
Endpoint and Query Strings
As always, use the API's only endpoint is:
https://lmic-datahub-prod-gw-d6ow9n6v.uc.gateway.dev/lmi
Each request must contain the query parameter 'indicator', with a value of 1-18. These values refer to indicators provided by the API. When adding the indicator onto the endpoint, add a '?' so that the API knows where the URL ends and the query string begins.
Examples
The following examples are simple API requests which specify an indicator. The dates are arbtrary as no time period is specified and the geographical level of aggregation is the default: Canada.
Unemployment Level
Request:
curl --location --request POST 'https://lmic-datahub-prod-gw-d6ow9n6v.uc.gateway.dev/lmi?indicator=5' \
--header 'x-api-key: API_KEY' \
--data-raw ''
Response:
{
"data": [
{
"source": "LFS-14100287; LFS-14100017",
"as_of_date": "2022-03-01",
"ref_date": "2022-03-01",
"data_frequency": "monthly",
"country": "Canada",
"provinces_territories": null,
"cma_en": null,
"economic_regions_en": null,
"sex_en": "Both sexes",
"age_en": "15 years and over",
"noc_level": null,
"noc_code": null,
"noc_title_en": null,
"naics_level": null,
"naics_code": null,
"naics_title_en": null,
"adjustment_en": "unadjusted",
"indicator_name_en": "Unemployment level",
"indicator_value": 1171700.0
}
],
"meta": {
"current_page": 1,
"total_pages": 1,
"per_page": 1000,
"total_rows": 1
}
}
Population Level
Request:
curl --location --request POST 'https://lmic-datahub-prod-gw-d6ow9n6v.uc.gateway.dev/lmi?indicator=9' \
--header 'x-api-key: API_KEY' \
--data-raw ''
Response:
{
"data": [
{
"source": "LFS-14100017; LFS-14100287",
"as_of_date": "2022-03-01",
"ref_date": "2022-03-01",
"data_frequency": "monthly",
"country": "Canada",
"provinces_territories": null,
"cma_en": null,
"economic_regions_en": null,
"sex_en": "Both sexes",
"age_en": "15 years and over",
"noc_level": null,
"noc_code": null,
"noc_title_en": null,
"naics_level": null,
"naics_code": null,
"naics_title_en": null,
"adjustment_en": "unadjusted",
"indicator_name_en": "Population level",
"indicator_value": 31626900.0
}
],
"meta": {
"current_page": 1,
"total_pages": 1,
"per_page": 1000,
"total_rows": 1
}
}
Average Weekly Wages
Request:
curl --location --request POST 'https://lmic-datahub-prod-gw-d6ow9n6v.uc.gateway.dev/lmi?indicator=11' \
--header 'x-api-key: API_KEY' \
--data-raw ''
Response:
{
"data": [
{
"source": "LFS-14100065",
"as_of_date": "2022-03-01",
"ref_date": "2022-03-01",
"data_frequency": "monthly",
"country": "Canada",
"provinces_territories": null,
"cma_en": null,
"economic_regions_en": null,
"sex_en": "Both sexes",
"age_en": "15 years and over",
"noc_level": null,
"noc_code": null,
"noc_title_en": null,
"naics_level": null,
"naics_code": null,
"naics_title_en": null,
"adjustment_en": "unadjusted",
"indicator_name_en": "Mean weekly wages",
"indicator_value": 1128.93
}
],
"meta": {
"current_page": 1,
"total_pages": 1,
"per_page": 1000,
"total_rows": 1
}
}