Skip to main content
GET
/
exercises
Get Exercises
curl --request GET \
  --url https://api.example.com/exercises
{
  "totalExercises": 123,
  "totalPages": 123,
  "data": [
    {
      "name": "<string>",
      "title": "<string>",
      "target": "<string>",
      "muscles_worked": "<string>",
      "bodyPart": "<string>",
      "equipment": "<string>",
      "id": "<string>",
      "id_": "<string>",
      "blog": "<string>",
      "images": [
        "<string>"
      ],
      "gifUrl": "<string>",
      "videos": [
        "<string>"
      ],
      "keywords": [
        "<string>"
      ]
    }
  ]
}

Endpoint

GET /api/exercises
Retrieve a paginated list of exercises from the BodyWorks database. This endpoint supports pagination to efficiently load large sets of exercise data.

Query Parameters

limit
number
default:"9"
The number of exercises to return per page. Controls pagination size.
page
number
default:"1"
The page number to retrieve. Used for pagination through the exercise list.

Response

totalExercises
number
The total number of exercises available in the database.
totalPages
number
The total number of pages available based on the limit parameter.
data
IExercise[]
An array of exercise objects.

Example Request

curl -X GET "https://api.bodyworks.com/api/exercises?limit=10&page=1"

Example Response

{
  "totalExercises": 1324,
  "totalPages": 133,
  "data": [
    {
      "name": "barbell-bench-press",
      "title": "Barbell Bench Press",
      "target": "pectorals",
      "muscles_worked": "chest, triceps, shoulders",
      "bodyPart": "chest",
      "equipment": "barbell",
      "id": "ex_001",
      "id_": "001",
      "blog": "https://bodyworks.com/blog/bench-press-guide",
      "images": [
        "https://cdn.bodyworks.com/exercises/bench-press-1.jpg",
        "https://cdn.bodyworks.com/exercises/bench-press-2.jpg"
      ],
      "gifUrl": "https://cdn.bodyworks.com/exercises/bench-press.gif",
      "videos": [
        "https://youtube.com/watch?v=example1"
      ],
      "keywords": [
        "chest",
        "barbell",
        "compound",
        "strength"
      ]
    },
    {
      "name": "squat",
      "title": "Barbell Squat",
      "target": "quadriceps",
      "muscles_worked": "quads, glutes, hamstrings, core",
      "bodyPart": "legs",
      "equipment": "barbell",
      "id": "ex_002",
      "id_": "002",
      "blog": "https://bodyworks.com/blog/squat-guide",
      "images": [
        "https://cdn.bodyworks.com/exercises/squat-1.jpg",
        "https://cdn.bodyworks.com/exercises/squat-2.jpg"
      ],
      "gifUrl": "https://cdn.bodyworks.com/exercises/squat.gif",
      "videos": [
        "https://youtube.com/watch?v=example2"
      ],
      "keywords": [
        "legs",
        "barbell",
        "compound",
        "strength"
      ]
    }
  ]
}

Error Responses

400 Bad Request
{
  "error": "Invalid pagination parameters",
  "message": "Limit and page must be positive integers"
}
500 Internal Server Error
{
  "error": "Internal server error",
  "message": "Failed to fetch exercises from database"
}

Build docs developers (and LLMs) love