Skip to content

MLB v3 Scores API

by sportsdata.io

API keyHTTPSEntertainment
Open documentation ↗

Overview

Live sports data provider with scores, odds, projections, stats, news, and images for NFL football, MLB Baseball, NBA Basketball, NHL Hockey, PGA Golf, NASCAR, Tennis Data, Soccer, and ESports. SportsDataIO provides sports API feeds and database downloads to power your website and mobile applications

MLB v3 Scores is an entertainment API from sportsdata.io. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 18 endpoints.

At a glance

Authentication
API key
HTTPS
Yes
CORS
Unknown
Base URL
http://azure-api.sportsdata.io/v3/mlb/scores
Version
1.0
Endpoints
18
Spec updated
2023-03-05

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "http://azure-api.sportsdata.io/v3/mlb/scores/FORMAT/AllTeams" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch("http://azure-api.sportsdata.io/v3/mlb/scores/FORMAT/AllTeams", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "http://azure-api.sportsdata.io/v3/mlb/scores/FORMAT/AllTeams",
    headers={
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/{format}/AllTeamsTeams (All)
GET/{format}/AreAnyGamesInProgressAre Games In Progress
GET/{format}/CurrentSeasonCurrent Season
GET/{format}/FreeAgentsPlayer Details by Free Agents
GET/{format}/Games/{season}Schedules
GET/{format}/GamesByDate/{date}Games by Date
GET/{format}/NewsNews
GET/{format}/NewsByDate/{date}News by Date
GET/{format}/NewsByPlayerID/{playerid}News by Player
GET/{format}/Player/{playerid}Player Details by Player
GET/{format}/PlayersPlayer Details by Active
GET/{format}/Players/{team}Players by Team
GET/{format}/StadiumsStadiums
GET/{format}/Standings/{season}Standings
GET/{format}/TeamGameStatsByDate/{date}Team Game Stats by Date
GET/{format}/TeamGameStatsBySeason/{season}/{teamid}/{numberofgames}Team Game Logs By Season
GET/{format}/TeamSeasonStats/{season}Team Season Stats
GET/{format}/teamsTeams (Active)

Questions

Does the MLB v3 Scores API need an API key?

Yes. The MLB v3 Scores API uses API key authentication; the documentation explains how to get credentials.

Does the MLB v3 Scores API support HTTPS?

Yes, the MLB v3 Scores API is served over HTTPS.

How many endpoints does the MLB v3 Scores API have?

Its OpenAPI description lists 18 endpoints in version 1.0. All of them are shown on this page.

What are alternatives to the MLB v3 Scores API?

Other Entertainment APIs include Techy, Imgflip, Official Joke, Betfair: Exchange Streaming API, Listen API: Podcast Search, Directory, and Insights API.

Compare alternatives →

Listed from APIs.guru (CC0).