Overview
The BodyWorks API provides access to a comprehensive fitness database with over 1300+ exercises and 600+ workout routines. This free, public API allows developers to build fitness applications without authentication requirements.What You Can Access
- 1300+ Exercises - Browse and search exercises with detailed information
- 30+ Equipment Types - Filter exercises by available equipment
- 20 Target Muscles - Find exercises for specific muscle groups
- 10 Body Parts - Organize workouts by body part
- 600+ Routines - Pre-built workout routines from 1 week to 52 weeks
Base URL
The API base URL is configured through an environment variable. By default, it uses:Set
NEXT_PUBLIC_API_BASE_URL in your environment to point to the BodyWorks API server.Response Format
All API responses are returned in JSON format with a consistent structure:Available Endpoints
The BodyWorks API provides the following main endpoints:| Endpoint | Description | Supports Pagination |
|---|---|---|
/exercises | Get all exercises | Yes |
/bodyParts | Get all body parts | Yes |
/equipments | Get all equipment types | Yes |
/targetMuscles | Get all target muscles | Yes |
/routines | Get all workout routines | Yes |
/routineCategory | Get routine categories | Yes |
Query Parameters
Most endpoints support the following query parameters:Number of items to return per page
Page number for pagination
Making Requests
The API uses axios for HTTP requests. Here’s how the API client is configured:lib/apiCaller.ts
Example Request
Here’s a practical example of fetching exercises with pagination:Error Handling
The API client includes built-in error handling. If the base URL is not configured, it will throw an error:Common Error Responses
Rate Limiting
The BodyWorks API is a free public API. Check the Body Works API repository for current rate limiting policies.
Next Steps
Authentication
Learn about API access and configuration
Exercises
Explore exercise endpoints
Routines
Browse workout routines
Body Parts
Filter by body parts