# NHL player search API

Search NHL Player via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as limit, output, q, and retrieve structured data including search query string submitted, unique NHL player identifier, player full name, player position code, and player sweater number to resolve player ids, power search autocomplete, and lookup alumni and retirees.

Documentation: https://openany.si/nhl/nhl-player-search-api/52fe5775-540e-4648-97c0-d95d04f84e8f/
API ID: 52fe5775-540e-4648-97c0-d95d04f84e8f
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/nhl/v1/players/search
Page update time: 2026-12-03T02:43:08.635Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:43:05.576Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## NHL Player Search API

Send required `q` (a player name or partial name such as `mcdavid`) with optional `active` (`true` for active players only, `false` for retired only) and `limit` (1–100, default 20). Each item in `players[]` returns `player_id`, `name`, `position_code`, `team_abbrev`, `sweater_number`, measurables, and `url`.

## What You Can Build

- **Resolve player IDs**: Turn user-typed names into player\_id values for the Player Profile and Player Game Log APIs.
- **Power search autocomplete**: Set limit=10 and active=true for fast active-player typeahead pickers.
- **Lookup alumni and retirees**: Set active=false to search retired NHL players and inspect last\_team\_abbrev and last\_season\_id.

## Returned Data

| Field | Meaning |
| --- | --- |
| `q` | Search query string submitted |
| `count` | Number of matching players returned |
| `applied_filters.active` | Active/retired filter applied, if any |
| `players[].player_id` | Unique NHL player identifier |
| `players[].name` | Player full name |
| `players[].active` | Whether the player is currently active |
| `players[].position_code` | Player position code |
| `players[].team_abbrev` | Current or latest team abbreviation |
| `players[].sweater_number` | Player sweater number |
| `players[].url` | Canonical nhl.com player profile URL |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "NHL player search API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "q": {
          "type": "string",
          "description": "Player name or part of it."
        },
        "active": {
          "type": "boolean",
          "description": "`true` active players only, `false` retired only."
        },
        "limit": {
          "type": "integer",
          "description": "Results (1-100, default 20)."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      },
      "required": [
        "q"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "applied_filters": {
      "type": "object",
      "properties": {
        "active": {
          "type": "null"
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "fetched_at": {
      "type": "string"
    },
    "players": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean"
          },
          "birth_city": {
            "type": "string"
          },
          "birth_country": {
            "type": "string"
          },
          "birth_state_province": {
            "type": "string"
          },
          "height": {
            "type": "string"
          },
          "height_in_centimeters": {
            "type": "integer"
          },
          "height_in_inches": {
            "type": "integer"
          },
          "last_season_id": {
            "type": "null"
          },
          "last_team_abbrev": {
            "type": "null"
          },
          "last_team_id": {
            "type": "null"
          },
          "name": {
            "type": "string"
          },
          "player_id": {
            "type": "integer"
          },
          "position_code": {
            "type": "string"
          },
          "sweater_number": {
            "type": "null"
          },
          "team_abbrev": {
            "type": "null"
          },
          "team_id": {
            "type": "null"
          },
          "url": {
            "type": "string"
          },
          "weight_in_kilograms": {
            "type": "integer"
          },
          "weight_in_pounds": {
            "type": "integer"
          }
        }
      }
    },
    "q": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/nhl/v1/players/search?limit=1&output=json&q=mcdavid&raw=0' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "applied_filters": {
    "active": null
  },
  "cached": false,
  "count": 1,
  "credits_used": 1,
  "fetched_at": "2026-11-19T12:22:42.235Z",
  "players": [
    {
      "active": false,
      "birth_city": "Sudbury",
      "birth_country": "CAN",
      "birth_state_province": "ON",
      "height": "6'1\"",
      "height_in_centimeters": 185,
      "height_in_inches": 73,
      "last_season_id": null,
      "last_team_abbrev": null,
      "last_team_id": null,
      "name": "Brian McDavid",
      "player_id": 8457287,
      "position_code": "D",
      "sweater_number": null,
      "team_abbrev": null,
      "team_id": null,
      "url": "https://www.nhl.com/player/8457287",
      "weight_in_kilograms": 86,
      "weight_in_pounds": 190
    }
  ],
  "q": "mcdavid"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Can I search with just a partial name or last name?
Yes. The q parameter matches full or partial player names such as mcdavid.

### How do I filter to active or retired players only?
Pass active=true for active players only, active=false for retired players only, or omit active to search both.

### How many results can a single search return?
Set limit between 1 and 100; the default is 20.

### What can I do with the returned player_id?
Pass player_id directly to the NHL Player Profile API or NHL Player Game Log API.

### Does the response include imperial and metric measurables?
Yes. Each player record includes height_in_inches, height_in_centimeters, weight_in_pounds, and weight_in_kilograms.

### How do caching and output options work?
Output is JSON only. Pass fresh=1 to skip the 24-hour cache and raw=0 to omit bulky raw source blocks.

## Available implementations
- apish: https://openany.si/nhl/nhl-player-search-api/52fe5775-540e-4648-97c0-d95d04f84e8f/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
