Guides
The Only Calorie Tracker With a Developer API
If you have ever tried to build something on top of your own calorie data, you already know the problem: there is no calorie tracker API to build on. The big consumer apps log your food, then lock it behind an interface you cannot script. Countwell is the exception. It ships a real, read-only developer API with personal keys, so your food log is data you can pull into anything you write.
Why doesn’t any calorie tracker have an API?
Because the ones that did have shut it off. MyFitnessPal ran an open developer program for years, then closed it during the Under Armour era and never reopened it to new developers. Today the MyFitnessPal API is a private, partner-only arrangement: you cannot sign up, and third-party scraping breaks their terms. The rest of the category is the same story. Cronometer has no official public API, only a reverse-engineered mobile endpoint and a third-party sync bridge. Lose It, Lifesum, and MacroFactor do not publish a developer API you can get a key for either.
So a builder who wants their own numbers, the meals they logged this week, their macro totals, their goal, has nowhere to go. That is the gap Countwell fills. If you want the fuller product comparison, see our roundup of the best MyFitnessPal alternatives. This post is about the part none of them offer: the API.
Your food log is your data. An API is what makes that sentence true instead of a marketing line.
What the Countwell API actually is
It is a small, honest, read-only API. Version 1 does not write to your log or change your account. It reads. You authenticate with a personal key that looks like cw_live_..., passed as a standard Bearer token. There is no OAuth flow to implement and no partner form to fill out: you mint a key on your account page, and every request carries it in the Authorization header.
A few specifics worth knowing before you write any code, all of them enforced server side:
- Read only. The v1 surface is GET requests against your own nutrition data. Your key carries a nutrition:read scope and nothing more.
- Bearer key auth. One header, Authorization: Bearer cw_live_..., on every call. The plaintext key is shown once at creation and stored only as a hash, so keep it somewhere safe.
- Rate limits. 100 requests per minute and 10,000 per day, per key. Every response returns the remaining budget in X-RateLimit headers, and a 429 tells you exactly how long to wait.
- Premium gated. The Developer API is part of Countwell Premium. An active subscription is what turns your key on.
The three endpoints
Version 1 is deliberately small. Three GET endpoints cover identity, a single day, and the whole log.
| Endpoint | What it returns |
|---|---|
| GET /api/v1/me | A connectivity check: who the key belongs to, its scopes, and the plan. The first call in any integration. |
| GET /api/v1/days/{date} | One calendar day in full: every entry plus totals, your active goal, and what remains. Use a real date or the literal today. |
| GET /api/v1/entries | The food log itself, newest first. Pass a date window for history, or updatedSince for delta sync with tombstones for deletes. |
Here is a real request. Fetch today, header and all, and the response is the day you would see in the app:
curl "https://countwell.app/api/v1/days/today" \
-H "Authorization: Bearer cw_live_your_key_here"{
"date": "2026-07-17",
"timezone": "America/New_York",
"entries": [
{
"id": "0d9f0a4e-6f2a-4c1e-9df3-1a2b3c4d5e6f",
"localDate": "2026-07-17",
"mealType": "LUNCH",
"foodName": "Chicken Burrito Bowl",
"brand": "Chipotle Mexican Grill",
"source": "FATSECRET",
"nutrition": { "kcal": 640, "proteinG": 42, "carbsG": 68, "fatG": 21.5 }
}
],
"totals": { "kcal": 1620.5, "proteinG": 128.2, "carbsG": 141.0, "fatG": 58.9 },
"goal": { "calories": 2100, "proteinG": 140, "carbsG": 210, "fatG": 70 },
"remaining": { "calories": 479.5, "proteinG": 11.8, "carbsG": 69.0, "fatG": 11.1 }
}What you can build with it
Read access to your own food log, on demand, is enough to build most of the things people wish their tracker did. A few concrete examples:
- A personal dashboard. Pull your daily totals and goal into a home page, a Notion widget, or a wall display, styled however you like.
- A Shortcut or automation. Wire a curl call into an Apple Shortcut or a cron job that texts you your remaining calories at 6pm, or logs the day to a spreadsheet.
- An agent. Give an LLM read access to your recent entries so it can answer questions about your intake, spot patterns, or draft next week’s plan from real data.
- A sync to another app. Use delta sync to mirror your log into your own database, a health dashboard, or a research project, and keep it current with a small poll.
How do I get started?
Two steps. Create a key, then make a request.
- Get a key. On an active Premium plan, open your account page at countwell.app/account and create an API key. Copy the cw_live_ value it shows you once, and store it somewhere safe.
- Call the API. Start with a connectivity check, then read whatever you need:
export COUNTWELL_KEY="cw_live_your_key_here"
# Who am I, and what can this key do?
curl "https://countwell.app/api/v1/me" \
-H "Authorization: Bearer $COUNTWELL_KEY"
# The last two weeks of entries, oldest first
curl "https://countwell.app/api/v1/entries?from=2026-07-03&to=2026-07-17" \
-H "Authorization: Bearer $COUNTWELL_KEY"The full reference, every field on the entry object, the pagination rules, and the error codes, lives at countwell.app/developers (also served at developer.countwell.app). It is the source of truth for the API; this post is the why.
Frequently asked questions
- Does MyFitnessPal have a public API?
- Not one you can sign up for. MyFitnessPal ran an open developer program years ago, then closed it to new developers. Today it is a private, partner-only arrangement, and scraping the app breaks its terms. Countwell offers a read-only public API with personal keys instead.
- Is the Countwell API free?
- The Developer API is part of Countwell Premium. An active Premium subscription is what activates your API keys. There is no separate developer fee or usage billing beyond the standard rate limits.
- Can the API write to my food log or change my account?
- No. Version 1 is read only. Keys carry a nutrition:read scope and can only read your own nutrition data: your identity, a single day, and your entries. There are no write or delete endpoints in v1.
- How do I authenticate?
- With a personal API key that looks like cw_live_ followed by a secret. You pass it as a Bearer token in the Authorization header on every request. There is no OAuth flow to implement. Create a key on your account page and the plaintext is shown once.
- What are the rate limits?
- 100 requests per minute and 10,000 requests per day, per key. Every response includes the remaining budget in X-RateLimit headers, and a 429 response tells you how many seconds to wait before retrying.
- Where are the full API docs?
- At countwell.app/developers, which is also served from developer.countwell.app. It documents every endpoint, the full entry object, keyset pagination, delta sync, and the error codes.