API Documentation

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

Try it live — API Playground

Make real API calls, see rendered exercise cards and videos

Overview

The MuscleWiki API provides comprehensive access to a database of 1,900+ exercise demonstrations with video tutorials, step-by-step instructions, and detailed metadata. Perfect for fitness apps, workout planners, and health & wellness platforms.

Commercial use included

All paid plans grant full commercial use rights. You can build and ship products, SaaS applications, and client-facing platforms without additional licensing fees or restrictions.

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,900+ 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

API Authentication

All requests require a valid API key. You can create and manage your API keys from your dashboard after signing up.

Include this header in every request:

X-API-Key

Your unique API key (format: mw_xxxxxxxxxxxxx)

Quick Start

  1. 1

    Create an Account

    Sign up for a free MuscleWiki API account. The free BASIC tier gives you playground access. Upgrade to TESTING ($10/mo) or higher for direct API access.

    Create Account →
  2. 2

    Generate Your API Key

    After signing in, navigate to your dashboard and create an API key. You'll only see the full key once, so make sure to save it securely.

    Go to Dashboard →
  3. 3

    Make Your First Request

    Use your API key in the X-API-Key header to authenticate requests and start accessing exercise data.

Ready to Start Building?

Once you have your API key, try this simple example to fetch your first exercise:

curl --request GET \
  --url 'https://api.musclewiki.com/exercises/1' \
  --header 'X-API-Key: YOUR_API_KEY'

Replace YOUR_API_KEY with your actual API key from the dashboard. You should see the "Barbell Curl" exercise with complete details and video URLs.

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",
    "routines": "/routines",
    "routines_full": "/routines/{id}/full",
    "workouts": "/workouts",
    "workouts_by_id": "/workouts/{id}",
    "workouts_full": "/workouts/{id}/full"
  }
}
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": 1832
}
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)
lang - Response language code (e.g. pt-br, es-es). Defaults to en-us — see Multilingual section

Example Request

GET /exercises?limit=5&category=barbell&difficulty=intermediate

Example Response (Success)

{
  "total": 45,        // Total exercises matching filters
  "limit": 5,         // Requested limit
  "offset": 0,        // Current offset
  "count": 5,         // Number of results in this response
  "results": [        // Array of exercise objects (minimal format)
    {"id": 0, "name": "Barbell Curl"},
    {"id": 15, "name": "Barbell Bench Press"},
    {"id": 23, "name": "Barbell Squat"}
  ]
}

Pagination Format: All list endpoints return paginated results with total, limit, offset, and count fields for easy pagination handling.

GET/exercises/{exercise_id}

Get detailed information for a specific exercise by ID.

Path Parameters

exercise_id - Exercise ID (integer, starts at 1)

Query Parameters

detail - Return detailed info (boolean)
gender - Filter videos by gender

Response Detail Levels:

  • Standard (default): Full exercise data with videos, steps, and all attributes
  • Detailed (?detail=true): Standard data + metadata counts (video_count, step_count, etc.)

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 /search?q=rosca&lang=pt-br
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.

Multilingual (14 languages)

Every data endpoint accepts an optional lang query parameter that translates exercise names, instruction steps, muscles, categories, and routine/workout text. Omit it to get English (fully backwards compatible). Media and bodymap URLs are identical in every language — only text changes.

GROWTH tier and above

Non-English languages require GROWTH, PROFESSIONAL, ENTERPRISE, or Custom tier. TESTING keys are English-only — a non-English lang returns 403 Forbidden with an upgrade_url. BASIC keys get all 14 languages in the Playground. Explicit lang=en-us is free for every tier (identical to omitting it), and GET /languages stays open for discovery. View pricing →

Supported Languages

English (default)en-us
Brazilian Portuguesept-br
Spanishes-es
Hindihi-in
Germande-de
Arabic (Saudi Arabia)ar-sa
Frenchfr-fr
Turkishtr-tr
Italianit-it
Persianfa-ir
Polishpl-pl
Russianru-ru
Chinese (Simplified)zh-cn
Japaneseja-jp

Where it applies

GET /languages - List all supported language codes and display names
lang on /exercises, /exercises/{id}, /search, /random - Translated names, steps, muscles, category, force, grips, mechanic, difficulty
lang on /categories, /muscles, /filters, /statistics - Aggregations computed over the translated values
lang on /routines* and /workouts* - Translated routine/workout names, descriptions, goals, equipment, and nested exercise names (PROFESSIONAL/ENTERPRISE tiers)

Example Request

