MLB Data API

The MLB Data API is a comprehensive and powerful tool that provides access to a wealth of Major League Baseball (MLB) data.

About the API:  

With this API, developers can retrieve a wide range of information related to MLB players and teams, including player listings, team listings, player details, team details and more. Whether you are building a sports application, performing data analysis or creating engaging content, this API offers a wealth of MLB data to meet your needs.

In addition to player listings, the API also provides team listing functionality. This endpoint gives you access to an extensive list of MLB teams, along with their names, abbreviations, logos and other relevant information. Using this data, you can create team directories, display team logos, or provide users with up-to-date information about their favorite teams.

Another valuable feature of the MLB Data API is the ability to retrieve team logos. You can access a collection of images of different MLB teams. These images can be used to enhance team profiles, display images alongside statistics or create attractive visualizations within your application.

In addition, the API provides access to detailed information about individual players and teams. The API allows you to retrieve complete data about a specific player, including his biography, player measurements, career highlights, etc.

The MLB Data API is designed to be easy to use and easily integrated into your application or system. Data is returned in a structured format, typically JSON, making it easy to parse and incorporate into your code base. You can customize API requests to retrieve specific data or filter the results based on your needs.

In conclusion, the MLB Data API provides a complete solution for accessing MLB data. Whether you need player listings, team listings, team images, player details or team details, this API provides the tools you need to enrich your application, perform data analysis or create compelling MLB-related content. With its easy-to-use interface and broad data coverage, the API is a valuable resource for users, sports enthusiasts and anyone looking to leverage MLB data in their projects.

 

What this API receives and what your API provides (input/output)?

It will receive parameters and provide you with a JSON.

 

What are the most common uses cases of this API?

  1. Sports Applications: Can be used to develop sports applications that provide up-to-date player listings, team listings, team images, player details and team details. Users can access complete information about their favorite MLB players and teams.

  2. Fantasy Baseball: The API is useful for creating fantasy baseball applications. It allows users to access player listings and details, helping them make informed decisions when selecting players for their fantasy teams. In addition, team listings and details can be used to provide context and information about real MLB teams.

  3. Sports analytics: The data provided by the API can be used for sports analytics purposes. Researchers and analysts can retrieve player data, team data and other relevant information to perform in-depth analysis, identify trends.

  4. Content generation: The API's player and team listings can be used to generate dynamic content such as player profiles, team profiles and comparative articles. By integrating the data into content generation systems, writers and content creators can automatically obtain the most up-to-date information on players and teams.

  5. Sports news aggregation: Player listings, team listings, player details and team details from the API can be used to aggregate and display the latest news and updates about MLB players and teams. News applications can integrate the data to provide full coverage of player and team related news articles.

 

Are there any limitations to your plans?

  • Free Plan: 2 API Calls.

  • Basic Plan: 30,000 API Calls. 1,000 requests per day and 100 requests per minute.

  • Pro Plan: 150,000 API Calls. 5,000 requests per day and 200 requests per minute.

  • Pro Plus Plan: 300,000 API Calls. 10,000 requests per day and 400 requests per minute.

API Documentation

Endpoints


