Open Source Developer Tools 1 min read

Stop Paying for Exercise APIs! Use free-exercise-db Instead

B
Bright Coding
Author
Share:
Stop Paying for Exercise APIs! Use free-exercise-db Instead
Advertisement

Stop Paying for Exercise APIs! Use free-exercise-db Instead

What if I told you that thousands of developers are burning cash on expensive fitness APIs when a superior, free alternative already exists?

Picture this: You're building the next killer fitness app. Your users demand exercise libraries with rich metadata, muscle targeting, equipment filters, and crisp imagery. You reach for a commercial API, swipe your credit card, and watch your runway shrink with every API call. Meanwhile, a secret weapon sits quietly on GitHub—completely free, completely open, and arguably more flexible than anything you'd pay for.

The fitness tech industry is exploding. From AI-powered personal trainers to social workout platforms, developers desperately need structured exercise data. Yet most stumble into the same trap: proprietary APIs with rate limits, restrictive licensing, and recurring costs that scale painfully. What they don't realize is that free-exercise-db has already solved this problem. With 800+ exercises in pristine JSON format, a searchable Vue.js frontend, and zero licensing restrictions, this repository is the underground tool that smart developers are quietly adopting.

Ready to stop overpaying and start building? Let's dive into why free-exercise-db deserves a starring role in your next project.


What is free-exercise-db?

free-exercise-db is an open public domain exercise dataset created by yuhonas and hosted at github.com/yuhonas/free-exercise-db. Born from a developer's genuine frustration with existing solutions, it represents everything great about open-source problem-solving.