curl -H "X-API-Key: your-key" \
  "https://api.musclewiki.com/exercises/1?lang=pt-br"
{
  "id": 1,
  "name": "Rosca Direta",
  "primary_muscles": ["Bíceps"],
  "category": "Barra de Pesos",
  "difficulty": "Intermediário",
  "steps": ["Flexione os pesos para frente..."],
  "videos": [ ... ]   // identical URLs in every language
}

Validation: unsupported codes return 400 with the list of supported languages.

Filters stay canonical: English filter values (e.g. difficulty=intermediate) keep working with any lang; translated category/muscle values are matched too.

Routines & Workouts

Routines are structured training programs composed of workouts. Each workout contains exercise references with prescription details (sets, reps, duration). The data follows a nested pattern: Routine → Workout references → Exercise references.

PROFESSIONAL & ENTERPRISE tiers only

All routines and workouts endpoints require PROFESSIONAL or ENTERPRISE tier. TESTING and GROWTH keys receive 403 Forbidden. Routine and workout responses also include bodymap_male / bodymap_female fields, which are likewise gated to PROFESSIONAL and ENTERPRISE. View pricing →

GET/routines

Browse workout routines with pagination. Returns minimal routine info: id, name, slug, description, and difficulty.

Query Parameters

limit - Results per page (1-100, default: 20)
offset - Number of results to skip (default: 0)
difficulty - Filter by difficulty (e.g. Beginner, Intermediate, Advanced)
GET/routines/{id}

Fetch a single routine with its workout references. Each workout is returned as a minimal reference (id, name, slug) — use the workout endpoint for full details.

Path Parameters

id - Routine ID (integer, starts at 1)
GET/routines/{id}/full

Fetch a routine with all workouts and exercises fully expanded in a single call. Each workout includes complete exercise data (muscles, videos, steps, etc.) instead of just references.

Billing: This endpoint counts as multiple API calls. The api_calls_cost field in the response shows the total: 1 (routine) + N (workouts) + M (exercises). The X-API-Calls-Cost response header also reflects this.

Path Parameters

id - Routine ID (integer, starts at 1)

Use Case: Get everything for a routine in one request when you don't want to make separate calls for each workout and exercise.

GET/workouts

Browse all workouts across all routines with pagination. Returns minimal workout info: id, name, slug, difficulty, and goal.

Query Parameters

limit - Results per page (1-100, default: 20)
offset - Number of results to skip (default: 0)
difficulty - Filter by difficulty (e.g. Beginner, Intermediate, Advanced)
goal - Filter by goal (e.g. Gain Muscle, Lose Weight)
equipment - Filter by required equipment (e.g. Barbell, Dumbbells)
muscles - Filter by targeted muscle group (e.g. Chest, Shoulders)
GET/workouts/{id}

Fetch a single workout with full details including exercise references. Each exercise includes prescription data (sets, reps/duration, superset grouping).

Path Parameters

id - Workout ID (integer, starts at 1)

Use Case: Display workout details with exercise list, build training session views, show exercise prescription data.

GET/workouts/{id}/full

Fetch a workout with all exercises fully expanded in a single call. Each exercise includes complete data (muscles, videos, steps, category, difficulty, etc.) instead of just a reference.

Billing: This endpoint counts as multiple API calls. The api_calls_cost field in the response shows the total: 1 (workout) + N (exercises). The X-API-Calls-Cost response header also reflects this.

Path Parameters

id - Workout ID (integer, starts at 1)

Use Case: Get a complete workout with all exercise details in one request, useful for rendering full training session views.

Media Streaming

Authentication Required

All media streaming endpoints require authentication. You must include your API key in the X-API-Key header even when streaming videos or images.

Authenticated Streaming

These endpoints require authentication headers just like data endpoints. Each media request counts as an API call for metering purposes.

Native mobile apps & server-side integration

An API key must never be shipped inside a mobile binary — it is extractable from any APK or IPA. There are two supported architectures that keep your key on your server.

Recommended: short-lived media tokens

Your backend exchanges its permanent key for a media-only token, then hands the device a plain HTTPS URL. AVPlayer and ExoPlayer consume it with no custom headers.

# 1. Your backend mints a token (never the device)
curl -X POST https://api.musclewiki.com/media/token \
  -H "X-API-Key: mw_your_key_here"

# → { "token": "eyJr...", "expires_in": 900 }

