Overview
Activities and MET values come from the 2024 Adult Compendium of Physical Activities (Herrmann SD, Willis EA, Ainsworth BE, et al. 2024 Adult Compendium of Physical Activities: A third update of the energy costs of human activities. J Sport Health Sci. 2024;13(1):6-12; https://pacompendium.com). The Compendium is free for commercial use with citation. A monthly collector copies its activity tables into our storage; MET values are stored and returned exactly as published.
Calories per minute are `met x 3.5 x weightKg / 200`: one MET is 3.5 ml of oxygen per kilogram per minute and a litre of oxygen releases about 5 kcal. `caloriesPerHour` and `totalCalories` are rounded to whole kcal. `intensity` classifies the standard MET with the Physical Activity Guidelines bands: light under 3, moderate 3 to 5.9, vigorous 6 and above, with 1.5 or below reported as sedentary.
With `age`, `sex` and `height` (all three) the API estimates resting metabolic rate with Mifflin-St Jeor (10 x kg + 6.25 x cm - 5 x age, plus 5 for men or minus 161 for women); `rmr` replaces the estimate with a measured value. That rate is converted to ml O2/kg/min and `correctedMet = met x 3.5 / RMR`, the Compendium's corrected MET method; calories then use the corrected value. `minutesToBurn` is `calories` divided by calories per minute. Search ranks activities that contain every word of the query (after synonyms such as biking to bicycling), preferring general and non-competitive entries, and falls back to partial matches.
Live Test Calories Burned API →
Endpoint
One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.
curl "https://api.apiverve.com/v1/caloriesburned?activity=running&code=12150&weight=70&unit=metric&duration=30&calories=300&age=35&sex=female&height=170&rmr=1500&limit=10" \
-H "x-api-key: your_api_key_here"const res = await fetch('https://api.apiverve.com/v1/caloriesburned?activity=running&code=12150&weight=70&unit=metric&duration=30&calories=300&age=35&sex=female&height=170&rmr=1500&limit=10', {
headers: { 'x-api-key': 'your_api_key_here' },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { data } = await res.json();
console.log(data);import requests
res = requests.get(
"https://api.apiverve.com/v1/caloriesburned?activity=running&code=12150&weight=70&unit=metric&duration=30&calories=300&age=35&sex=female&height=170&rmr=1500&limit=10",
headers={"x-api-key": "your_api_key_here"},
timeout=15,
)
res.raise_for_status()
print(res.json()["data"])package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.apiverve.com/v1/caloriesburned?activity=running&code=12150&weight=70&unit=metric&duration=30&calories=300&age=35&sex=female&height=170&rmr=1500&limit=10", nil)
req.Header.Set("x-api-key", "your_api_key_here")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.
Authentication
Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.
A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.
Parameters
Sent in the query string. Premium parameters are accepted on every plan but only take effect on plans that include them.
| Parameter | Type | Description |
|---|---|---|
activityOptional | string | Activity to search for, e.g. running, biking, yoga or mowing lawn. Required unless code is given. length 0–100 |
codeOptional | string | Five-digit Compendium activity code to look up directly, e.g. 12150. length 5–5 |
weightOptional | number | Body weight in kg (metric) or lb (imperial). Defaults to 70 kg. range 1–1100 |
unitOptional | string | Unit system for weight and height: metric (kg, cm) or imperial (lb, in). Defaults to metric.metricimperial |
durationOptional | number | Duration of the activity in minutes (1-1440). Defaults to 60. range 1–1440 |
caloriesOptional | number | Calorie target: adds minutesToBurn, the minutes each activity takes to burn this many kcal. range 1–20000 |
ageOptionalPremium | integer | Age in years (18-120), for a personalised estimate with sex and height. range 18–120 |
sexOptionalPremium | string | Sex for the resting metabolic rate estimate, with age and height.malefemale |
heightOptionalPremium | number | Height in cm (metric) or inches (imperial), with age and sex. range 1–300 |
rmrOptionalPremium | number | Measured resting metabolic rate in kcal per day (500-5000). Overrides age, sex and height. range 500–5000 |
limitOptionalPremium | integer | Number of matching activities to return (1-25). Defaults to 5. range 1–25 |
Response
Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.
{
"status": "ok",
"error": null,
"data": {
"query": "running",
"count": 5,
"totalMatches": 73,
"weightKg": 70,
"durationMinutes": 30,
"targetCalories": null,
"personalized": false,
"rmrKcalPerDay": null,
"activities": [
{
"code": "12145",
"activity": "Running, self-selected pace",
"heading": "Running",
"met": 10.5,
"correctedMet": null,
"intensity": "vigorous",
"caloriesPerHour": 772,
"durationMinutes": 30,
"totalCalories": 386,
"minutesToBurn": null
},
{
"code": "12140",
"activity": "Running, cross country",
"heading": "Running",
"met": 9.3,
"correctedMet": null,
"intensity": "vigorous",
"caloriesPerHour": 684,
"durationMinutes": 30,
"totalCalories": 342,
"minutesToBurn": null
},
{
"code": "12170",
"activity": "Running, stairs, up",
"heading": "Running",
"met": 15,
"correctedMet": null,
"intensity": "vigorous",
"caloriesPerHour": 1103,
"durationMinutes": 30,
"totalCalories": 551,
"minutesToBurn": null
},
{
"code": "12150",
"activity": "Running (Taylor Code 200)",
"heading": "Running",
"met": 8,
"correctedMet": null,
"intensity": "vigorous",
"caloriesPerHour": 588,
"durationMinutes": 30,
"totalCalories": 294,
"minutesToBurn": null
},
{
"code": "12180",
"activity": "Running, on a track, team practice",
"heading": "Running",
"met": 10,
"correctedMet": null,
"intensity": "vigorous",
"caloriesPerHour": 735,
"durationMinutes": 30,
"totalCalories": 368,
"minutesToBurn": null
}
]
}
}
Response fields
Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.
| Field | Type | Example | Description |
|---|---|---|---|
query | string | "running" | The activity searched for, or the code looked up |
count | number | 5 | Number of activities returned |
totalMatches | number | 73 | Number of activities that matched the search |
weightKg | number | 70 | Body weight used, in kilograms |
durationMinutes | number | 30 | Duration used, in minutes |
targetCalories | object | null | The calorie target from the calories parameter, or null |
personalized | boolean | false | Whether results use a resting metabolic rate (corrected METs) |
rmrKcalPerDayPremium | object | null | Resting metabolic rate used, kcal per day: measured, or estimated with Mifflin-St Jeor |
activities | array[5] | Matching activities, best match first | |
code | string | "12145" | Five-digit Compendium activity code |
activity | string | "Running, self-selected pace" | Activity description as published in the Compendium |
heading | string | "Running" | Compendium major heading, e.g. Running or Water Activities |
met | number | 10.5 | Standard MET value as published in the Compendium |
correctedMetPremium | object | null | MET corrected for the person's resting metabolic rate; null unless personalised |
intensity | string | "vigorous" | Intensity class of the standard MET: sedentary (1.5 or less), light (under 3), moderate (3 to 5.9) or vigorous (6 or more) |
caloriesPerHour | number | 772 | Calories (kcal) burned per hour |
durationMinutes | number | 30 | Duration the total is for, in minutes |
totalCalories | number | 386 | Calories (kcal) burned over the duration |
minutesToBurn | object | null | Minutes this activity takes to burn targetCalories; null without the calories parameter |
Errors
Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.
| Status | Meaning | What to do |
|---|---|---|
400 | Input was rejected | Read error; it names the parameter. |
401 | Key missing or invalid | Check the header name and the key value. |
403 | Key valid, but not permitted | A key restriction or IP allow-list; see key scoping. |
429 | Rate limited, or out of credits | Read error to tell them apart; see rate limits. |
Use cases
- Workout Logging Apps
- Fitness apps turn a logged activity and duration into calories burned, showing the MET and intensity class so users see why a session counted the way it did.
- Calorie Goal Planning
- Nutrition coaches use the reverse mode to tell clients how many minutes of walking, cycling or swimming offset a snack or meal.
- Corporate Wellness Challenges
- Step and activity challenges convert mixed activities, from yard work to basketball, into one comparable calorie or MET-minute total.
- Wearable and Health Platforms
- Device makers fill in activities their sensors cannot classify with Compendium-based estimates personalised to the wearer's age, sex, height and weight.
Other ways to use Calories Burned
Set up Calories Burned on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.
Related
More in Health/Wellness: