# MLB API

> Returns the MLB scoreboard of any day with teams, records, runs, hits, errors, inning scores and winning, losing and saving pitchers, plus player profiles and the 30 clubs.

Category: Sports & Gaming. Region: US. 3 endpoints at `https://api.hoshime.com/v1/mlb/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/mlb
## GET /v1/mlb/scores

MLB scoreboard of one day: every game with status, teams, records, runs, hits, errors, inning scores and winning, losing and saving pitchers.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `date` | string | yes | Day as YYYY-MM-DD in US Eastern time. (e.g. 2025-09-28) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `away` (Side), `away.abbreviation` (string), `away.errors` (any), `away.hits` (any), `away.innings` (string[]), `away.name` (string), `away.nickname` (string), `away.record` (string), `away.runs` (any), `away.teamId` (string), `date` (string), `decisions` (Decision[]), `decisions[].name` (string), `decisions[].playerId` (string), `decisions[].type` (string), `decisions[].url` (string), `home` (Side), `home.abbreviation` (string), `home.errors` (any), `home.hits` (any), `home.innings` (string[]), `home.name` (string), `home.nickname` (string), `home.record` (string), `home.runs` (any), `home.teamId` (string), `id` (string), `status` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/mlb/scores?date=2025-09-28" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mlb/player

Profile of one MLB player: position, number, bats and throws, height, weight, birth, draft, debut, current club and career regular-season totals.

Scope: `social:read` · Units: 1 · Cached: 360 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | MLB player id such as 592450, or the player's mlb.com page URL. (e.g. 592450) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `age` (any), `bats` (string), `birthDate` (string), `birthPlace` (string), `career` (Stat[]), `career[].name` (string), `career[].value` (string), `college` (string), `debutDate` (string), `draft` (string), `fullName` (string), `height` (string), `id` (string), `name` (string), `nickname` (string), `number` (string), `position` (string), `teamId` (string), `throws` (string), `url` (string), `weightLbs` (any)

```bash
curl "https://api.hoshime.com/v1/mlb/player?id=592450" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/mlb/teams

The 30 MLB clubs with id, name, abbreviation, city, league, division, first year and home ballpark.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `abbreviation` (string), `active` (boolean), `city` (string), `division` (string), `firstYear` (any), `id` (string), `league` (string), `name` (string), `nickname` (string), `venue` (string)

```bash
curl "https://api.hoshime.com/v1/mlb/teams" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