# 2. Hand the player a plain URL — no headers needed
https://api.musclewiki.com/stream/videos/unbranded/squat.mp4?token=eyJr...
  • • Tokens default to a 15-minute lifetime. Your backend refreshes on its own schedule; the mint endpoint is rate limited, so mint per session, not per video.
  • • Tokens are valid on /stream/ paths only. A leaked token cannot read exercise data or mint another token.
  • • Authorization is never cached: revoking a key, losing a subscription, or exhausting quota stops playback on the next request, not at token expiry.
  • • Requires MEDIA_TOKEN_SECRET to be configured; otherwise the endpoint returns 501.

Alternative: transparent server-side proxy

Your backend holds the key, adds the X-API-Key header, and streams our response through to the app. This is permitted and is not considered re-hosting, provided:

  • • Video is never written to disk, object storage, or any shared/CDN cache on your side.
  • • You pass our response headers through unchanged rather than substituting your own — we send Cache-Control: no-store on video deliberately.
  • • Your edge may cache everything except the video bytes: metadata up to 30 days, thumbnails 24 hours on-device only (private), bodymaps never.

Range requests work through a pass-through proxy — media served from our own store returns 206 Partial Content with Content-Range, so seeking behaves normally. A file served via our origin fallback answers 200 with the whole body instead, so treat partial content as the normal case rather than a guarantee.

Sizing your plan

Every /stream/ request is one API call — including each range request your player issues, and including requests authenticated by a media token. A single playback is therefore more than one call, and how many depends on your player. Measure the real count for your client before choosing a plan.

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: Supports HTTP range requests for efficient streaming and seeking. Users should only perform transient caching (e.g., in-memory playback buffers) as per the API Terms.

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

Bodymap Images

Bodymap images are anatomical muscle diagrams that highlight which muscles an exercise targets, grouped by training emphasis. They are available in male and female variants, with light and dark theme options.

Color Legend

Red: Primary muscles
Orange: Secondary muscles
Yellow: Tertiary muscles

PROFESSIONAL & ENTERPRISE tiers only

Bodymap fields and the bodymap streaming endpoint are restricted to PROFESSIONAL and ENTERPRISE subscription tiers. On lower tiers the bodymap_male and bodymap_female fields return null, and calling /stream/images/bodymaps/ returns 403 Forbidden. Upgrade your plan →

Response Fields

The following fields are included on exercise responses. Each is a stable base streaming URL with the gender already selected. Append theme and view query parameters to choose the exact image — or null when your tier does not allow access.

How to use these URLs

  1. Request an exercise with your X-API-Key.
  2. Read bodymap_male or bodymap_female from the JSON response.
  3. Append theme=light|dark and view=front|back.
  4. Fetch the final URL with the same X-API-Key. The response is binary image data, not JSON.
bodymap_male Base stream URL for the male bodymap variant
bodymap_female Base stream URL for the female bodymap variant
{
  "id": 1,
  "name": "Barbell Curl",
  ...
  "bodymap_male": "https://api.musclewiki.com/stream/images/bodymaps/1?gender=male",
  "bodymap_female": "https://api.musclewiki.com/stream/images/bodymaps/1?gender=female"
}

On BASIC, TESTING, and GROWTH tiers both fields are null.

Theme Variants

Each bodymap is available in light and dark theme variants. Append a theme query parameter to the streaming URL to select the variant, and a view query parameter to select front or back.

theme=light — White background (default)
theme=dark — Dark background, suitable for dark-mode UIs
GET/stream/images/bodymaps/{exercise_id}

Stream a bodymap diagram image. The server resolves the internal filename from the resource ID and validated gender , theme , and view parameters.

Path Parameters

exercise_id — Numeric exercise ID.

Query Parameters

gender male or female
theme light (default) or dark
view front (default) or back

Example Request

curl --fail --show-error --request GET \
  --url 'https://api.musclewiki.com/stream/images/bodymaps/1?gender=male&theme=dark&view=front' \
  --header 'X-API-Key: YOUR_API_KEY' \
  --output bodymap.png

Use --output for successful image responses, and --fail so 403/404 JSON errors are shown as curl failures instead of being saved into the PNG file. In an app, render the image from an authenticated fetch/blob URL rather than printing the binary response.

Debugging Errors

curl --include --request GET \
  --url 'https://api.musclewiki.com/stream/images/bodymaps/1?gender=male&theme=dark&view=front' \
  --header 'X-API-Key: YOUR_API_KEY'

Use this only when you expect an error response. A successful bodymap request returns binary image bytes, so the save-to-file command above is safer for normal use.

