---
title: "Search players"
method: POST
path: "/v1/search_players"
tags: ["Static reference"]
---

# Search players

`POST /v1/search_players`

## Request

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

Use to find a player's id by name (partial names work). Costs 1 credit.

## Request body

- object
  - `name` string, required: Full or partial name.
  - `limit` integer
  - `league` 'mlb' | 'ncaabase': League. Defaults to mlb. One of: mlb, ncaabase.

## Response `200`

The result, wrapped in data.

- object
  - `data` object, required
    - `players` object[], required
    - `count` number, required

## Other responses

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

---

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