Skip to main content
GET
/
bodyParts
Get Body Parts
curl --request GET \
  --url https://api.example.com/bodyParts
{
  "totalBodyParts": 123,
  "data": [
    {
      "bodyPart": "<string>",
      "imageUrl": "<string>"
    }
  ]
}

Endpoint

GET /api/bodyParts
Retrieve a list of body parts available in the BodyWorks database. Body parts are used to categorize exercises and help users find exercises targeting specific areas of the body.

Query Parameters

limit
number
The maximum number of body parts to return. If not specified, returns all available body parts.

Response

totalBodyParts
number
The total number of body parts available in the database.
data
IBodyPart[]
An array of body part objects.

Example Request

# Get all body parts
curl -X GET "https://api.bodyworks.com/api/bodyParts"

# Get limited number of body parts
curl -X GET "https://api.bodyworks.com/api/bodyParts?limit=5"

Example Response

{
  "totalBodyParts": 12,
  "data": [
    {
      "bodyPart": "chest",
      "imageUrl": "https://cdn.bodyworks.com/bodyparts/chest.png"
    },
    {
      "bodyPart": "back",
      "imageUrl": "https://cdn.bodyworks.com/bodyparts/back.png"
    },
    {
      "bodyPart": "legs",
      "imageUrl": "https://cdn.bodyworks.com/bodyparts/legs.png"
    },
    {
      "bodyPart": "shoulders",
      "imageUrl": "https://cdn.bodyworks.com/bodyparts/shoulders.png"
    },
    {
      "bodyPart": "arms",
      "imageUrl": "https://cdn.bodyworks.com/bodyparts/arms.png"
    },
    {
      "bodyPart": "core",
      "imageUrl": "https://cdn.bodyworks.com/bodyparts/core.png"
    },
    {
      "bodyPart": "glutes",
      "imageUrl": "https://cdn.bodyworks.com/bodyparts/glutes.png"
    },
    {
      "bodyPart": "calves",
      "imageUrl": "https://cdn.bodyworks.com/bodyparts/calves.png"
    },
    {
      "bodyPart": "forearms",
      "imageUrl": "https://cdn.bodyworks.com/bodyparts/forearms.png"
    },
    {
      "bodyPart": "neck",
      "imageUrl": "https://cdn.bodyworks.com/bodyparts/neck.png"
    },
    {
      "bodyPart": "cardio",
      "imageUrl": "https://cdn.bodyworks.com/bodyparts/cardio.png"
    },
    {
      "bodyPart": "full body",
      "imageUrl": "https://cdn.bodyworks.com/bodyparts/full-body.png"
    }
  ]
}

Error Responses

400 Bad Request
{
  "error": "Invalid limit parameter",
  "message": "Limit must be a positive integer"
}
500 Internal Server Error
{
  "error": "Internal server error",
  "message": "Failed to fetch body parts from database"
}

Use Cases

  • Exercise Filtering: Use body parts to filter exercises by target area
  • Navigation: Display body part categories for easy browsing
  • Workout Planning: Select body parts to focus on for specific training days
  • User Interface: Populate dropdowns and filters in your application

Build docs developers (and LLMs) love