403 Forbiddenis returned when the requesting key's tier is below PROFESSIONAL. Upgrade at /#pricing.

Error Responses

The API uses standard HTTP status codes and returns error details in JSON format. All errors include a detail field with a human-readable message.

401

Unauthorized

Missing or invalid API key. Ensure you include the X-API-Key header with every request.

{
  "detail": "Authentication required",
  "message": "Missing X-API-Key header"
}
403

Forbidden

Invalid, expired, or deactivated API key.

{
  "detail": "Invalid or expired API key"
}
404

Not Found

Requested resource doesn't exist (e.g., invalid exercise ID or media file).

{
  "detail": "Exercise not found"
}
429

Rate Limit Exceeded

Monthly API quota exceeded. Upgrade your plan or wait for the next billing cycle.

{
  "detail": "Monthly API quota exceeded",
  "message": "Monthly API quota exceeded. Please upgrade your plan or wait for the next billing cycle."
}
422

Validation Error

Invalid query parameters or request format.

{
  "detail": [
    {
      "loc": ["query", "limit"],
      "msg": "ensure this value is less than or equal to 100",
      "type": "value_error.number.not_le"
    }
  ]
}
500

Internal Server Error

Unexpected server error. If this persists, contact support.

{
  "detail": "Internal server error"
}

Error Handling Best Practices

  • Always check HTTP status codes before parsing response bodies
  • Implement exponential backoff for 429 errors
  • Log error details for debugging but don't expose them to end users
  • For 500 errors, retry with exponential backoff (max 3 attempts)

MCP Server

New

The @musclewiki/mcp package is a first-party Model Context Protocol server. It runs locally over stdio and exposes the entire exercise database to any MCP-compatible AI assistant — Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Zed, and more — as native tools. Every call is forwarded to this API with your ownkey, so your tier, rate limits, and quota apply exactly as they would for a direct request. There is no shared key: the server reads your key from its local environment and sends it only to the MuscleWiki API to authenticate your own requests — never to the AI model or your assistant provider’s servers. Keep it in your local MCP client config; treat that config like any other secret and don’t commit it to source control.

Tier

TESTING or higher.A BASIC (playground-only) key is rejected on every tool call. Routine & workout tools additionally require PROFESSIONAL or ENTERPRISE.

Runtime

Node.js 18+ and any MCP-compatible client. Nothing else to install — npx fetches the server on first run.

Claude Code

claude mcp add musclewiki --env MUSCLEWIKI_API_KEY=mw_your_api_key_here -- npx -y @musclewiki/mcp

Any other MCP client

MCP is an open standard, so the sameserver works with every MCP-compatible host — there is no per-client build. Add one entry to your client’s config pointing at npx -y @musclewiki/mcp. Most clients (Claude Desktop, Cursor, Windsurf, Cline, …) use the mcpServers shape below verbatim:

{
  "mcpServers": {
    "musclewiki": {
      "command": "npx",
      "args": ["-y", "@musclewiki/mcp"],
      "env": {
        "MUSCLEWIKI_API_KEY": "mw_your_api_key_here"
      }
    }
  }
}

The location of the config (and, for VS Code and Zed, the wrapper key) differs per client — the command, args, and env inside are always the same:

ClientWhere the config lives
Claude Codeclaude mcp add (see command above)
Claude Desktopclaude_desktop_config.json
Cursor~/.cursor/mcp.json (or .cursor/mcp.json)
Windsurf~/.codeium/windsurf/mcp_config.json
VS Code (Copilot).vscode/mcp.json — wrap under a servers key (not mcpServers)
Zedsettings.json — wrap under context_servers
Any other hostSee that client’s MCP docs — the command/args are identical

Configuration

The server is configured entirely through environment variables in your MCP client config — no config file of its own.

VariableRequiredDescription
MUSCLEWIKI_API_KEYRequiredYour MuscleWiki key (starts with mw_). Sent to the API as the X-API-Key header — never to the AI model.
MUSCLEWIKI_BASE_URLOptionalOverride the API base URL. Defaults to https://api.musclewiki.com — set it only for local testing against your own instance.

Available tools

