Calories Burned API
The Calories Burned API calculates the total calories burned for hundreds of sports and activities. It supports custom weight and duration.
Available endpoints:
- /v1/caloriesburned - Calculate calories burned for given activities
- /v1/caloriesburnedactivities - Get a list of all supported activities
From 9,141 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 223ms | 254ms | 312ms | 634ms | 1047ms |
Didn't find what you were looking for? Suggest an improvement
/v1/caloriesburned GET
https://api.api-ninjas.com/v1/caloriesburned
Returns the calories burned per hour and total calories burned according to given parameters for given activities (up to 10).
Parameters
activityrequiredName of the given activity. This value can be partial (e.g.
skiwill matchwater skiinganddownhill skiing).weightoptionalWeight of the user performing the activity in pounds. Must be between
50and500. Default value is160.durationoptionalHow long the activity was performed in minutes. Must be
1or greater. Default value is60(1 hour).
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.
nameName of the activity.
calories_per_hourCalories burned per hour for this activity.
duration_minutesDuration in minutes (as specified in the request or default 60).
total_caloriesTotal calories burned for the specified duration.
Sample Request Live Demo!
https://api.api-ninjas.com/v1/caloriesburned?activity=skiingHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/caloriesburned?activity=running&weight=70&duration=30" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
/v1/caloriesburnedactivities GET
https://api.api-ninjas.com/v1/caloriesburnedactivities
Returns a list of all supported activities.
Parameters
None
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of strings, or an error if the request is unsuccessful.
Sample Request
https://api.api-ninjas.com/v1/caloriesburnedactivitiesHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Frequently Asked Questions
Can I use the Calories Burned API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Calories Burned API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Calories Burned API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Calories Burned API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.How do I calculate calories burned for a specific activity, weight, and duration?
Send a GET request to the/v1/caloriesburnedendpoint with a requiredactivityparameter (which can be partial, e.g.skimatches both water skiing and downhill skiing), plus optionalweightin pounds (between50and500, default160) anddurationin minutes (default60). You can get started with a free key on our registration page.What fields does the calories burned response include?
The/v1/caloriesburnedendpoint returns a JSON array of objects (one per matched activity, up to 10), each containingname,calories_per_hour,duration_minutes, andtotal_calories. If a request is unsuccessful you'll receive an error instead.How can I get a list of all supported activities?
Call the/v1/caloriesburnedactivitiesendpoint, which takes no parameters and returns a JSON array of strings naming every supported activity (such as Archery, Badminton, and Basketball). This endpoint is available on premium subscriptions only, which you can review on our pricing page.What are some use cases for the Calories Burned API?
It is ideal for fitness trackers, workout logs, and health dashboards that need to estimate energy expenditure across hundreds of sports and activities. It pairs well with our Exercises API for workout details and our Nutrition API for tracking calorie intake.