# NBA Player Season Stats

> NBA Player Season Stats is a paid API for AI agents from mlb-stats-api.fly.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns season statistics for an NBA player identified by their ESPN player ID.

## Facts

- Endpoint: GET https://mlb-stats-api.fly.dev/nba/player/:player_id
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mlb-stats-api-fly-dev-542bf5db
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SH4LH7Yua-83tUumy6tln

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability mlb-stats-api-fly-dev-542bf5db
```

Example prompt: What are LeBron James's season stats this year? His ESPN player ID is 1966.

## When to prefer this

Use this endpoint when you need season statistics for a specific NBA player and have their ESPN player ID. Prefer this over generic sports APIs when you need quick, cost-effective per-player NBA stat lookups without complex authentication.

## Known failure modes

- Invalid or unknown player_id returns an error or empty result
- Player not found if the ESPN player ID does not match an active NBA player
- Network timeout or service unavailability on the fly.dev host
- Player_id belonging to a non-NBA league (e.g. WNBA or NFL player) returns no data or wrong data

## How this service works

Season stats for an NBA player by player_id.

## Output

Returns season statistics for the specified NBA player, including metrics such as points per game, rebounds, assists, field goal percentage, and other standard NBA season averages.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "player_id": "3975"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "player_id"
     ],
     "properties": {
      "player_id": {
       "type": "string",
       "description": "ESPN player ID"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "request_id",
  "sport",
  "league",
  "retrieved_at",
  "data",
  "warnings",
  "errors"
 ],
 "properties": {
  "data": {
   "type": "object",
   "required": [
    "id",
    "first_name",
    "last_name",
    "full_name",
    "position",
    "jersey_number",
    "team_id",
    "stats"
   ],
   "properties": {
    "id": {
     "type": "string"
    },
    "stats": {
     "type": "null"
    },
    "team_id": {
     "type": "string"
    },
    "position": {
     "type": "string"
    },
    "full_name": {
     "type": "string"
    },
    "last_name": {
     "type": "string"
    },
    "first_name": {
     "type": "string"
    },
    "jersey_number": {
     "type": "string"
    }
   }
  },
  "sport": {
   "type": "string"
  },
  "errors": {
   "type": "array",
   "items": {
    "type": "unknown"
   }
  },
  "league": {
   "type": "string"
  },
  "warnings": {
   "type": "array",
   "items": {
    "type": "unknown"
   }
  },
  "request_id": {
   "type": "string"
  },
  "retrieved_at": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mlb-stats-api-fly-dev-542bf5db/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mlb-stats-api.fly.dev](https://www.zero.xyz/host/mlb-stats-api.fly.dev/llms.txt)