14 tools are exposed. You never name them yourself — describe what you want and the assistant picks and chains the right ones. Each maps to a single REST endpoint, so tier and quota apply per call.

  • search_exercisesGET /searchFull-text search by name or steps, with optional filters
  • list_exercisesGET /exercisesBrowse and filter — no query term needed
  • get_exerciseGET /exercises/{id}One exercise by numeric ID
  • list_categoriesGET /categoriesEquipment categories with counts
  • list_musclesGET /musclesPrimary muscle groups with counts
  • list_filtersGET /filtersEvery valid filter value — call first to avoid guessing
  • get_random_exerciseGET /randomA random exercise, optionally filtered
  • get_statisticsGET /statisticsAggregate database statistics
  • list_routinesGET /routinesProfessional / EnterprisePaginated routines
  • get_routineGET /routines/{id}Professional / EnterpriseA routine with its workout references
  • get_routine_fullGET /routines/{id}/fullProfessional / EnterpriseA routine, all workouts + exercises expanded
  • list_workoutsGET /workoutsProfessional / EnterprisePaginated workouts with filters
  • get_workoutGET /workouts/{id}Professional / EnterpriseA workout with exercise prescriptions
  • get_workout_fullGET /workouts/{id}/fullProfessional / EnterpriseA workout, all exercises expanded

Talk to it in plain language

Once connected, ask for what you want. The assistant handles tool selection and chaining. For example:

  • Find me five dumbbell exercises for biceps.
  • What equipment categories exist, and how many exercises does each have?
  • Show me a random bodyweight exercise with its instructions.
  • Get exercise 42 and summarise its steps.
  • Build me a beginner push/pull routine.

The workflow the model follows automatically

  1. 1. list_filters — learn the exact accepted filter strings (muscles, difficulties, forces, …).
  2. 2. search_exercises or list_exercises — query using those validated values.
  3. 3. get_exercise — pull full detail on a specific result.

Troubleshooting

SymptomFix
Every tool errors with MUSCLEWIKI_API_KEY … is requiredThe variable never reached the server. Put it in the env block of your client config (not just your shell) and restart the client.
403 on every call, detail Invalid or expired API keyInvalid, revoked, or mistyped key (the API returns 403, not 401, for a bad key). Copy a fresh one from your dashboard — keys start with mw_.
403 on every call, detail mentions tierBASIC-tier key (playground-only). Upgrade to TESTING or higher for direct API access.
403 only on routine / workout toolsThose tools need PROFESSIONAL or ENTERPRISE. Use the exercise tools on TESTING+, or upgrade.
429 errorsMonthly quota exceeded. Resets at the start of your next billing cycle, or upgrade for a higher quota.
npxcan’t find the package / server won’t startEnsure Node.js 18+ (node -v) and that npm can reach the registry.

Full reference, source, and changelog live in the @musclewiki/mcp package README.

Python Examples

import requests

url = "https://api.musclewiki.com/exercises"
headers = {
    "X-API-Key": "YOUR_API_KEY"
}

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://api.musclewiki.com/search?q=curl&limit=5';
const options = {
  method: 'GET',
  headers: {
    'X-API-Key': 'YOUR_API_KEY'
  }
};

try {
  const response = await fetch(url, options);
  const result = await response.json();
  console.log(result);
} catch (error) {
  console.error(error);
}

cURL Examples

Note: Replace YOUR_API_KEY with your actual API key from your dashboard. Need an API key? Create a free account.

curl --request GET \
  --url 'https://api.musclewiki.com/exercises/1' \
  --header 'X-API-Key: YOUR_API_KEY'

Stream Branded Video

curl --request GET \
  --url 'https://api.musclewiki.com/stream/videos/branded/male-Barbell-barbell-curl-front.mp4' \
  --header 'X-API-Key: YOUR_API_KEY' \
  --output video.mp4

Stream OG Image

curl --request GET \
  --url 'https://api.musclewiki.com/stream/images/og_images/og-male-Barbell-barbell-curl-front.jpg' \
  --header 'X-API-Key: YOUR_API_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/Hold (may be null)
  • grips - Grip types used
  • mechanic - Isolation/Compound (may be null)
  • difficulty - Novice/Beginner/Intermediate/Advanced (may be null)
  • steps - Step-by-step instructions
  • videos - Video demonstrations with URLs
  • bodymap_male / bodymap_female - Muscle diagram URLs (PROFESSIONAL & ENTERPRISE tiers only; null on lower tiers)
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

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/1 - 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 /exercises?force=push&difficulty=intermediate&limit=5
  2. 2GET /exercises?force=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

Commercial SaaS Fitness App

  1. 1Sign up for a GROWTH, PROFESSIONAL, or ENTERPRISE plan — commercial use included
  2. 2Integrate exercise data, videos, and search into your product
  3. 3Ship to paying customers with no additional licensing fees

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 for up to 30 days 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.

Ready to Build?

Sign up to get your API key and start building.