BaseballData API
Data
Coverage
MLB seasons held129MLB 2026 games2,469Postseason line scores40WBC and Premier12 games242Czech box scores1,430
See all coverage
DocsPricingStatus

Documentation/Guides

Errors | Baseball Data API

Errors

Every code, and what to do.

A failure is {"error": {"code", "message", "docs"}}. The code is for your code and never changes; the message is for people.

CodeHTTPWhat to do
bad_request400A value was not what was expected; the message says which.
unauthorized401Send an active key in a header.
upgrade_required403Not on your plan; the answer names it.
not_found404No such thing. An empty list is a 200, never a 404.
method_not_allowed405Every call is GET.
unknown_parameter422Remove it; the answer lists the allowed ones.
rate_limited429Slow down; wait for Retry-After.
quota_exceeded429The day's calls are used; it resets at 00:00 UTC.
server_error500Our side; it has been logged. Try again shortly.