# Search the exercise catalog

`GET https://api.coach-platform.com/api/public/exercises`

Search the exercises catalog (name, muscle group).

- Resource: Exercises
- Authentication: API key in the `Authorization: Bearer cp_live_...` header
- HTML version: https://www.coach-platform.com/docs/api/reference/get-exercises
- OpenAPI spec: https://www.coach-platform.com/openapi.json

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `page` | integer | No | Page number (1-based, default 1) Minimum: `1`. |
| `limit` | integer | No | Number of items to return (default 25, max 500) Minimum: `1`. Maximum: `500`. |
| `search` | string | No |   |
| `muscleGroup` | string | No | Muscle group filter, matched case-insensitively against either the exercise target ("pectorals") or its body part ("chest"), so either spelling works. Any value is accepted; these are the ones the catalog actually uses. Body parts: back, cardio, chest, lower arms, lower legs, neck, shoulders, upper arms, upper legs, waist. Targets: abdominals, abductors, abs, adductors, biceps, calves, cardiovascular system, delts, forearms, glutes, hamstrings, lats, levator scapulae, pectorals, quads, rear deltoids, serratus anterior, spine, traps, triceps, upper back. |

## Responses

| Status | Description |
|---|---|
| `200` OK | Successful response |
| `400` Bad Request |  |
| `401` Unauthorized |  |
| `403` Forbidden |  |
| `429` Too Many Requests |  |
| `500` Internal Server Error |  |

### 200 OK

Content type: `application/json`

| Field | Type | Description |
|---|---|---|
| `data` | object[] |   |
| `data[]._id` | string |   |
| `data[].name` | string |   |
| `data[].target` | string | Primary muscle worked. Coach-created exercises may carry a value outside this list. Allowed values: `abdominals`, `abductors`, `abs`, `adductors`, `biceps`, `calves`, `cardiovascular system`, `delts`, `forearms`, `glutes`, `hamstrings`, `lats`, `levator scapulae`, `pectorals`, `quads`, `rear deltoids`, `serratus anterior`, `spine`, `traps`, `triceps`, `upper back`. |
| `data[].bodyPart` | string | Body region the exercise trains. Only the global catalog is reliably tagged. Allowed values: `back`, `cardio`, `chest`, `lower arms`, `lower legs`, `neck`, `shoulders`, `upper arms`, `upper legs`, `waist`. |
| `data[].equipment` | string | Equipment needed. Every global-catalog exercise is tagged; most coach-created ones are not. Allowed values: `assisted`, `band`, `barbell`, `body weight`, `bosu ball`, `cable`, `cable machine`, `dumbbell`, `elliptical machine`, `ez barbell`, `kettlebell`, `leverage machine`, `medicine ball`, `olympic barbell`, `resistance band`, `roller`, `rope`, `skierg machine`, `sled machine`, `smith machine`, `stability ball`, `stationary bike`, `stepmill machine`, `tire`, `trap bar`, `upper body ergometer`, `weighted`, `wheel roller`. |
| `data[].instructions` | string[] |   |
| `data[].videoUrl` | string | The coach's own demonstration video for this exercise, when they have set one. |
| `pagination` | object |   |
| `pagination.page` | number |   |
| `pagination.limit` | number |   |
| `pagination.total` | number \| null | Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging. |
| `pagination.hasMore` | boolean |   |
| `pagination.truncated` | boolean | Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items. |

Example:

```json
{
  "data": [
    {
      "_id": "<string>",
      "name": "<string>",
      "target": "abdominals",
      "bodyPart": "back",
      "equipment": "assisted",
      "instructions": [
        "<string>"
      ],
      "videoUrl": "<string>"
    }
  ],
  "pagination": {
    "page": 123,
    "limit": 123,
    "total": 123,
    "hasMore": true,
    "truncated": true
  }
}
```

### Error responses 400, 401, 403, 429, 500

Content type: `application/json`

| Field | Type | Description |
|---|---|---|
| `error` | object |   |
| `error.code` | string |   |
| `error.message` | string |   |
| `error.fix` | string \| null |   |
| `error.details` | object \| null |   |
| `error.retryAfterMs` | number \| null |   |

Example:

```json
{
  "error": {
    "code": "<string>",
    "message": "<string>",
    "fix": "<string>",
    "details": {},
    "retryAfterMs": 123
  }
}
```

## Examples

### cURL

```bash
curl --request GET \
  --url 'https://api.coach-platform.com/api/public/exercises' \
  --header 'Authorization: Bearer cp_live_...'
```

### JavaScript (fetch)

```js
const response = await fetch('https://api.coach-platform.com/api/public/exercises', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer cp_live_...',
  },
});

const data = await response.json();
```

## Related endpoints

- Previous: [List a trainee's exercise notes](https://www.coach-platform.com/docs/api/reference/get-trainees-trainee-id-exercise-notes/index.md): `GET /api/public/trainees/{traineeId}/exercise-notes`. Per-exercise notes and video replies from a trainee's workout logs.
- Next: [Get a trainee's daily nutrition log](https://www.coach-platform.com/docs/api/reference/get-trainees-trainee-id-nutrition-log/index.md): `GET /api/public/trainees/{traineeId}/nutrition-log`. What a trainee actually ate on ONE day: the food log for that date, per-meal and per-day calorie/macro totals, and the times of day the food was logged.
