exerciseapi.dev

How do I build a muscle-group filter for exercises?

Build a muscle picker from the groups on exerciseapi.dev, then send the selected group as muscle. The filter matches primary muscles.

Use the group names in the picker

Call GET /v1/muscles and use each displayGroup in the data list as a choice in your picker. When someone taps chest, send chest as the muscle parameter. They can pick a familiar name without knowing which muscles belong to it.

GET https://api.exerciseapi.dev/v1/exercises?muscle=chest

The picker has 16 groups. Each group also has a muscles list with its anatomical names. Cache the groups with your exercise data because the names rarely change.

What came back for chest

When we ran the chest request on December 2, 2026, the reply's total was 187. The API looks for either head of the pectoralis major (clavicular or sternal) or the pectoralis minor. A record matches if primaryMuscles includes any one of those three.

For a narrower filter, send one anatomical name in the same parameter. With muscle=pectoralis%20minor, we got two records, Pec_Minor_Lacrosse_Ball_Release and Pec_Minor_Stretch. Upper and lower case both work. Encode spaces as %20.

Why a squat is missing from glutes

Someone who taps glutes might look for Barbell_Squat. Its four primary muscles belong to the quadriceps group. The gluteus maximus and gluteus medius appear in secondaryMuscles, so the squat comes back for quadriceps and is missing from glutes.

Label the picker “Primary muscle group” so people know what a tap will find. On the exercise screen, show both primaryMuscles and secondaryMuscles. The API has no filter for secondary muscles.

Why a squat shows up under hip flexors

One of the squat's primary muscles, the rectus femoris, belongs to both quadriceps and hip flexors. That's how Barbell_Squat makes the list for muscle=hip%20flexors. If someone wants to target the iliopsoas specifically, send muscle=iliopsoas.

The other shared muscle is the brachioradialis. An exercise that lists it as primary can show up under both biceps and forearms.

Combine choices in the picker

Your app decides what Legs means. There's no legs group, so muscle=legs comes back empty. One choice is muscle=quadriceps&muscle=hamstrings&muscle=glutes&muscle=calves. Repeating muscle matches any selected group. On December 2, 2026, the combined total was 755. With a free key, request one group at a time because paging past the first 500 results of a request returns a 403. Each group was under 500. Groups can overlap, so keep each id once.

For quads first and glutes also working, start with muscle=quadriceps. This finds records with quads in primaryMuscles. Fetch the pages you need, then keep records with a muscle from the glutes group in primaryMuscles or secondaryMuscles. Barbell_Squat and Goblet_Squat both pass. Count the records you keep because the reply's total counts quadriceps matches before the check.

Adding a different filter narrows the list. With muscle=chest&equipment=dumbbell, the total was 22. You can also narrow by category or level. Show the reply's count only when total is a number. Every text search returns null for total, and other requests sometimes do too.

Try it with a free key

Run the chest request above with a free key from exerciseapi.dev in the X-API-Key header. For a browser app, make the call from your own server so the key stays there. No card required.