MyFitnessPal API guide

myfitnesspal.com

Export your MyFitnessPal diary by food, find past meal entries, and see which foods contribute most to a nutrient total.

Actions and inputs

pull-diary

Sync your food diary to a local store for a date range.

Inputs --from, --to

export csv

Export one CSV row per logged food.

Inputs --from, --to, --out

find

Search your synced diary for a food and see when and how much you logged.

Inputs --food, --from

analytics top-foods

Find the foods that contribute most to a nutrient total.

Inputs --nutrient, --days, --cumulative-percent

Food diary entries

Create

Log a food in your personal diary.

Inputs Date, meal, food, serving size, number of servings

Read

Review foods, portions, and nutrient totals in your diary.

Inputs Date, optional meal

Update

Correct the serving size or quantity of a food you logged.

Inputs Date, meal, entry, revised serving size or quantity

Delete

Remove a food entry from your diary without changing the food database.

Inputs Date, meal, entry, confirmation