Lyfta Developer API

API Access

Generate credentials, authenticate requests, and understand the workout and exercise data returned by the Lyfta API.

Base URLhttps://my.lyfta.app
60requests per minute
5,000requests per day
100max workouts per page
Credentials

Generate an API key

Shown once

Your API key provides programmatic access to your Lyfta data. Use the button below to generate an API key.

Important Notes:

  • Generating a new API key will automatically revoke and replace any previously active key.
  • Your API key is displayed only once upon generation. Please copy and store it in a safe place immediately. You will not be able to retrieve it again.
1

Generate your key

Create an API key above. A new key revokes and replaces any previously active key.

2

Add the bearer header

Send your key in the authorization header on every request.

3

Page through data

Use limit and page to control list responses.

Usage

Rate Limits

429 on exceed

You can make up to 60 requests per minute and 5,000 requests per day. Exceeding these limits will result in a 429 Too Many Requests response.

Reference

Endpoints

Base URL: https://my.lyfta.app

All requests must include the following header:

Authorization header
Authorization: Bearer YOUR_API_KEY
Lists

Pagination

List endpoints support pagination via the optional limit and page query parameters. You can request up to 100 workouts per call. Requests specifying a higher limit will be capped at 100.

Example

Python Example

Python
import requests
import json

API_KEY = 'YOUR_API_KEY' # Replace with your actual API key
BASE_URL = 'https://my.lyfta.app' # 

headers = {
    'Authorization': f'Bearer {API_KEY}',
}

# Example: Fetch first page of workouts with up to 10 per page
params = {
    'limit': 10,
    'page': 1,
}

response = requests.get(f'{BASE_URL}/api/v1/workouts', headers=headers, params=params)

if response.status_code == 200:
    data = response.json()
    print("Workouts:")
    print(json.dumps(data, indent=2)) # Pretty print
else:
    print(f"Error {response.status_code}:", response.text)
Schemas

Data Structures

Workout Data Structure

The API returns a list of detailed workouts in the following structure. This is the typical response for GET /api/v1/workouts:

GET /api/v1/workouts response
{
  "status": boolean,
  "count": int,
  "total_records": int,
  "total_pages": int,
  "current_page": int,
  "limit": int,
  "workouts": [
    {
      "id": int,
      "title": string,
      "body_weight": int,
      "workout_perform_date": string, // ISO date or datetime
      "total_volume": int,
      "totalLiftedWeight": int,
      "user": {
        "username": string
      },
      "exercises": [
        {
          "exercise_id": int,
          "excercise_name": string,
          "exercise_type": string, // e.g. "weight_reps"
          "exercise_image": string, // URL
          "exercise_rest_time": int,
          "sets": [
            {
              "id": string,
              "weight": string, // or float as string
              "reps": string, // or int as string
              "rir": string,
              "duration": string,
              "distance": string,
              "set_type_id": string,
              "is_completed": boolean,
              "record_type": string,
              "record_level": string,
              "record_value": string
            }
            // ... more sets ...
          ]
        }
        // ... more exercises ...
      ]
    }
    // ... more workouts ...
  ]
}

Notes:

  • The top-level object contains pagination and status fields, and a workouts array.
  • Each workout contains summary fields, a user object, and an exercises array.
  • Each exercise contains its own sets array, with minimal set fields.
  • Some fields may be optional or null depending on the workout type.

Workout Summary Data Structure

The GET /api/v1/workouts/summary endpoint returns a list of workout summaries with up to 1000 records per call. The structure is as follows:

GET /api/v1/workouts/summary response
{
  "status": boolean,
  "count": int,
  "total_records": int,
  "total_pages": int,
  "current_page": int,
  "limit": int,
  "workouts": [
    {
      "id": string, // or int
      "title": string,
      "description": string | null,
      "workout_duration": string, // e.g. "01:06:25"
      "total_volume": string, // or int as string
      "workout_perform_date": string // ISO date or datetime, e.g. "2025-07-15 06:42:09"
    }
    // ... more workouts ...
  ]
}

Notes:

  • The summary object omits exercise and set details, providing only high-level workout information.
  • All fields are strings except for status, count, total_records, total_pages, current_page, and limit.
  • Use limit to control the number of records returned (up to 1000 per call).

Exercise Data Structure

The GET /api/v1/exercises endpoint returns a list of performed exercises in the following structure:

GET /api/v1/exercises response
{
  "status": true,
  "count": 10,
  "current_page": 1,
  "limit": 10,
  "exercises": [
    {
      "id": "31",
      "name": "Rear Lunge",
      "image_name": "https://apilyfta.com/static/GymvisualPNG/00781101-Barbell-Rear-Lunge_Thighs_small.png",
      "equipment_id": "[\"1\"]",
      "body_part_id": "[\"19\",\"1\"]",
      "Target_muscles_id": "[\"13\",\"27\"]",
      "Synergist_muscles_id": "[\"3\",\"32\"]",
      "exercise_type": "weight_reps"
    },
    // ... more exercises ...
  ]
}

