Skip to content
AF

The AIFitnessAPI Data API and MCP Server

13 collections · 1651 rows · OpenAPI 3.1 · MCP · CC BY 4.0 · updated October 17, 2026

AIFitnessAPI serves its verified data to programs two ways, free and without a key: a read-only JSON API at https://aifitnessapi.com/api/v1, described by an OpenAPI 3.1 document, and a hosted MCP server at https://aifitnessapi.com/mcp that AI assistants connect to directly. Both answer only from the CC BY 4.0 datasets this site publishes, 13 collections and 1651 rows in all, and every response carries the page holding the sourced claim, the licence, the attribution and the date the data was verified.

What is available

  • JSON API. Index at https://aifitnessapi.com/api/v1, then one collection per dataset and one URL per row. GET only.
  • OpenAPI 3.1. https://aifitnessapi.com/api/v1/openapi.json describes every path and schema. It is generated from the same list as the endpoints, and each item path enumerates its ids, so it is also the complete list of item URLs.
  • Hosted MCP server. https://aifitnessapi.com/mcp speaks Streamable HTTP, statelessly, with 4 read-only tools. POST only; a GET answers 405 because there is no event stream to open.
  • Local MCP server. The same tools over stdio, from the @aifitnessapi/mcp package in this site’s repository, with the data bundled so it works offline.
  • Datasets. The JSON and CSV downloads the API is built from, with their methodology, on Open Datasets.
DataCollection and one itemRowsVerified
API directory/api/v1/apis
/api/v1/apis/{id}
242026-07-23
HealthKit type identifiers/api/v1/healthkit/types
/api/v1/healthkit/types/{identifier}
2412026-10-02
HealthKit metadata keys/api/v1/healthkit/metadata-keys
/api/v1/healthkit/metadata-keys/{swiftName}
672026-10-04
Health Connect record types/api/v1/health-connect/records
/api/v1/health-connect/records/{className}
422026-10-03
Health Connect permission strings/api/v1/health-connect/permissions
/api/v1/health-connect/permissions/{constant}
2192026-10-03
Wear OS Health Services data types/api/v1/wear-os/data-types
/api/v1/wear-os/data-types/{name}
652026-10-04
HealthKit to Health Connect type matrix/api/v1/matrix
/api/v1/matrix/{id}
102026-07-26
Dated ecosystem changes/api/v1/changes
/api/v1/changes/{id}
192026-07-31
Fitness and health API glossary/api/v1/glossary
/api/v1/glossary/{slug}
452026-07-31
Google Health API data types/api/v1/google-health-api/data-types
/api/v1/google-health-api/data-types/{dataType}
442026-10-17
Bluetooth fitness GATT characteristic fields/api/v1/bluetooth/gatt-fields
/api/v1/bluetooth/gatt-fields/{id}
3782026-10-17
Health and fitness MCP servers/api/v1/mcp-servers
/api/v1/mcp-servers/{id}
1762026-10-17
Pose-estimation keypoint maps/api/v1/pose/keypoints
/api/v1/pose/keypoints/{id}
3212026-10-17

“Verified” is the date each collection’s data was last checked or read from its primary source; each response says which of those it is. Generated datasets carry the day the generator read the vendor’s documentation, hand-maintained ones the review date of the page that carries them, and per-row dates where rows have their own.

Example requests

The index, one HealthKit type, one directory entry:

curl https://aifitnessapi.com/api/v1
curl https://aifitnessapi.com/api/v1/healthkit/types/stepCount
curl https://aifitnessapi.com/api/v1/apis/garmin

From JavaScript, in a browser or on a server:

const res = await fetch("https://aifitnessapi.com/api/v1/health-connect/records/StepsRecord");
if (!res.ok) throw new Error(`HTTP ${res.status}`); // an unknown id is a 404
const { item, source, verified, citeAs } = await res.json();

The response to https://aifitnessapi.com/api/v1/healthkit/types/stepCount, exactly as the API serves it today:

{
  "apiVersion": "v1",
  "self": "https://aifitnessapi.com/api/v1/healthkit/types/stepCount",
  "collection": "https://aifitnessapi.com/api/v1/healthkit/types",
  "title": "HealthKit type identifiers",
  "source": "https://aifitnessapi.com/healthkit/activity#id-stepcount",
  "verified": {
    "date": "2026-10-02",
    "meaning": "The date the generator read Apple's HealthKit documentation JSON (https://developer.apple.com/documentation/healthkit) for every row: the dataset's sourceReadOn."
  },
  "license": "CC-BY-4.0",
  "licenseUrl": "https://creativecommons.org/licenses/by/4.0/",
  "attribution": "aifitnessapi.com",
  "citeAs": "AIFitnessAPI, \"HealthKit Type Identifiers 2026,\" version 2026.1, aifitnessapi.com, https://aifitnessapi.com/datasets/healthkit-type-identifiers-2026.json",
  "dataset": {
    "slug": "healthkit-type-identifiers-2026",
    "name": "HealthKit Type Identifiers 2026",
    "version": "2026.1",
    "json": "https://aifitnessapi.com/datasets/healthkit-type-identifiers-2026.json",
    "csv": "https://aifitnessapi.com/datasets/healthkit-type-identifiers-2026.csv",
    "isBasedOn": "https://developer.apple.com/documentation/healthkit"
  },
  "key": "identifier",
  "id": "stepCount",
  "item": {
    "identifier": "stepCount",
    "objcConstant": "HKQuantityTypeIdentifierStepCount",
    "family": "HKQuantityTypeIdentifier",
    "group": "Activity",
    "abstract": "A quantity sample type that measures the number of steps the user has taken.",
    "aggregation": "cumulative",
    "unitFamily": "count",
    "valueEnum": null,
    "iosIntroduced": "8.0",
    "watchosIntroduced": "2.0",
    "deprecated": "no",
    "iosDeprecated": null,
    "deprecationNote": null,
    "renamedTo": null,
    "appleDocumented": "yes",
    "appleDocs": "https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier/stepcount"
  }
}

Collections share the same envelope and add description, methodology, count, fields (what each column means) and items. A directory entry adds the pages on this site that cover the product and the tracked changes that name it.

Connect an AI assistant (MCP)

The hosted server needs no key and no OAuth. In Claude Code, add it with one command:

claude mcp add --transport http aifitnessapi https://aifitnessapi.com/mcp

or check it into a project’s .mcp.json so a whole team gets it:

{
  "mcpServers": {
    "aifitnessapi": {
      "type": "http",
      "url": "https://aifitnessapi.com/mcp"
    }
  }
}

Any other client that supports the Streamable HTTP transport connects to the same URL; use its own setting for a remote server. Without a client, the protocol is plain JSON over POST, and in stateless mode a tool call needs no session first:

curl -s https://aifitnessapi.com/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"healthkit_type","arguments":{"query":"stepCount"}}}'

The tools

healthkit_type
Look up any Apple HealthKit identifier across all four families: HKQuantityTypeIdentifier (numeric samples), HKCategoryTypeIdentifier (enum-valued samples such as sleep analysis), HKCharacteristicTypeIdentifier (read-only user facts) and HKWorkoutActivityType. Returns the Swift case and Objective-C constant, what it measures, the platform versions, and the family-specific detail that matters: for quantity types whether it is CUMULATIVE (sum with .cumulativeSum) or DISCRETE (average with .discreteAverage), and for category types the HKCategoryValue enum that decodes the sample. Use this before writing any HKStatisticsQuery — picking the wrong aggregation returns a plausible wrong number rather than an error. Accepts a case name like 'stepCount' or 'sleepAnalysis', an Objective-C constant, or a search term like 'energy'.
health_data_cross_platform
Map a health metric between Apple HealthKit and Android Health Connect. Returns the type identifier on each platform plus the cross-platform gotcha where one exists — for example Apple stores HRV as SDNN while Health Connect stores RMSSD, which are different calculations and must not be normalised into a single field. Use this when building anything that must work on both platforms.
fitness_api_changes
Dated deprecations, turndowns and term changes across the fitness-API ecosystem (Fitbit, Google Fit, Oura, Garmin and others). Each entry is graded: 'confirmed' means a vendor's own words are quoted on the source page, 'reported' means the claim could not be confirmed on an official page. Date precision is preserved exactly as sourced — '2026-09' means a reported month, not a specific day.
fitness_api_glossary
Define a term from the fitness and health API domain — SDNN, RMSSD, pose estimation, aggregator, on-device store and similar. Returns the definition and the canonical page explaining it.