To use this endpoint all you have to do is run it and you will receive the available MLB teams.



                                                                            
GET https://www.zylalabs.com/api/2256/mlb+data+api/2119/get+all+teams
                                                                            
                                                                        

Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            [{"team":{"id":"29","uid":"s:1~l:10~t:29","slug":"arizona-diamondbacks","abbreviation":"ARI","displayName":"Arizona Diamondbacks","shortDisplayName":"Diamondbacks","name":"Diamondbacks","nickname":"Arizona","location":"Arizona","color":"a40013","alternateColor":"000000","isActive":true,"isAllStar":false,"logos":[{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500\/ari.png","alt":"","rel":["full","default"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500-dark\/ari.png","alt":"","rel":["full","dark"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500\/scoreboard\/ari.png","alt":"","rel":["full","scoreboard"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500-dark\/scoreboard\/ari.png","alt":"","rel":["full","scoreboard","dark"],"width":500,"height":500}],"links":[{"language":"en-US","rel":["clubhouse","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/_\/name\/ari\/arizona-diamondbacks","text":"Clubhouse","shortText":"Clubhouse","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["roster","desktop","team"],"href":"http:\/\/www.espn.com\/mlb\/team\/roster\/_\/name\/ari\/arizona-diamondbacks","text":"Roster","shortText":"Roster","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["stats","desktop","team"],"href":"http:\/\/www.espn.com\/mlb\/team\/stats\/_\/name\/ari\/arizona-diamondbacks","text":"Statistics","shortText":"Statistics","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["schedule","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/schedule\/_\/name\/ari","text":"Schedule","shortText":"Schedule","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["depthchart","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/depth\/_\/name\/ari","text":"Depth Chart","shortText":"Depth Chart","isExternal":false,"isPremium":false,"isHidden":false}]}},{"team":{"id":"15","uid":"s:1~l:10~t:15","slug":"atlanta-braves","abbreviation":"ATL","displayName":"Atlanta Braves","shortDisplayName":"Braves","name":"Braves","nickname":"Atlanta","location":"Atlanta","color":"0c2340","alternateColor":"ba0c2f","isActive":true,"isAllStar":false,"logos":[{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500\/atl.png","alt":"","rel":["full","default"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500-dark\/atl.png","alt":"","rel":["full","dark"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500\/scoreboard\/atl.png","alt":"","rel":["full","scoreboard"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500-dark\/scoreboard\/atl.png","alt":"","rel":["full","scoreboard","dark"],"width":500,"height":500}],"links":[{"language":"en-US","rel":["clubhouse","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/_\/name\/atl\/atlanta-braves","text":"Clubhouse","shortText":"Clubhouse","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["roster","desktop","team"],"href":"http:\/\/www.espn.com\/mlb\/team\/roster\/_\/name\/atl\/atlanta-braves","text":"Roster","shortText":"Roster","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["stats","desktop","team"],"href":"http:\/\/www.espn.com\/mlb\/team\/stats\/_\/name\/atl\/atlanta-braves","text":"Statistics","shortText":"Statistics","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["schedule","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/schedule\/_\/name\/atl","text":"Schedule","shortText":"Schedule","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["tickets","desktop","team"],"href":"https:\/\/www.vividseats.com\/atlanta-braves-tickets--sports-mlb-baseball\/performer\/50?wsUser=717","text":"Tickets","shortText":"Tickets","isExternal":true,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["depthchart","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/depth\/_\/name\/atl","text":"Depth Chart","shortText":"Depth Chart","isExternal":false,"isPremium":false,"isHidden":false}]}},{"team":{"id":"1","uid":"s:1~l:10~t:1","slug":"baltimore-orioles","abbreviation":"BAL","displayName":"Baltimore Orioles","shortDisplayName":"Orioles","name":"Orioles","nickname":"Baltimore","location":"Baltimore","color":"000000","alternateColor":"df4601","isActive":true,"isAllStar":false,"logos":[{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500\/bal.png","alt":"","rel":["full","default"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500-dark\/bal.png","alt":"","rel":["full","dark"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500\/scoreboard\/bal.png","alt":"","rel":["full","scoreboard"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500-dark\/scoreboard\/bal.png","alt":"","rel":["full","scoreboard","dark"],"width":500,"height":500}],"links":[{"language":"en-US","rel":["clubhouse","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/_\/name\/bal\/baltimore-orioles","text":"Clubhouse","shortText":"Clubhouse","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["roster","desktop","team"],"href":"http:\/\/www.espn.com\/mlb\/team\/roster\/_\/name\/bal\/baltimore-orioles","text":"Roster","shortText":"Roster","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["stats","desktop","team"],"href":"http:\/\/www.espn.com\/mlb\/team\/stats\/_\/name\/bal\/baltimore-orioles","text":"Statistics","shortText":"Statistics","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["schedule","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/schedule\/_\/name\/bal","text":"Schedule","shortText":"Schedule","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["depthchart","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/depth\/_\/name\/bal","text":"Depth Chart","shortText":"Depth Chart","isExternal":false,"isPremium":false,"isHidden":false}]}},{"team":{"id":"2","uid":"s:1~l:10~t:2","slug":"boston-red-sox","abbreviation":"BOS","displayName":"Boston Red Sox","shortDisplayName":"Red Sox","name":"Red Sox","nickname":"Boston","location":"Boston","color":"0d2b56","alternateColor":"bd3039","isActive":true,"isAllStar":false,"logos":[{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500\/bos.png","alt":"","rel":["full","default"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500-dark\/bos.png","alt":"","rel":["full","dark"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500\/scoreboard\/bos.png","alt":"","rel":["full","scoreboard"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500-dark\/scoreboard\/bos.png","alt":"","rel":["full","scoreboard","dark"],"width":500,"height":500}],"links":[{"language":"en-US","rel":["clubhouse","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/_\/name\/bos\/boston-red-sox","text":"Clubhouse","shortText":"Clubhouse","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["roster","desktop","team"],"href":"http:\/\/www.espn.com\/mlb\/team\/roster\/_\/name\/bos\/boston-red-sox","text":"Roster","shortText":"Roster","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["stats","desktop","team"],"href":"http:\/\/www.espn.com\/mlb\/team\/stats\/_\/name\/bos\/boston-red-sox","text":"Statistics","shortText":"Statistics","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["schedule","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/schedule\/_\/name\/bos","text":"Schedule","shortText":"Schedule","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["depthchart","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/depth\/_\/name\/bos","text":"Depth Chart","shortText":"Depth Chart","isExternal":false,"isPremium":false,"isHidden":false}]}},{"team":{"id":"16","uid":"s:1~l:10~t:16","slug":"chicago-cubs","abbreviation":"CHC","displayName":"Chicago Cubs","shortDisplayName":"Cubs","name":"Cubs","nickname":"Chicago","location":"Chicago","color":"00417d","alternateColor":"00417d","isActive":true,"isAllStar":false,"logos":[{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500\/chc.png","alt":"","rel":["full","default"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500-dark\/chc.png","alt":"","rel":["full","dark"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500\/scoreboard\/chc.png","alt":"","rel":["full","scoreboard"],"width":500,"height":500},{"href":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500-dark\/scoreboard\/chc.png","alt":"","rel":["full","scoreboard","dark"],"width":500,"height":500}],"links":[{"language":"en-US","rel":["clubhouse","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/_\/name\/chc\/chicago-cubs","text":"Clubhouse","shortText":"Clubhouse","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["roster","desktop","team"],"href":"http:\/\/www.espn.com\/mlb\/team\/roster\/_\/name\/chc\/chicago-cubs","text":"Roster","shortText":"Roster","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["stats","desktop","team"],"href":"http:\/\/www.espn.com\/mlb\/team\/stats\/_\/name\/chc\/chicago-cubs","text":"Statistics","shortText":"Statistics","isExternal":false,"isPremium":false,"isHidden":false},{"language":"en-US","rel":["schedule","desktop","team"],"href":"https:\/\/www.espn.com\/mlb\/team\/schedule\/_\/name\/chc","text":"Schedule","shortText":"Schedule","isExternal":false,"isPremium":false,"isHidden":false},{"languag...
                                                                                                                                                                                                                    
                                                                                                    

Get All Teams - CODE SNIPPETS


curl --location --request GET 'https://zylalabs.com/api/2256/mlb+data+api/2119/get+all+teams' --header 'Authorization: Bearer YOUR_API_KEY' 

    

To use this endpoint the only thing you have to do is to insert in the parameter the id of an equipment.



                                                                            
GET https://www.zylalabs.com/api/2256/mlb+data+api/2120/all+players+by+team+id
                                                                            
                                                                        

All Players by Team ID - Endpoint Features

Object Description
id [Required]
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"athletes":[{"position":"Pitchers","items":[{"id":"40884","uid":"s:1~l:10~a:40884","guid":"9b499f37-06a1-d04e-7ff3-0294825e065f","alternateIds":{"sdr":"4324296"},"firstName":"Bryan","lastName":"Baker","fullName":"Bryan Baker","displayName":"Bryan Baker","shortName":"B. Baker","weight":235,"displayWeight":"235 lbs","height":78,"displayHeight":"6' 6\"","age":28,"dateOfBirth":"1994-12-02T08:00Z","debutYear":2021,"links":[{"language":"en-US","rel":["playercard","desktop","athlete"],"href":"https:\/\/www.espn.com\/mlb\/player\/_\/id\/40884","text":"Player Card","shortText":"Player Card","isExternal":false,"isPremium":false},{"language":"en-US","rel":["stats","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/stats\/_\/id\/40884\/bryan-baker","text":"Stats","shortText":"Stats","isExternal":false,"isPremium":false},{"language":"en-US","rel":["splits","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/splits\/_\/id\/40884\/bryan-baker","text":"Splits","shortText":"Splits","isExternal":false,"isPremium":false},{"language":"en-US","rel":["gamelog","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/gamelog\/_\/id\/40884\/bryan-baker","text":"Game Log","shortText":"Game Log","isExternal":false,"isPremium":false},{"language":"en-US","rel":["news","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/news\/_\/id\/40884\/bryan-baker","text":"News","shortText":"News","isExternal":false,"isPremium":false},{"language":"en-US","rel":["bio","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/bio\/_\/id\/40884\/bryan-baker","text":"Bio","shortText":"Bio","isExternal":false,"isPremium":false},{"language":"en-US","rel":["overview","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/_\/id\/40884\/bryan-baker","text":"Overview","shortText":"Overview","isExternal":false,"isPremium":false},{"language":"en-US","rel":["batvspitch","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/batvspitch\/_\/id\/40884\/bryan-baker","text":"Bat vs Pitch","shortText":"Bat vs Pitch","isExternal":false,"isPremium":false}],"birthPlace":{"city":"Fort Walton Beach","state":"FL","country":"United States"},"slug":"bryan-baker","headshot":{"href":"https:\/\/a.espncdn.com\/i\/headshots\/mlb\/players\/full\/40884.png","alt":"Bryan Baker"},"jersey":"43","position":{"id":"0","name":"Relief Pitcher","displayName":"Relief Pitcher","abbreviation":"RP","leaf":true,"parent":{"id":"1","name":"Pitcher","displayName":"Pitcher","abbreviation":"P","leaf":false}},"positions":[{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/positions\/0?lang=en&region=us","id":"0","name":"Relief Pitcher","displayName":"Relief Pitcher","abbreviation":"RP","leaf":true,"parent":{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/positions\/1?lang=en&region=us"},"statistics":{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/seasons\/2023\/types\/2\/athletes\/40884\/statistics\/128?lang=en&region=us"}},{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/positions\/1?lang=en&region=us","id":"1","name":"Pitcher","displayName":"Pitcher","abbreviation":"P","leaf":false,"statistics":{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/seasons\/2023\/types\/2\/athletes\/40884\/statistics\/77?lang=en&region=us"}}],"injuries":[],"teams":[{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/seasons\/2023\/teams\/1?lang=en&region=us"}],"contracts":[],"experience":{"years":2},"status":{"id":"1","name":"Active","type":"active","abbreviation":"Active"},"bats":{"type":"RIGHT","abbreviation":"R","displayValue":"Right"},"throws":{"type":"RIGHT","abbreviation":"R","displayValue":"Right"}},{"id":"40543","uid":"s:1~l:10~a:40543","guid":"c6dcf194-31bd-0416-c9d4-8e33445f9b1e","alternateIds":{"sdr":"3997178"},"firstName":"Mike","lastName":"Baumann","fullName":"Mike Baumann","displayName":"Mike Baumann","shortName":"M. Baumann","weight":240,"displayWeight":"240 lbs","height":76,"displayHeight":"6' 4\"","age":27,"dateOfBirth":"1995-09-10T07:00Z","debutYear":2021,"links":[{"language":"en-US","rel":["playercard","desktop","athlete"],"href":"https:\/\/www.espn.com\/mlb\/player\/_\/id\/40543","text":"Player Card","shortText":"Player Card","isExternal":false,"isPremium":false},{"language":"en-US","rel":["stats","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/stats\/_\/id\/40543\/mike-baumann","text":"Stats","shortText":"Stats","isExternal":false,"isPremium":false},{"language":"en-US","rel":["splits","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/splits\/_\/id\/40543\/mike-baumann","text":"Splits","shortText":"Splits","isExternal":false,"isPremium":false},{"language":"en-US","rel":["gamelog","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/gamelog\/_\/id\/40543\/mike-baumann","text":"Game Log","shortText":"Game Log","isExternal":false,"isPremium":false},{"language":"en-US","rel":["news","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/news\/_\/id\/40543\/mike-baumann","text":"News","shortText":"News","isExternal":false,"isPremium":false},{"language":"en-US","rel":["bio","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/bio\/_\/id\/40543\/mike-baumann","text":"Bio","shortText":"Bio","isExternal":false,"isPremium":false},{"language":"en-US","rel":["overview","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/_\/id\/40543\/mike-baumann","text":"Overview","shortText":"Overview","isExternal":false,"isPremium":false},{"language":"en-US","rel":["batvspitch","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/batvspitch\/_\/id\/40543\/mike-baumann","text":"Bat vs Pitch","shortText":"Bat vs Pitch","isExternal":false,"isPremium":false}],"birthPlace":{"city":"Mahtomedi","state":"MN","country":"United States"},"college":{"id":"294","mascot":"Dolphins","name":"Jacksonville","shortName":"Jacksonville","abbrev":"JAX"},"slug":"mike-baumann","headshot":{"href":"https:\/\/a.espncdn.com\/i\/headshots\/mlb\/players\/full\/40543.png","alt":"Mike Baumann"},"jersey":"53","position":{"id":"0","name":"Relief Pitcher","displayName":"Relief Pitcher","abbreviation":"RP","leaf":true,"parent":{"id":"1","name":"Pitcher","displayName":"Pitcher","abbreviation":"P","leaf":false}},"positions":[{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/positions\/0?lang=en&region=us","id":"0","name":"Relief Pitcher","displayName":"Relief Pitcher","abbreviation":"RP","leaf":true,"parent":{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/positions\/1?lang=en&region=us"},"statistics":{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/seasons\/2023\/types\/2\/athletes\/40543\/statistics\/128?lang=en&region=us"}},{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/positions\/1?lang=en&region=us","id":"1","name":"Pitcher","displayName":"Pitcher","abbreviation":"P","leaf":false,"statistics":{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/seasons\/2023\/types\/2\/athletes\/40543\/statistics\/77?lang=en&region=us"}}],"injuries":[],"teams":[{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/seasons\/2023\/teams\/1?lang=en&region=us"}],"contracts":[],"experience":{"years":2},"status":{"id":"1","name":"Active","type":"active","abbreviation":"Active"},"bats":{"type":"RIGHT","abbreviation":"R","displayValue":"Right"},"throws":{"type":"RIGHT","abbreviation":"R","displayValue":"Right"}},{"id":"4905859","uid":"s:1~l:10~a:4905859","guid":"67e011aa-1602-338c-ac5f-f4f0b601b7ee","alternateIds":{"sdr":"4905859"},"firstName":"Felix","lastName":"Bautista","fullName":"Felix Bautista","displayName":"Felix Bautista","shortName":"F. Bautista","weight":285,"displayWeight":"285 lbs","height":80,"displayHeight":"6' 8\"","age":28,"dateOfBirth":"1995-06-20T07:00Z","debutYear":2022,"links":[{"language":"en-US","rel":["playercard","desktop","athlete"],"href":"https:\/\/www.espn.com\/mlb\/player\/_\/id\/4905859","text":"Player Card","shortText":"Player Card","isExternal":false,"isPremium":false},{"language":"en-US","rel":["stats","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/stats\/_\/id\/4905859\/felix-bautista","text":"Stats","shortText":"Stats","isExternal":false,"isPremium":false},{"language":"en-US","rel":["splits","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/splits\/_\/id\/4905859\/felix-bautista","text":"Splits","shortText":"Splits","isExternal":false,"isPremium":false},{"language":"en-US","rel":["gamelog","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/gamelog\/_\/id\/4905859\/felix-bautista","text":"Game Log","shortText":"Game Log","isExternal":false,"isPremium":false},{"language":"en-US","rel":["news","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/news\/_\/id\/4905859\/felix-bautista","text":"News","shortText":"News","isExternal":false,"isPremium":false},{"language":"en-US","rel":["bio","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/bio\/_\/id\/4905859\/felix-bautista","text":"Bio","shortText":"Bio","isExternal":false,"isPremium":false},{"language":"en-US","rel":["overview","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/_\/id\/4905859\/felix-bautista","text":"Overview","shortText":"Overview","isExternal":false,"isPremium":false},{"language":"en-US","rel":["batvspitch","desktop","athlete"],"href":"http:\/\/www.espn.com\/mlb\/player\/batvspitch\/_\/id\/4905859\/felix-bautista","text":"Bat vs Pitch","shortText":"Bat vs Pitch","isExternal":false,"isPremium":false}],"birthPlace":{"city":"Santo Domingo","country":"Dominican Republic"},"slug":"felix-bautista","headshot":{"href":"https:\/\/a.espncdn.com\/i\/headshots\/mlb\/players\/full\/4905859.png","al...
                                                                                                                                                                                                                    
                                                                                                    

All Players by Team ID - CODE SNIPPETS


curl --location --request GET 'https://zylalabs.com/api/2256/mlb+data+api/2120/all+players+by+team+id?id=1' --header 'Authorization: Bearer YOUR_API_KEY' 

    

To use this endpoint the only thing you have to do is to insert the id of a device to obtain its information.



                                                                            
GET https://www.zylalabs.com/api/2256/mlb+data+api/2121/team+data
                                                                            
                                                                        

Team Data - Endpoint Features

Object Description
id [Required]
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"timestamp":"2023-07-17T17:19:56Z","status":"success","season":{"year":2023,"displayName":"2023","type":2,"name":"Regular Season"},"coach":[{"id":"169","firstName":"Brandon","lastName":"Hyde","experience":2}],"team":{"id":"1","abbreviation":"BAL","location":"Baltimore","name":"Orioles","displayName":"Baltimore Orioles","clubhouse":"https:\/\/www.espn.com\/mlb\/team\/_\/name\/bal\/baltimore-orioles","color":"000000","logo":"https:\/\/a.espncdn.com\/i\/teamlogos\/mlb\/500\/bal.png","recordSummary":"57-35","seasonSummary":"2023","standingSummary":"2nd in AL East","groups":{"$ref":"http:\/\/sports.core.api.espn.pvt\/v2\/sports\/baseball\/leagues\/mlb\/seasons\/2023\/types\/2\/groups\/1?lang=en&region=us"}}}
                                                                                                                                                                                                                    
                                                                                                    

Team Data - CODE SNIPPETS


curl --location --request GET 'https://zylalabs.com/api/2256/mlb+data+api/2121/team+data?id=1' --header 'Authorization: Bearer YOUR_API_KEY' 

    

To use this endpoint all you have to do is insert the ID of a player in the parameter.



                                                                            
GET https://www.zylalabs.com/api/2256/mlb+data+api/2122/data+by+player+id
                                                                            
                                                                        

Data by Player ID - Endpoint Features

Object Description
id [Required]
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"id":"3000","uid":"s:1~l:10~a:3000","guid":"59b936d1-7ce0-6996-432b-2292fe3b0a53","type":"baseball","alternateIds":{"sdr":"1847234"},"firstName":"Tony","lastName":"Womack","fullName":"Tony Womack","displayName":"Tony Womack","shortName":"T. Womack","weight":170,"displayWeight":"170 lbs","height":69,"displayHeight":"5' 9\"","age":53,"dateOfBirth":"1969-09-25T07:00Z","debutYear":1993,"birthPlace":{"city":"Danville","state":"VA","country":"United States"},"college":{"$ref":"http:\/\/sports.core.api.espn.com\/v2\/colleges\/2258?lang=en&region=us"},"slug":"tony-womack","jersey":"1","hand":{"type":"RIGHT","abbreviation":"R","displayValue":"Right"},"position":{"$ref":"http:\/\/sports.core.api.espn.com\/v2\/sports\/baseball\/leagues\/mlb\/positions\/4?lang=en&region=us","id":"4","name":"Second Base","displayName":"Second Baseman","abbreviation":"2B","leaf":true,"parent":{"$ref":"http:\/\/sports.core.api.espn.com\/v2\/sports\/baseball\/leagues\/mlb\/positions\/13?lang=en&region=us"}},"linked":true,"experience":{"years":13},"debut":{"year":1993,"event":{"$ref":"http:\/\/sports.core.api.espn.com\/v2\/sports\/baseball\/leagues\/mlb\/events\/130910123?lang=en&region=us"},"statistics":{"$ref":"http:\/\/sports.core.api.espn.com\/v2\/sports\/baseball\/leagues\/mlb\/events\/130910123\/competitions\/130910123\/competitors\/23\/roster\/3000\/statistics\/0?lang=en&region=us"}},"active":false,"status":{"id":"27","name":"Retired","type":"retired","abbreviation":"Retired"},"bats":{"type":"LEFT","abbreviation":"L","displayValue":"Left"},"throws":{"type":"RIGHT","abbreviation":"R","displayValue":"Right"}}
                                                                                                                                                                                                                    
                                                                                                    

Data by Player ID - CODE SNIPPETS


curl --location --request GET 'https://zylalabs.com/api/2256/mlb+data+api/2122/data+by+player+id?id=3000' --header 'Authorization: Bearer YOUR_API_KEY' 

    

API Access Key & Authentication

After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the MLB Data API REST API, simply include your bearer token in the Authorization header.
Headers
Header Description
Authorization [Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.

Simple Transparent Pricing

No long term commitments. One click upgrade/downgrade or cancellation. No questions asked.

πŸš€ Enterprise

Starts at
$ 10,000/Year


  • Custom Volume
  • Dedicated account manager
  • Service-level agreement (SLA)

Customer favorite features

  • βœ”οΈŽ Only Pay for Successful Requests
  • βœ”οΈŽ Free 7-Day Trial
  • βœ”οΈŽ Multi-Language Support
  • βœ”οΈŽ One API Key, All APIs.
  • βœ”οΈŽ Intuitive Dashboard
  • βœ”οΈŽ Comprehensive Error Handling
  • βœ”οΈŽ Developer-Friendly Docs
  • βœ”οΈŽ Postman Integration
  • βœ”οΈŽ Secure HTTPS Connections
  • βœ”οΈŽ Reliable Uptime

There are different plans suits everyone including a free plan for small amount of requests per day, but it’s rate is limit to prevent abuse of the service.

Zyla provides a wide range of integration methods for almost all programming languages. You can use these codes to integrate with your project as you need.

To use this API you must insert the IDs corresponding to each team or player to obtain the requested information.

The MLB Data API is a specialized application programming interface (API) that grants developers access to an extensive collection of data related to Major League Baseball (MLB).

Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.

Prices are listed in USD (United States Dollar), EUR (Euro), CAD (Canadian Dollar), AUD (Australian Dollar), and GBP (British Pound). We accept all major debit and credit cards. Our payment system uses the latest security technology and is powered by Stripe, one of the world’s most reliable payment companies. If you have any trouble paying by card, just contact us at [email protected]

Additionally, if you already have an active subscription in any of these currencies (USD, EUR, CAD, AUD, GBP), that currency will remain for subsequent subscriptions. You can change the currency at any time as long as you don't have any active subscriptions.

The local currency shown on the pricing page is based on the country of your IP address and is provided for reference only. The actual prices are in USD (United States Dollar). When you make a payment, the charge will appear on your card statement in USD, even if you see the equivalent amount in your local currency on our website. This means you cannot pay directly with your local currency.

Occasionally, a bank may decline the charge due to its fraud protection settings. We suggest reaching out to your bank initially to check if they are blocking our charges. Also, you can access the Billing Portal and change the card associated to make the payment. If these does not work and you need further assistance, please contact our team at [email protected]

Prices are determined by a recurring monthly or yearly subscription, depending on the chosen plan.

API calls are deducted from your plan based on successful requests. Each plan comes with a specific number of calls that you can make per month. Only successful calls, indicated by a Status 200 response, will be counted against your total. This ensures that failed or incomplete requests do not impact your monthly quota.

Zyla API Hub works on a recurring monthly subscription system. Your billing cycle will start the day you purchase one of the paid plans, and it will renew the same day of the next month. So be aware to cancel your subscription beforehand if you want to avoid future charges.

To upgrade your current subscription plan, simply go to the pricing page of the API and select the plan you want to upgrade to. The upgrade will be instant, allowing you to immediately enjoy the features of the new plan. Please note that any remaining calls from your previous plan will not be carried over to the new plan, so be aware of this when upgrading. You will be charged the full amount of the new plan.

To check how many API calls you have left for the current month, look at the β€˜X-Zyla-API-Calls-Monthly-Remaining’ header. For example, if your plan allows 1000 requests per month and you've used 100, this header will show 900.

To see the maximum number of API requests your plan allows, check the β€˜X-Zyla-RateLimit-Limit’ header. For instance, if your plan includes 1000 requests per month, this header will display 1000.

The β€˜X-Zyla-RateLimit-Reset’ header shows the number of seconds until your rate limit resets. This tells you when your request count will start fresh. For example, if it displays 3600, it means 3600 seconds are left until the limit resets.

Yes, you can cancel your plan anytime by going to your account and selecting the cancellation option on the Billing page. Please note that upgrades, downgrades, and cancellations take effect immediately. Additionally, upon cancellation, you will no longer have access to the service, even if you have remaining calls left in your quota.

You can contact us through our chat channel to receive immediate assistance. We are always online from 8 am to 5 pm (EST). If you reach us after that time, we will get back to you as soon as possible. Additionally, you can contact us via email at [email protected]

To let you experience our APIs without any commitment, we offer a 7-day free trial that allows you to make API calls at no cost during this period. Please note that you can only use this trial once, so make sure to use it with the API that interests you the most. Most of our APIs provide a free trial, but some may not support it.

After 7 days, you will be charged the full amount for the plan you were subscribed to during the trial. Therefore, it’s important to cancel before the trial period ends. Refund requests for forgetting to cancel on time are not accepted.

When you subscribe to an API trial, you can make only 25% of the calls allowed by that plan. For example, if the API plan offers 1000 calls, you can make only 250 during the trial. To access the full number of calls offered by the plan, you will need to subscribe to the full plan.

 Service Level
100%
 Response Time
5,446ms

Category:


Related APIs