Notes:

  • The exercises array contains objects for each exercise performed.
  • IDs may be strings or numbers depending on the source.
  • Fields like equipment_id, body_part_id, Target_muscles_id, and Synergist_muscles_id are JSON-encoded arrays of IDs.
  • Some fields may be optional or null depending on the exercise.

Exercise ID Mappings

Exercise metadata fields such as equipment_id, body_part_id, Target_muscles_id, and Synergist_muscles_id are returned as JSON-encoded arrays of IDs. Parse the string first, then map each ID using the tables below.

Example decoded values

FieldRaw valueDecoded value
equipment_id["1"]Barbell
body_part_id["19","1"]Quadriceps, Thighs
Target_muscles_id["13","27"]Gluteus Maximus, Quadriceps
Synergist_muscles_id["3","32"]Adductor Magnus, Soleus

Equipment IDs

Used by equipment_id.

IDName
1Barbell
2Body weight
3Cable
4Dumbbell
5EZ Barbell
6Leverage machine
7Sled machine
8Smith machine
9Weighted
10Assisted
11Band
12Battling Rope
13Bosu ball
14Hammer
15Kettlebell
16Medicine Ball
17Olympic barbell
18Power Sled
19Resistance Band
20Roll
21Rollball
22Rope
23Stability ball
24Stick
25Suspension
26Trap bar
27Vibrate Plate
28Wheel roller

Body Part IDs

Used by body_part_id.

IDName
1Thighs
2Chest
3Hips
4Back
5Upper Arms
6Shoulders
7Forearms
8Calves
9Neck
10Cardio
11Full body
12Waist
13Plyometrics
14Weightlifting
15Yoga
16Stretching
17Biceps
18Triceps
19Quadriceps
20Hamstrings

Muscle IDs

Used by Target_muscles_id and Synergist_muscles_id.

IDName
2Adductor Longus
3Adductor Magnus
4Biceps Brachii
5Brachialis
6Brachioradialis
7Deep Hip External Rotators
8Deltoid Anterior
9Deltoid Lateral
10Deltoid Posterior
11Erector Spinae
12Gastrocnemius
13Gluteus Maximus
14Gluteus Medius
15Gluteus Minimus
16Gracilis
17Hamstrings
18Iliopsoas
19Infraspinatus
20Latissimus Dorsi
21Levator Scapulae
22Obliques
23Pectineous
24Pectoralis Major Clavicular Head
25Pectoralis Major Sternal Head
26Popliteus
27Quadriceps
28Rectus Abdominis
29Sartorius
30Serratus Ante
31Serratus Anterior
32Soleus
33Splenius
34Sternocleidomastoid
35Subscapularis
36Tensor Fasciae Latae
37Teres Major
38Teres Minor
39Tibialis Anterior
40Transverse Abdominis
41Trapezius Lower Fibers
42Trapezius Middle Fibers
43Trapezius Upper Fibers
44Triceps Brachii
45Wrist Extensors
46Wrist Flexors

Exercise Progress Data Structure

The GET /api/v1/exercises/progress endpoint returns progress data for a specific exercise in the following structure:

GET /api/v1/exercises/progress response
{
  "status": true,
  "weight_unit": "kg",
  "data": [
    {
      "date": "2025-07-21",
      "best_weight": 110,
      "best_reps": 15,
      "best_volume": 800,
      "estimated_rm": "128"
    },
    {
      "date": "2025-07-14",
      "best_weight": 120,
      "best_reps": 15,
      "best_volume": 1000,
      "estimated_rm": "133"
    },
    {
      "date": "2025-06-30",
      "best_weight": 80,
      "best_reps": 20,
      "best_volume": 1600,
      "estimated_rm": "133"
    }
    // ... more records ...
  ]
}

Query Parameters:

  • duration (required): Number of days to include in the progress data (e.g., 365 for one year).
  • exercise_id (required): The ID of the exercise to fetch progress for (from the performed exercise list IDs).

Example params object for a request:

Params
params = {
  'duration': 365, // in days
  'exercise_id': 2, // from the performed exercise list ids
}
  • Both parameters are required for the endpoint to return data.

Notes:

  • The data array contains progress records for the exercise, typically grouped by date.
  • best_weight, best_reps, and best_volume represent the best set or total for that day.
  • estimated_rm is the estimated one-rep max, usually as a string.
  • weight_unit indicates the unit for weight values (e.g., kg or lb).