Run it locally over stdio

The stdio server runs the same tools from the same code, against the datasets bundled in the package, so it works offline and a pinned version keeps answering what that version said. As of October 17, 2026 @aifitnessapi/mcp is not published on npm, so run it from a clone of the repository:

git clone https://github.com/nikitastarovzz/aifitnessapi.git
cd aifitnessapi/mcp && npm ci
claude mcp add --transport stdio aifitnessapi -- node "$PWD/src/index.js"

Once the package is on npm, this configuration replaces the clone:

{
  "mcpServers": {
    "aifitnessapi": {
      "command": "npx",
      "args": [
        "-y",
        "@aifitnessapi/mcp"
      ]
    }
  }
}

Server aifitnessapi 0.1.0. Both servers answer the same questions the same way; if they ever disagree, the hosted one has newer data.

Licence and attribution

The data is Creative Commons Attribution 4.0: reuse it, including commercially, and credit aifitnessapi.com with a link to the page or dataset you used. Every response carries license, attribution, source and a ready-made citeAs string. Vendor text quoted in the data, such as Apple’s and Google’s descriptions, is reproduced to identify the API surface and remains theirs.

Bluetooth fitness GATT characteristic fields: CC BY 4.0 covers this compilation and its derived columns (offset, offsetVariesWith, flagsField, flagBit, flagValue, page). The UUIDs, identifiers, names, types and sizes are the Bluetooth SIG's, restated as facts from its public repository, and presentIf and unitEvidence quote the SIG's lines they were read from; the SIG's files carry the notice in sourceTerms, and this dataset does not relicense them. The SIG's descriptions are not included. Every response from this collection carries that note as licenseNote, and the collection response carries the source’s notice, verbatim, as sourceTerms.

Rates, caching and versions

Every /api/v1 response is a file written when the site is built, not computed per request, and is sent with Cache-Control: public, max-age=3600, stale-while-revalidate=86400. There are no keys and no quotas of ours; please cache responses, and download the dataset instead of fetching every item one by one. Collections are served whole, with no pagination: the largest, Bluetooth fitness GATT characteristic fields, is about 386 KB before compression. The MCP endpoint is the one part that runs per request, as a short stateless function.

The path carries the interface version (v1). The data carries its dataset edition, shown in every response, and field names are the datasets’ own column names. An unknown id answers HTTP 404 with the site’s HTML not-found page, so check the status code before parsing.

Only verified data, and it says so

No API response is computed per request and nothing is inferred to fill a gap. Every value is copied from a published dataset row, every row links the page that carries its sourced claim, and a field the site could not verify is null: never zero, never a guess. The MCP tools follow the same rule: when the data has no answer, the tool says so instead of producing a plausible one. How the data is verified is on our methodology page, and what the build refuses to publish is on the gates page.

Frequently asked questions

Does the AIFitnessAPI data API need a key or an account?
No. Every /api/v1 response is a static JSON file that anyone can GET from any origin (Access-Control-Allow-Origin: *), with no key, no sign-up and no write methods. The MCP endpoint at https://aifitnessapi.com/mcp likewise takes no key or OAuth step.
How do I connect an AI assistant to aifitnessapi.com's verified data?
Point any MCP client that supports the Streamable HTTP transport at https://aifitnessapi.com/mcp. In Claude Code that is one command: claude mcp add --transport http aifitnessapi https://aifitnessapi.com/mcp. The server exposes 4 read-only tools that answer only from the published datasets and end every answer with the page to cite.
Can I use the AIFitnessAPI API data in a commercial product?
Yes. The data is published under CC BY 4.0, whose one condition is attribution: credit aifitnessapi.com and link the page or dataset you used. Every response carries a ready-made citeAs string for that.
What does null mean in an AIFitnessAPI API response?
That the source does not state the value or it could not be verified. A null is never a zero and never a guess; where a value is derived from a vendor's prose rather than copied, the sentence it came from ships beside it.

Published by AIFitnessAPI. Independent and not sponsored; this site is funded by KinesteX, which is one row of the API directory and is recorded there on the same terms as every other product.