GET
/
quantity
/
{type}
Get quantity series
curl --request GET \
  --url http://healthkite.local:8080/quantity/{type}
{
  "type": "HKQuantityTypeIdentifierStepCount",
  "unit": "count",
  "from": "2026-05-04T00:00:00Z",
  "to": "2026-05-11T00:00:00Z",
  "sampleEncoding": "columnar-v1",
  "sources": [
    {
      "id": 0
    }
  ],
  "samples": {
    "t": [
      0,
      60,
      120
    ],
    "dur": [
      60,
      60,
      60
    ],
    "v": [
      12,
      8,
      15
    ]
  },
  "sampleCount": 1247,
  "limit": 5000,
  "offset": 0,
  "total": 1247,
  "hasMore": false
}
type is a full HKQuantityTypeIdentifier... string — get the list from /quantity-types. Short forms (StepCount) are also accepted when they map unambiguously.

Query parameters

NameTypeDefaultRange
fromISO-8601 UTCto - 7 daysany
toISO-8601 UTCnowany
limitinteger50001-50000
offsetinteger0≥ 0
The default 7-day window keeps responses bounded; you must opt in to longer ranges. Sample-array conventions are the same as for workout streams (see Columnar encoding) with one difference: t is integer seconds offset from from (the response’s window start), not from a workout’s start.
  • dur array — included iff any sample has non-zero duration. Step-count and active-energy typically do; HR is instant.
  • src array — included iff any sample’s source differs from id: 0.
  • metadata map — sparse, present iff any sample has metadata.

MCP examples

Last week’s heart rate samples: get_quantity_series({ "type": "HKQuantityTypeIdentifierHeartRate", "from": "2026-05-04T00:00:00Z", "to": "2026-05-11T00:00:00Z" }) Resting HR over the past 60 days: get_quantity_series({ "type": "HKQuantityTypeIdentifierRestingHeartRate", "from": "2026-03-11T00:00:00Z", "to": "2026-05-11T00:00:00Z" })

Errors

  • 404 unknown_type — identifier doesn’t match any known quantity type.

Path Parameters

type
string
required

Full HKQuantityTypeIdentifier (short forms like StepCount also accepted).

Query Parameters

from
string<date-time>

ISO-8601 UTC window start. Default: to - 7 days.

to
string<date-time>

ISO-8601 UTC window end. Default: now.

limit
integer
default:5000
Required range: 1 <= x <= 50000
offset
integer
default:0
Required range: x >= 0

Response

Quantity series