Overview
The MuscleWiki API provides comprehensive access to a database of 1,700+ exercise demonstrations with video tutorials, step-by-step instructions, and detailed metadata. Perfect for fitness apps, workout planners, and health & wellness platforms.
What You Can Build
Key Features
1,700+ Exercises
Comprehensive database covering all major muscle groups
Video Demonstrations
Multiple camera angles (front/side) and gender variants (male/female)
Smart Search
Full-text search with relevance scoring
Advanced Filtering
Filter by muscle group, equipment, difficulty, force type, and more
Optimized Responses
Multiple detail levels to minimize bandwidth usage
High Performance
Built on FastAPI for exceptional speed
Authentication
RapidAPI Authentication
All requests through RapidAPI are automatically authenticated. Simply subscribe to the API and include your RapidAPI key in the headers - RapidAPI handles this for you automatically.
Include these two headers in every request:
X-RapidAPI-KeyYour unique API key from RapidAPI
X-RapidAPI-HostSet to: musclewiki-api.p.rapidapi.com
Quick Start
- 1
Subscribe to the API
Visit the RapidAPI marketplace and subscribe to the MuscleWiki API. A free tier is available with no credit card required.
Subscribe on RapidAPI → - 2
Get Your API Key
After subscribing, you'll receive your unique API key from the RapidAPI dashboard.
- 3
Make Your First Request
Use your API key to authenticate requests and start accessing exercise data.
Health & Metadata
/Get basic API information and available endpoints.
{
"name": "MuscleWiki API",
"version": "2.0.0",
"docs": "/docs",
"openapi": "/openapi.json",
"health": "/health",
"endpoints": {
"exercises": "/exercises",
"search": "/search",
"random": "/random",
"categories": "/categories",
"muscles": "/muscles",
"filters": "/filters",
"statistics": "/statistics",
"workouts": {
"push": "/workouts/push",
"pull": "/workouts/pull"
}
}
}/healthCheck API health status and database statistics.
Use Case: Verify API availability before making requests.
{
"status": "healthy",
"version": "2.0.0",
"exercises_loaded": 1734
}/statisticsGet comprehensive database statistics including exercise counts, category breakdown, difficulty distribution, and more.
Use Case: Display database statistics, build dynamic filter UIs, show available content.
/categoriesList all equipment categories with exercise counts.
Use Case: Build category filters, show available equipment types.
[
{"name": "barbell", "display_name": "Barbell", "count": 150},
{"name": "dumbbell", "display_name": "Dumbbell", "count": 200},
{"name": "bodyweight", "display_name": "Bodyweight", "count": 180}
]/musclesList all primary muscle groups with exercise counts.
Use Case: Build muscle group filters, display muscle targeting options.
/filtersGet all available filter values for building dynamic UIs.
Use Case: Build comprehensive filter interfaces with all available options.
Exercise Endpoints
/exercisesList exercises with pagination and optional filtering. Returns minimal information optimized for list views.
Query Parameters
limit - Maximum results to return (1-100, default: 20)offset - Number of results to skip (default: 0)search - Search in exercise names and steps (min 2 characters)gender - Filter videos by gender (male or female)category - Filter by equipment category (e.g., barbell, dumbbell)muscles - Filter by muscle groups (e.g., Biceps, Chest)difficulty - Filter by difficulty (novice, intermediate, advanced)force - Filter by force type (push, pull, static)mechanic - Filter by mechanic (isolation, compound)grips - Filter by grip types (e.g., Overhand, Underhand)Example Request
GET /exercises?limit=5&category=barbell&difficulty=intermediateExample Response
{
"total": 45,
"limit": 5,
"offset": 0,
"count": 5,
"results": [
{"id": 0, "name": "Barbell Curl"},
{"id": 15, "name": "Barbell Bench Press"},
{"id": 23, "name": "Barbell Squat"}
]
}/exercises/{exercise_id}Get detailed information for a specific exercise by ID.
Path Parameters
exercise_id - Exercise ID (0-based index)Query Parameters
detail - Return detailed info (boolean)gender - Filter videos by genderUse Case: Show exercise detail pages, display exercise instructions and videos, build exercise demonstration features.
/exercises/{exercise_id}/videosGet only video URLs for a specific exercise. Optimized endpoint that reduces bandwidth by excluding other exercise data.
Use Case: Video-only display features, minimize bandwidth when only videos are needed, build video galleries.
Search & Discovery
/searchSearch exercises by text query with intelligent relevance scoring. Searches in exercise names and instruction steps.
Search Features
Example Request
GET /search?q=curl&limit=5&difficulty=intermediate/randomGet a random exercise, optionally filtered by category. Perfect for "try something new" features.
Use Case: "Random exercise" features, workout variation generators, "try something new" buttons, surprise workout features.
Workout Builders
/workouts/pushGet exercises with push force type. Perfect for building push workout routines.
Use Case: Build "push day" workouts, create push/pull/legs split programs, filter exercises by movement pattern.
/workouts/pullGet exercises with pull force type. Perfect for building pull workout routines.
Use Case: Build "pull day" workouts, create balanced workout programs, filter exercises by movement pattern.
Media Streaming
Authenticated Streaming
These endpoints require authentication headers just like data endpoints. Each media request counts as an API call for metering purposes.
Media endpoints use explicit subdirectory routes for better security and type safety. All video and image files are organized by category.
/stream/videos/branded/{filename}Stream branded exercise video files. Supports byte-range requests for smooth playback and video seeking.
Path Parameters
filename - Video filename (e.g., male-Barbell-barbell-curl-front.mp4)Example Request
GET /stream/videos/branded/male-Barbell-barbell-curl-front.mp4Note: Automatically includes caching headers (1-year max-age) and supports HTTP range requests for efficient streaming.
/stream/videos/unbranded/{filename}Stream unbranded exercise video files. Supports byte-range requests for smooth playback.
Path Parameters
filename - Video filename (e.g., male-Barbell-barbell-curl-front.mp4)Example Request
GET /stream/videos/unbranded/male-Barbell-barbell-curl-front.mp4/stream/images/og_images/{filename}Stream Open Graph image files for social sharing preview images. Supports automatic content-type detection for JPEG, PNG, GIF, and WebP formats.
Path Parameters
filename - Image filename (e.g., og-male-Barbell-barbell-curl-front.jpg)Example Request
GET /stream/images/og_images/og-male-Barbell-barbell-curl-front.jpgSecurity & Organization
- • Explicit subdirectory routes prevent path traversal attacks
- • No URL encoding required for slashes (simpler client implementation)
- • Self-documenting API showing available media categories
- • Type-safe access to approved subdirectories only
Python Examples
import requests
url = "https://musclewiki-api.p.rapidapi.com/exercises"
headers = {
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
"X-RapidAPI-Host": "musclewiki-api.p.rapidapi.com"
}
params = {
"limit": 10,
"category": "barbell"
}
response = requests.get(url, headers=headers, params=params)
exercises = response.json()
print(f"Total exercises: {exercises['total']}")
for exercise in exercises['results']:
print(f"- {exercise['name']} (ID: {exercise['id']})")JavaScript Examples
const url = 'https://musclewiki-api.p.rapidapi.com/search?q=curl&limit=5';
const options = {
method: 'GET',
headers: {
'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
'X-RapidAPI-Host': 'musclewiki-api.p.rapidapi.com'
}
};
try {
const response = await fetch(url, options);
const result = await response.json();
console.log(result);
} catch (error) {
console.error(error);
}cURL Examples
curl --request GET \
--url 'https://musclewiki-api.p.rapidapi.com/exercises/0' \
--header 'X-RapidAPI-Host: musclewiki-api.p.rapidapi.com' \
--header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY'Stream Branded Video
curl --request GET \
--url 'https://musclewiki-api.p.rapidapi.com/stream/videos/branded/male-Barbell-barbell-curl-front.mp4' \
--header 'X-RapidAPI-Host: musclewiki-api.p.rapidapi.com' \
--header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
--output video.mp4Stream OG Image
curl --request GET \
--url 'https://musclewiki-api.p.rapidapi.com/stream/images/og_images/og-male-Barbell-barbell-curl-front.jpg' \
--header 'X-RapidAPI-Host: musclewiki-api.p.rapidapi.com' \
--header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
--output og-image.jpgResponse Models
The API uses three different response detail levels to optimize bandwidth:
Minimal Response
Used by /exercises list endpoint
Contains:
- • id - Exercise identifier
- • name - Exercise name
Standard Response
Used by most endpoints (default)
Contains:
- • id - Exercise identifier
- • name - Exercise name
- • primary_muscles - Targeted muscle groups
- • category - Equipment type
- • force - Push/Pull/Static (may be null)
- • grips - Grip types used
- • mechanic - Isolation/Compound (may be null)
- • difficulty - Novice/Intermediate/Advanced (may be null)
- • steps - Step-by-step instructions
- • videos - Video demonstrations with URLs
Detailed Response
Used by /exercises/{id}?detail=true
Contains:
- • All standard fields, plus:
- • video_count - Total number of videos
- • step_count - Total number of instruction steps
Error Responses
404 Not Found
{
"detail": "Exercise with ID 9999 not found"
}422 Validation Error
{
"detail": [
{
"loc": ["query", "limit"],
"msg": "ensure this value is less than or equal to 100",
"type": "value_error"
}
]
}Common Use Cases
Building an Exercise Browser
- 1
GET /categories - Get available equipment types - 2
GET /exercises?category=barbell&limit=20 - List exercises - 3
GET /exercises/0 - Show detail for selected exercise
Exercise Search Feature
- 1
GET /search?q=curl&limit=10 - Search for exercises - 2
GET /exercises/{id} - Get full details for selected result
Random Workout Generator
- 1
GET /random?category=bodyweight - Get random exercise - 2
Repeat with different categories for variety
Push/Pull Workout Builder
- 1
GET /workouts/push?difficulty=intermediate&limit=5 - 2
GET /workouts/pull?difficulty=intermediate&limit=5 - 3
Combine results for a balanced workout
Muscle-Specific Training
- 1
GET /muscles - Get available muscle groups - 2
GET /exercises?muscles=Biceps&difficulty=intermediate - 3
Build muscle-specific workout plans
Best Practices
Use Appropriate Detail Levels
Use /exercises for lists, standard responses for most cases, and detailed responses only when needed.
Filter Early
Apply filters at the API level rather than fetching all data and filtering client-side.
Cache Metadata
Cache responses from /categories, /muscles, and /filters as they change infrequently.
Paginate Large Results
Use limit and offset parameters for large result sets.
Search vs Filter
Use /search for text-based queries, /exercises with filters for structured queries.
Need Help?
Check out our live demo to see the API in action, or visit RapidAPI for support and subscription options.