Canadian Nutrient File API
Health Canada's official nutrient values for foods eaten in Canada: one record per food with energy, protein, fat, carbohydrate, sugars, fibre and sodium, every other nutrient with its unit and the household serving sizes. English or French.
$2 per 1,000 records
You pay only for the records you get. Zero records cost zero. 2,500 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.
Data from food-nutrition.canada.ca/api/canadian-nutrient-file/food/?lang=en&type=json
Get this data
Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.
Try it
Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 2,500 records of this API, no card. Create a free key
For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
- Small runs answer in the same request; longer ones answer
202with a run to poll. fieldsreturns only the fields you name. The examples send the ones picked on this page.Idempotency-Keyis optional. A retry with it is never charged twice.- You pay for records returned. Zero records cost zero.
curl -X POST "https://pullrow.dev/v1/apis/canadian-nutrient-file/run" \
-H "Authorization: Bearer $PULLROW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"search":"chicken"},"max_items":50}'Inputs
Send them as input in the request body. Leave one out to use its default.
What's in each record
12 fields: 11 here, 1 technical one under Technical details.
Basics
- Food code
Canadian Nutrient File food code.
Example 5
- Food description
Name of the food, such as Chicken, broiler, giblets, raw.
Example Chinese dish, chow mein, chicken
- Energy kcal
Energy in kilocalories per 100 g.
Example 85
- Protein g
Protein in grams per 100 g.
Example 6.76
- Fat g
Total fat in grams per 100 g.
Example 2.8
- Carbohydrate g
Carbohydrate in grams per 100 g.
Example 8.29
- Sugars g
Total sugars in grams per 100 g.
Example 1.74
- Fibre g
Dietary fibre in grams per 100 g.
Example 1
- Sodium mg
Sodium in milligrams per 100 g.
Example 311
- Nutrients
Every nutrient of the food as objects with name, value (per 100 g), unit, standard_error and observations.
Example 2 items: {} | {}
- Serving sizes
Household servings with their weight, such as 1 food guide serving = 90g.
Example 100ml, 125ml
Technical detailsField names and types for developers, and the 1 field hidden above
Hidden by default
This field comes with each record too. It is an internal code, a note about how the record was read or a copy of what was searched for, so the lists above leave it out.
- ID
idFood code as text.
Field names and types
The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.
| Field name | Type | Shown on this page as | Filled |
|---|---|---|---|
id | text | ID (hidden) | 3 of 3 |
food_code | number | Food code | 3 of 3 |
food_description | text | Food description | 3 of 3 |
energy_kcal | number | Energy kcal | 3 of 3 |
protein_g | number | Protein g | 3 of 3 |
fat_g | number | Fat g | 3 of 3 |
carbohydrate_g | number | Carbohydrate g | 3 of 3 |
sugars_g | number | Sugars g | 2 of 3 |
fibre_g | number | Fibre g | 3 of 3 |
sodium_mg | number | Sodium mg | 3 of 3 |
nutrients | list | Nutrients | 3 of 3 |
serving_sizes | list | Serving sizes | 3 of 3 |
How it reads the site
Runs on a reader we built and maintain by hand for this site.
Save as pipeline
A pipeline remembers this API, your inputs and the fields you picked. It can run on a schedule and email you the results.
Sample records
| Record | Food code | Food description | Energy kcal | Protein g | Fat g | Carbohydrate g | Sugars g | Fibre g | Sodium mg | Nutrients | Serving sizes |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 5 | Chinese dish, chow mein, chicken | 85 | 6.76 | 2.8 | 8.29 | 1.74 | 1 | 311 | 4 items: Name: Lycopene · Value: 0 · Unit: µg | Name: Lactose · Value: 0 · Unit: g | 100ml, 125ml, 250ml, 1 order |
| 2 | 8 | Fried chicken, mashed potatoes and vegetables | 173 | 12.8 | 8.5 | 11.3 | — | 1.04 | 344 | 4 items: Name: Alcohol · Value: 0 · Unit: g | Name: Caffeine · Value: 0 · Unit: mg | no serving specified |
| 3 | 83 | Egg, chicken, dried, whole | 605 | 48.37 | 43.04 | 1.53 | 0.3 | 0 | 480 | 4 items: Name: Theobromine · Value: 0 · Unit: mg | Name: Fibre, total dietary · Value: 0 · Unit: g | 15ml, sifted, 100ml sifted, 250ml, sifted |
Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.
Reliability
Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.
Incidents and repairs
How it is kept working What a repair can't do
A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.
- You pay only for records returned. A run that returns none costs nothing.
- The file holds about 5,690 foods. Search by words in the food name (every word must appear) or give exact food codes; with neither input the run is refused.
- Each food takes two extra requests (its nutrients and its serving sizes), so a run of 100 foods makes about 200 requests and needs a minute or two. At most 1,000 foods per run.
- All nutrient values are per 100 g of the food as the Canadian Nutrient File states them (the 2015 release has not been updated since). A nutrient the lab never measured is listed with value 0 and 0 observations, so check observations before trusting a zero.
- The source gives no food group, so no group field is offered. Serving sizes are empty for foods Health Canada lists without a household measure.
- The seven headline fields (energy_kcal, protein_g, fat_g, carbohydrate_g, sugars_g, fibre_g, sodium_mg) are taken from the nutrient list and are null when the food has no such value.
- Data: Health Canada, Canadian Nutrient File, under the Open Government Licence - Canada. Credit Health Canada when you use it; Health Canada does not endorse this API.
Version history
A run uses the live version unless the request names another one with version.
Manage this API
Only your workspace sees this part.
Automatic repair
Off: a rebuilt version is stored and waits for you in the version history.
Delete this API
Removes the API, its versions and the saved records of its runs. Calls to its address then answer 404. Records already charged stay charged. This cannot be undone.