API Documentation

Complete guide to integrating the MuscleWiki API - 1,700+ exercises with video demonstrations

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

Workout planning applications
Exercise recommendation systems
Fitness tracking apps
Personal training platforms
Exercise search and discovery tools
Random workout generators

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-Key

Your unique API key from RapidAPI

X-RapidAPI-Host

Set to: musclewiki-api.p.rapidapi.com

Get Your API Key

Quick Start

  1. 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. 2

    Get Your API Key

    After subscribing, you'll receive your unique API key from the RapidAPI dashboard.

  3. 3

    Make Your First Request

    Use your API key to authenticate requests and start accessing exercise data.

Health & Metadata

GET/

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"
    }
  }
}
GET/health

Check API health status and database statistics.

Use Case: Verify API availability before making requests.

{
  "status": "healthy",
  "version": "2.0.0",
  "exercises_loaded": 1734
}
GET/statistics

Get comprehensive database statistics including exercise counts, category breakdown, difficulty distribution, and more.

Use Case: Display database statistics, build dynamic filter UIs, show available content.

GET/categories

List 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}
]
GET/muscles

List all primary muscle groups with exercise counts.

Use Case: Build muscle group filters, display muscle targeting options.

GET/filters

Get all available filter values for building dynamic UIs.

Use Case: Build comprehensive filter interfaces with all available options.

Exercise Endpoints

GET/exercises

List 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=intermediate

Example 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"}
  ]
}
GET/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 gender

Use Case: Show exercise detail pages, display exercise instructions and videos, build exercise demonstration features.

GET/exercises/{exercise_id}/videos

Get 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

GET/search

Search exercises by text query with intelligent relevance scoring. Searches in exercise names and instruction steps.

Search Features

Word-order independent matching
Relevance scoring (exact matches ranked higher)
Searches both exercise names and instruction steps
Results sorted by relevance

Example Request

GET /search?q=curl&limit=5&difficulty=intermediate
GET/random

Get 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

GET/workouts/push

Get 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.

GET/workouts/pull

Get 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.

GET/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.mp4

Note: Automatically includes caching headers (1-year max-age) and supports HTTP range requests for efficient streaming.

GET/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
GET/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.jpg

Security & 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.mp4

Stream 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.jpg

Response 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
Perfect for: Lists, autocomplete, quick browsing

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
Perfect for: Most use cases, detail views, search results

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
Perfect for: Admin interfaces, analytics, when you need complete data

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. 1GET /categories - Get available equipment types
  2. 2GET /exercises?category=barbell&limit=20 - List exercises
  3. 3GET /exercises/0 - Show detail for selected exercise

Exercise Search Feature

  1. 1GET /search?q=curl&limit=10 - Search for exercises
  2. 2GET /exercises/{id} - Get full details for selected result

Random Workout Generator

  1. 1GET /random?category=bodyweight - Get random exercise
  2. 2Repeat with different categories for variety

Push/Pull Workout Builder

  1. 1GET /workouts/push?difficulty=intermediate&limit=5
  2. 2GET /workouts/pull?difficulty=intermediate&limit=5
  3. 3Combine results for a balanced workout

Muscle-Specific Training

  1. 1GET /muscles - Get available muscle groups
  2. 2GET /exercises?muscles=Biceps&difficulty=intermediate
  3. 3Build muscle-specific workout plans

Best Practices

1

Use Appropriate Detail Levels

Use /exercises for lists, standard responses for most cases, and detailed responses only when needed.

2

Filter Early

Apply filters at the API level rather than fetching all data and filtering client-side.

3

Cache Metadata

Cache responses from /categories, /muscles, and /filters as they change infrequently.

4

Paginate Large Results

Use limit and offset parameters for large result sets.

5

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.