The SECT.FIT Exercise API provides RESTful endpoints to access a comprehensive database of exercises. All responses are in JSON format.
GET /api/exercises?page=2&limit=24
{
"success": true,
"data": [...],
"pagination": {
"currentPage": 2,
"totalPages": 63,
"totalItems": 1500,
"itemsPerPage": 24
}
}
GET /api/exercises/search?q=bench%20press
{
"success": true,
"count": 13,
"data": [
{
"exerciseId": "ex_123",
"name": "barbell bench press",
"gifUrl": "https://...",
"targetMuscles": ["pectorals"],
"bodyParts": ["chest"],
"equipments": ["barbell"],
...
}
]
}
GET /api/exercises/filter?bodyParts=chest,back&equipments=dumbbell&q=press
{
"success": true,
"totalItems": 45,
"data": [...],
"pagination": { ... }
}
GET /api/exercises/0001
{
"success": true,
"data": {
"exerciseId": "0001",
"name": "3/4 sit-up",
"gifUrl": "https://...",
"targetMuscles": ["abs"],
"bodyParts": ["waist"],
"equipments": ["body weight"],
"secondaryMuscles": ["hip flexors"],
"instruction_1": "Lie on your back...",
...
}
}
POST /api/exercises/cache/clear
{
"success": true,
"message": "Cache cleared successfully"
}
The API supports multiple ways to pass array values for flexible integration:
?bodyParts=chest,back,legs
?bodyParts=chest&bodyParts=back&bodyParts=legs
?bodyParts=["chest","back","legs"]
All successful responses follow this structure:
{
"success": true,
"data": [...], // Array of exercises or single exercise object
"count": 150, // Total matching items (search only)
"totalItems": 1500, // Total items in database (filter only)
"pagination": { // Pagination info (when applicable)
"currentPage": 1,
"totalPages": 63,
"totalItems": 1500,
"itemsPerPage": 24
}
}
{
"exerciseId": "0001",
"name": "3/4 sit-up",
"gifUrl": "https://example.com/image.gif",
"targetMuscles": ["abs"],
"bodyParts": ["waist"],
"equipments": ["body weight"],
"secondaryMuscles": ["hip flexors", "obliques"],
"instruction_1": "Lie on your back with knees bent...",
"instruction_2": "Cross your arms over your chest...",
...
"instruction_8": "Repeat for desired reps"
}
Error responses include a descriptive message:
{
"success": false,
"message": "Exercise not found"
}
The API implements caching to improve performance. Cache TTL is 5 minutes (300 seconds). Frequently requested data is served from cache for faster response times.