---
title: "Advanced stats"
method: POST
path: "/v1/get_advanced_stats"
tags: ["Stats + aggregation"]
---

# Advanced stats

`POST /v1/get_advanced_stats`

## Request

- Base URL: `https://mcp.endzoneapi.com`
- URL: `https://mcp.endzoneapi.com/v1/get_advanced_stats`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Use for tracking and advanced metrics the box score does not carry. Next Gen Stats (2016+): time to throw, air yards, completion percentage above expectation, separation, cushion, rush yards over expected. Pro Football Reference advanced (2018+): pressures, hurries, blitzes, drops, bad throws, missed tackles, coverage yards allowed. Pick a source, then filter by season, week, player or team. Costs 5 credits.

## Request body

- object
  - `source` 'ngs_passing' | 'ngs_rushing' | 'ngs_receiving' | 'pfr_passing' | 'pfr_rushing' | 'pfr_receiving' | 'pfr_defense', required: Which dataset: ngs_passing, ngs_rushing, ngs_receiving, pfr_passing, pfr_rushing, pfr_receiving, pfr_defense
  - `season` union: Season year. Defaults to current. NGS from 2016, PFR from 2018.
    - string
    - number
  - `week` integer: Week. NGS also publishes week 0 as the season aggregate.
  - `player_id` string: GSIS id for an ngs_* source, PFR id for a pfr_* source; both are on search_players
  - `team` string: Team code
  - `limit` integer: Max rows (default 50)

## Response `200`

The result, wrapped in data.

- object
  - `data` object, required
    - `source` string, required
    - `season` number, required
    - `player_id_kind` string, required
    - `metric_keys` string[], required
    - `stats` object[], required
      - `season` number, nullable
      - `week` number, nullable
      - `player_id` string, nullable
      - `name` string, nullable
      - `team` string, nullable
      - `metrics` object, required
    - `count` number, required
    - `note` string

## Other responses

- `400`: Invalid arguments.
- `401`: Missing or invalid API key.
- `402`: Not enough credits.
- `429`: Rate limited.

---

[API](https://skmtc.dev/endzoneapi/apis/endzoneapi-api.md) · [All operations](https://skmtc.dev/endzoneapi/apis/endzoneapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/endzoneapi/apis/endzoneapi-api/revisions/79ac6ebe298d?raw)
