How State of Health sources food data
- Kenny Gunderman
- Aug 7
- 2 min read
One of my favorite parts about building State of Health is that it connects directly to the USDA’s FoodData Central database, which means you can instantly search through over 250,000 branded food items in the US right from the app.
And the best part?
It’s completely free for anyone to use. I was actually pretty surprised when I found this out. The USDA actually lets anyone sign up for an API key here: https://fdc.nal.usda.gov/api-key-signup. It’s rare for a government API to be this open and well-maintained, so I think that’s pretty cool.
They even give very generous rate limits - 1,000 requests per hour per IP address. In other words, all of my users can search for foods as much as they want without ever worrying about hitting a limit.
How the app actually connects
When you search for a food in State of Health, here’s what’s happening under the hood:
You type something like “string cheese”.
The app sends that search directly to the USDA API.
I fetch and parse these records on the client and display the most relevant branded items to you.
I keep all of this behind the scenes so your experience is fast and seamless — and also to keep my API key secure. The server also cleans up and organizes the USDA’s raw data before sending it to the app so everything is easy to read.
Tips for finding the right item
The USDA database is massive, but not every result is exactly what you’re looking for. The best approach is to type in something you actually ate like: “string cheese” and then pick the closest match from the results.
Calorie tracking is never going to be 100% exact. That’s fine. The key is finding something similar and not being overly generous with your portion sizes. Over time, those small differences average out.
When you can’t find it
Sometimes the exact thing you ate isn’t in the USDA database and that’s where State of Health’s custom foods feature comes in.
You can:
Create your own food item
Enter its macros (calories, protein, carbs, fat)
Save it to your account
Once you’ve added it, it’ll be there forever. You can log it again and again without retyping anything.
Tracking your day visually
Every time you log a food, the app updates a visual graph showing how many calories you have left for the day. You can set your daily calorie goal, and as you track meals, you’ll see your “calories left” drop in real time. It’s a simple way to stay on track without having to do math in your head.

In short:
Search from 250,000+ branded foods (thanks to the USDA’s free API).
Never hit rate limits.
Create your own foods if needed.
Watch your calories left for the day update in real time.
That’s how State of Health keeps food logging fast, accurate enough, and actually enjoyable.

Comments