---
title: "Search MLB players, teams, and content topics"
method: GET
path: "/mlb/search"
tags: ["MLB"]
---

# Search MLB players, teams, and content topics

`GET /mlb/search`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/mlb/search`
- Auth: API key in header `x-api-key`

Returns the same anonymous MLB typeahead categories used by MLB.com: player suggestions, team suggestions, content topics, and search terms. Queries need at least three characters.

## Query parameters

- `q` string, required

## Headers

- `x-api-key` string, required

## Response `200`

OK

- MlbSearchResponseDoc
  - `code` integer
  - `data` MlbSearchResponse
    - `fetched_at` string
    - `players` MlbPlayerSuggestion[]
      - `active` boolean
      - `boxscore_name` string
      - `display_name` string
      - `headshots` MlbImageRef[]
        - `type` string
        - `url` string
      - `id` integer
      - `name` string
      - `team_id` integer
      - `team_tri_code` string
      - `use_last_name` string
      - `use_name` string
    - `query` string
    - `search_terms` MlbTermSuggestion[]
      - `display_name` string
      - `name` string
    - `source_url` string
    - `teams` MlbTeamSuggestion[]
      - `club_name` string
      - `display_name` string
      - `franchise_name` string
      - `id` integer
      - `logos` MlbImageRef[]
        - `type` string
        - `url` string
      - `name` string
      - `sport_id` integer
      - `team_name` string
      - `tri_code` string
    - `topics` MlbTopicSuggestion[]
      - `display_name` string
      - `fields` integer[]
      - `name` string
      - `slug` string
  - `msg` string

## Other responses

- `400`: Bad Request
- `503`: Service Unavailable

---

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