If you need body-part categories for a workout filter, you need a list your application can use without maintaining the labels by hand. By the end of this guide, you’ll be able to call the Exercise Database API, read its body-part list in Python, and understand how the related exercise and program endpoints use body-part data.
What the API returns
The Exercise Database API provides exercise data and workout-program functionality. Its List of Body Parts endpoint returns an array of category names such as waist, chest, and upper arms. A fitness application can use those strings to populate a selector or organize exercise data it already has.
The related endpoints return exercise alternatives or program sessions. Exercise objects in the supplied examples include fields such as bodyPart, equipment, name, and target. The body-part list itself is simpler: it is an array of strings, not an array of exercise objects.
There is an important distinction between a body-part category and a target muscle. For example, the workout response identifies an exercise’s bodyPart as chest and its target as pectorals. Keep those fields separate if your interface displays both.
Getting started on Zyla API Hub
Open the Exercise Database API listing on Zyla API Hub, create a free account, and select Subscribe or Start Free Trial when available. You’ll need your API key to send requests through the Hub. The marketplace uses subscriptions and quotas rather than pay-per-call billing.
For a first API, the available access option may be a 7-day trial or 50 requests. Check the API page for current access options and pricing. Zyla API Hub lists more than 10,000 public APIs and uses one account and API key across the marketplace.
List body parts
Send a GET request to the List of Body Parts endpoint. The supplied request does not include query parameters; replace YOUR_API_KEY with your Hub key before running it.
curl -s -X GET "https://zylalabs.com/api/392/exercise-database-api/309/list-of-body-parts" \
-H "Authorization: Bearer YOUR_API_KEY"
The official example response is:
[
"waist",
"upper legs",
"back",
"lower legs",
"chest",
"upper arms",
"cardio",
"shoulders",
"lower arms",
"neck"
]
Each element is a category string. Preserve the returned value when storing or comparing it with an exercise object’s bodyPart; you can format a separate display label in your interface. The presence of cardio also means the list is best treated as workout categories rather than a strictly anatomical taxonomy.
Read the list in Python
This example uses Python’s standard library and calls the same endpoint as the curl request. It checks for HTTP and connection errors before parsing the response, then prints the categories in the order received.
import json
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen
url = "https://zylalabs.com/api/392/exercise-database-api/309/list-of-body-parts"
request = Request(
url,
headers={"Authorization": "Bearer YOUR_API_KEY"},
method="GET",
)
try:
with urlopen(request, timeout=15) as response:
body_parts = json.load(response)
except HTTPError as error:
raise SystemExit("API request failed: HTTP " + str(error.code))
except URLError as error:
raise SystemExit("Could not reach the API: " + str(error.reason))
except json.JSONDecodeError:
raise SystemExit("The API response was not valid JSON")
if not isinstance(body_parts, list):
raise SystemExit("Expected a JSON array of body-part categories")
for body_part in body_parts:
print(body_part)
Replace YOUR_API_KEY before running the sample. In an application, keep the key on the server or in a protected environment rather than embedding it in browser code. A server-side route can retrieve the list and return the categories needed by your interface.
You can cache the returned list in your application to avoid requesting it every time a user opens a filter. Provide a way to refresh that cache; do not assume that the example response is a permanent or exhaustive list. The supplied request does not describe pagination or a category-filter parameter, so use the returned array as the starting point.
Related endpoints for exercises and programs
The body-part list supplies labels, but it does not itself return exercises. The following endpoints provide related functionality. They are separate requests, and the supplied descriptions do not define a body-part search parameter for them.
Exercise Alternatives
GET https://zylalabs.com/api/392/exercise-database-api/34184/exercise-alternatives
Exercise Alternatives returns up to 10 exercises with the same movement. If the selected exercise has no movement, the list uses the same target muscle instead. It requires the numeric id parameter; the supplied example uses 1. The optional string parameter equipment is shown with the value barbell.
The exercise objects match those used by the other endpoints in this API. The supplied response includes bodyPart, equipment, gifUrl, id, name, target, and videos. That gives an interface enough information to show an alternative’s name, category, target muscle, and associated media.
Do not assume that requesting alternatives is equivalent to listing all exercises in a body-part category. The endpoint is centered on an existing exercise and the movement or target-muscle relationship described above.
Create Program
POST https://zylalabs.com/api/392/exercise-database-api/34185/create-program
Create Program starts a program and returns today’s session. Its required request_body parameter is a string. The supplied value contains {"client_id":"member-1","routine":"muscle_gain_4"}, where client_id is your identifier for the person. The description also names weight_loss_3 as a routine and says a goal can be sent.
The example response includes program_id, program_key, and a session. The session contains exercises with body-part and target fields, alongside workout fields such as sets, reps_min, reps_max, and rest_seconds. Save the returned program identifier and key securely if you need to retrieve the session later.
Today’s Workout
GET https://zylalabs.com/api/392/exercise-database-api/34186/today-s-workout
Today’s Workout returns the day’s session, including exercises, sets, reps, and the weight to use. It requires program, the numeric identifier returned by Create Program, and program_key, a string. Use the values returned for the particular program rather than mixing values from separate examples.
The supplied session example includes day_name, week, and an exercises array. Individual exercises include bodyPart and target as well as prescription fields. In that example, weight_kg can be null, so a workout screen should handle the absence of a numeric weight.
Practical uses and AI-agent access
A workout application can fetch the body-part list when preparing its exercise interface, cache the response, and render a selector from the returned strings. If it also displays exercises from a program session, it can group those returned exercises by their bodyPart values without confusing those values with target muscles.
A coaching application can show the body part and target for each exercise in today’s session, then offer an alternatives workflow for a selected exercise. Keep the two operations distinct: the session identifies the current exercise, while Exercise Alternatives finds substitutions based on movement or target muscle.
You can also call Hub APIs from an AI agent through MCP. Configure Claude Code, Cursor, Windsurf, or another MCP-compatible client with https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY, replacing YOUR_API_KEY with your Hub key. Keep that connection string private because it contains the key.
For an agent workflow, ask for the available body-part categories before using them in a response or interface. The returned list is the source for the category labels; an agent should not treat a category name as proof that a particular exercise or filtering endpoint exists.
FAQ
Does List of Body Parts return exercise objects?
No. The official response is an array of category strings. Exercise and program endpoints return exercise objects separately.
Can I use a body-part name to request all matching exercises?
The endpoints described here do not specify a request parameter for listing exercises by body part. Use the body-part list for categories, and consult the API listing for any additional documented functionality before building that request.
Are body part and target muscle the same field?
No. Exercise objects expose them separately as bodyPart and target. The supplied workout example uses chest for the body part and pectorals for the target.
What should I do if a workout has no weight value?
Handle weight_kg as potentially nullable. The supplied workout example contains null, so do not assume every session exercise has a numeric weight.
Ready to integrate the list? Create a free Zyla account, get your API key, and Start 7-day trial on Exercise Database API. Check the listing for current access options and pricing.