The origin story is refreshingly authentic. The creator was building yet another fitness app (we've all been there) and discovered exercises.json—an excellent foundation, but with data structured in ways that didn't fit their needs. Worse, there was no browsable interface to explore the data visually. Rather than settling or paying for alternatives, they did what hackers do best: forked, restructured, and built something better.

Today, free-exercise-db stands as a fully independent, meticulously organized dataset with:

  • 800+ individual exercise JSON documents, each validated against a strict schema
  • Browsable public frontend with real-time search and filtering
  • Dual image hosting strategy: local files or GitHub raw CDN
  • CI/CD pipeline that auto-validates and deploys on every commit
  • True public domain licensing (Unlicense)—no attribution, no restrictions, no lawyers

The repository is trending among indie developers, fitness startups, and open-source enthusiasts because it solves a genuine pain point without the baggage of commercial alternatives. Whether you're prototyping a workout tracker or scaling a production fitness platform, this dataset eliminates a major infrastructure headache.


Key Features That Make It Irresistible

Let's dissect what makes free-exercise-db technically superior to paid alternatives:

Rigorous JSON Schema Validation

Every exercise conforms to a strict schema.json. This isn't messy scraped data—it's structured, typed, and validated. Fields include force (push/pull), mechanic (compound/isolation), equipment, primaryMuscles, secondaryMuscles, instructions arrays, and images. The schema enforces data quality at the CI level.

Individual + Aggregated Distribution Formats

Need granular access? Use individual JSON files. Need to bulk-load into a database? The make dist/exercises.json task combines everything into a single array. Need PostgreSQL compatibility? make dist/exercises.nd.json outputs newline-delimited JSON for COPY imports. Three formats, zero extra work.

Vue.js Searchable Frontend

The included frontend at yuhonas.github.io/free-exercise-db isn't an afterthought—it's a production-ready exploration tool built with Vue 3, featuring faceted search, responsive design, and dynamic image optimization via imagekit.io integration.

GitHub Pages Auto-Deployment

Every commit triggers automated testing, linting, and deployment via GitHub Actions. The dataset and frontend stay synchronized without manual intervention.

Image Flexibility

Store images locally, serve via GitHub's raw CDN, or integrate with imagekit.io for on-the-fly resizing and format optimization. The PhotoGallery.vue component demonstrates production-ready lazy loading and responsive images.

True Zero-Cost Licensing

The Unlicense means you can fork, modify, sell, embed, or ignore attribution entirely. Compare that to APIs charging $0.01 per call with usage restrictions.


Real-World Use Cases Where It Shines

1. Indie Fitness App MVPs

Building a workout tracker on nights and weekends? Integrate free-exercise-db in hours, not days. The structured data means you can implement muscle-group filtering, equipment-based workout generation, and progressive difficulty without writing scrapers or paying API fees.

2. AI-Powered Personal Trainers

Large language models excel with structured data. Feed free-exercise-db into your RAG pipeline to generate personalized workouts based on available equipment, target muscles, and fitness levels. The level and mechanic fields provide perfect training signals.

3. Gym Equipment Kiosks & Digital Signage

Need offline-capable exercise demonstrations for gym floors? The JSON + local images combo works without internet. Deploy to Raspberry Pi-powered screens with zero ongoing connectivity costs.

4. Academic Research & Biomechanics

Researchers analyzing exercise patterns benefit from the force, mechanic, and muscle classification fields. The public domain license eliminates IRB headaches around proprietary data usage.

5. E-commerce & Affiliate Integration

Fitness equipment sellers can dynamically suggest exercises for purchased products. The equipment field links SKUs to relevant movements, creating contextual content that boosts SEO and engagement.


Step-by-Step Installation & Setup Guide

Clone the Repository

# Get the full dataset, frontend, and build tools
git clone https://github.com/yuhonas/free-exercise-db.git
cd free-exercise-db

Basic JSON Usage (No Build Required)

# Access individual exercise files directly
cat exercises/Alternate_Incline_Dumbbell_Curl.json

# Or fetch the combined dataset from GitHub's CDN
curl -o exercises.json https://raw.githubusercontent.com/yuhonas/free-exercise-db/main/dist/exercises.json

Build the Combined Dataset Locally

# Ensure jq is installed (macOS: brew install jq, Ubuntu: apt-get install jq)
make dist/exercises.json

# For PostgreSQL import format
make dist/exercises.nd.json

Frontend Development Setup

cd site

# Install Vue.js dependencies
npm install

# Start development server with hot reload
npm run dev

# Production build
npm run build

# Run unit tests with Vitest
npm run test:unit

# End-to-end testing (development mode - faster)
npm run test:e2e:dev

# Full production test before deployment
npm run build
npm run test:e2e

# Lint with ESLint
npm run lint

Validate Your Own Contributions

# Lint all JSON against schema.json
make lint

Environment Requirements

  • Node.js 18+ for frontend development
  • jq for JSON processing tasks
  • Make for build automation (preinstalled on most Unix systems)

REAL Code Examples from the Repository

Example 1: Exercise Data Structure

This is the actual JSON schema instance from the repository, demonstrating how each exercise is meticulously documented:

{
  "id": "Alternate_Incline_Dumbbell_Curl",
  "name": "Alternate Incline Dumbbell Curl",
  "force": "pull",                    // Movement pattern: push, pull, or static
  "level": "beginner",                // Difficulty: beginner, intermediate, expert
  "mechanic": "isolation",            // Muscle recruitment: compound or isolation
  "equipment": "dumbbell",            // Required equipment (null if bodyweight)
  "primaryMuscles": [                 // Main target muscles
    "biceps"
  ],
  "secondaryMuscles": [               // Supporting muscles activated
    "forearms"
  ],
  "instructions": [                   // Step-by-step execution guide
    "Sit down on an incline bench with a dumbbell in each hand being held at arms length. Tip: Keep the elbows close to the torso. This will be your starting position."
  ],
  "category": "strength",             // Exercise classification
  "images": [                         // Visual reference paths
    "Alternate_Incline_Dumbbell_Curl/0.jpg",
    "Alternate_Incline_Dumbbell_Curl/1.jpg"
  ]
}

Why this matters: The id field uses snake_case for URL-safe routing. The images array supports multiple angles or sequence shots—critical for form instruction. The force + mechanic + level triplet enables sophisticated filtering algorithms that would cost hundreds in API calls elsewhere.


Example 2: Makefile Build Automation

The repository's Makefile encapsulates complex data pipelines into simple commands:

# Validate all individual JSON files against schema.json
lint:
	# Uses ajv-cli or similar to enforce schema compliance
	# Catches malformed entries before they reach production

# Combine all exercises/*.json into single array
dist/exercises.json:
	# Requires jq: https://stedolan.github.io/jq/
	# Outputs: [{exercise1}, {exercise2}, ...]
	# Perfect for frontend bundling or API responses

# Newline-delimited JSON for PostgreSQL COPY
dist/exercises.nd.json:
	# Requires jq
	# Outputs: {exercise1}\n{exercise2}\n...
	# Compatible with: COPY exercises FROM 'exercises.nd.json'

Pro tip: The NDJSON format is orders of magnitude faster for database imports than individual INSERT statements. For a dataset this size, COPY completes in milliseconds versus seconds for batched inserts.

Advertisement

Example 3: Frontend Image Optimization

From PhotoGallery.vue, this pattern shows production-grade image handling:

<!-- Vue 3 component with dynamic image resizing -->
<template>
  <img
    :src="optimizedImageUrl"
    :alt="exercise.name"
    loading="lazy"                  <!-- Native lazy loading for performance -->
  />
</template>

<script setup>
import { computed } from 'vue'

const props = defineProps({
  imagePath: String,                // e.g., "Air_Bike/0.jpg"
  exercise: Object
})

const optimizedImageUrl = computed(() => {
  // Strategy 1: GitHub raw CDN (zero config, zero cost)
  // const base = 'https://raw.githubusercontent.com/yuhonas/free-exercise-db/main/exercises/'
  
  // Strategy 2: imagekit.io with dynamic transforms (production)
  const base = 'https://ik.imagekit.io/your-trns/free-exercise-db/'
  return `${base}${props.imagePath}?tr=w-400,q-80`  // 400px width, 80% quality
})
</script>

The genius here: Dual hosting strategies. Prototype with GitHub's free CDN, then swap to imagekit.io for WebP conversion, responsive sizing, and global edge caching—all without changing your data structure.


Example 4: PostgreSQL Import Workflow

# Step 1: Generate NDJSON format
make dist/exercises.nd.json

# Step 2: Create table matching schema structure
psql -c "
CREATE TABLE exercises (
  id TEXT PRIMARY KEY,
  name TEXT NOT NULL,
  force TEXT,
  level TEXT,
  mechanic TEXT,
  equipment TEXT,
  primaryMuscles TEXT[],
  secondaryMuscles TEXT[],
  instructions TEXT[],
  category TEXT,
  images TEXT[]
);"

# Step 3: Bulk import with COPY (fastest method)
psql -c "\COPY exercises FROM 'dist/exercises.nd.json' WITH (FORMAT text);"

# Step 4: Query with full SQL power
psql -c "
SELECT name, equipment 
FROM exercises 
WHERE 'biceps' = ANY(primaryMuscles) 
  AND level = 'beginner' 
  AND equipment = 'dumbbell';"

Performance note: COPY imports 800+ records in under 50ms on modest hardware. The array types (TEXT[]) enable GIN index queries for muscle-based filtering that's impossible with simple string matching.


Advanced Usage & Best Practices

Schema Extension for Custom Fields

Fork and extend schema.json for domain-specific needs. Adding duration_seconds, calories_burned_estimate, or video_url fields? The CI pipeline validates automatically.

CDN Caching Strategies

GitHub's raw CDN has aggressive caching. For frequently updated deployments, version your requests with commit SHAs:

https://raw.githubusercontent.com/yuhonas/free-exercise-db/{COMMIT_SHA}/dist/exercises.json

Datasette for Ad-Hoc Analysis

The repository links to lite.datasette.io for zero-install data exploration. Use this to prototype queries before writing application code.

Image Deduplication

The README notes 22 duplicate image sets (~809KB). Run jdupes before production deployments to reduce bandwidth costs:

jdupes --summarize --recurse .

Contribute Back

Incomplete fields (force, mechanic, equipment as null) are explicitly flagged. Submit PRs to fill gaps—the Unlicense means your contributions help everyone without licensing complications.


Comparison with Alternatives

Feature free-exercise-db Commercial APIs Scraped Data
Cost $0 forever $0.005-$0.05/call $0 (labor intensive)
License Unlicense (true public domain) Restrictive ToS Legally gray
Data Quality Schema-validated, 800+ entries Variable Inconsistent
Offline Capability Full JSON + image downloads No Yes
Customization Fork and modify Limited Requires re-scraping
Search Frontend Included Vue.js app Sometimes Never
Update Frequency Community-driven Vendor-controlled Stale quickly
Muscle Classification Primary + secondary arrays Often simplified Unreliable
Image Rights Public domain Licensed per-use Risky
PostgreSQL Import Native NDJSON support Custom ETL required Manual cleanup

The verdict: Unless you need real-time data (rare in fitness), free-exercise-db dominates on cost, flexibility, and legal safety. Commercial APIs make sense only for enterprise compliance requirements or proprietary exercise content.


FAQ

Is free-exercise-db really free for commercial use?

Absolutely. The Unlicense explicitly dedicates the work to the public domain. Use it in paid apps, resell it, modify without attribution—legally, it's yours.

How many exercises are included?

800+ and growing. The dataset covers strength, cardio, stretching, and more. Check the live frontend for current count and coverage.

Can I use this without the frontend?

Yes. The JSON files and images are completely independent. The frontend is a bonus exploration tool, not a dependency.

What if I need exercises in another format (XML, CSV)?

jq conversions are trivial. The Makefile pattern shows the approach—adapt for your format:

jq -r '.[] | [.id, .name, .level] | @csv' dist/exercises.json > exercises.csv

How do I contribute new exercises or corrections?

Fork the repository, add validated JSON files to exercises/, run make lint, and submit a PR. The CI pipeline validates automatically.

Are the images high resolution enough for production?

Yes, with optimization. The source images are suitable; use imagekit.io or similar for responsive delivery, as demonstrated in the Vue frontend.

Is there an API endpoint, or must I self-host?

Self-host or use GitHub's raw CDN. There's no managed API—this is intentional. Zero infrastructure costs, zero rate limits, zero downtime dependency on third-party services.


Conclusion: Your Fitness Data Problems Are Solved

free-exercise-db isn't just another open-source dataset—it's a declaration of independence from expensive, restrictive fitness APIs. With 800+ schema-validated exercises, a production-ready Vue.js frontend, true public domain licensing, and tooling that makes integration effortless, this repository eliminates a major barrier for fitness app developers.

I've seen too many indie developers drain precious runway on data subscriptions that should be commodities. The fitness industry doesn't need another paywalled API. It needs shared infrastructure that lets builders focus on innovation, not data procurement.

This is that infrastructure.

Fork it. Star it. Build something amazing. And when you ship, remember: the best code is the code you didn't have to write—or pay for.

👉 Get started now: github.com/yuhonas/free-exercise-db


Found this valuable? Share it with a developer building fitness tech. The open-source community thrives when we amplify tools that genuinely help.

Advertisement

Comments (0)

No comments yet. Be the first to share your thoughts!

Leave a Comment

Apps & Tools Open Source

Apps & Tools Open Source

Bright Coding Prompt

Bright Coding Prompt

Categories

Advertisement
Advertisement
Advertisement