appac / mlb-data-api-docs

Documentation for the public MLB endpoints.
https://appac.github.io/mlb-data-api-docs/
17 stars 1 forks source link

Some endpoints not working? #2

Open skonesam opened 3 years ago

skonesam commented 3 years ago

I’m getting a “access denied” message for the last few days on requests for stats on hitters. Anyone have any idea what’s going on?

Pitchers data is fine, and most non-hitting data (teams, player bio, etc) seems to be working.

Edited to add an example: http://lookup-service-prod.mlb.com/json/named.sport_hitting_tm.bam?league_list_id=%27mlb%27&game_type=%27R%27&season=%272021%27&player_id=%27516782%27

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>VSWJAPCP6NK9RXXS</RequestId>
<HostId>
xxnxcwz4IvwYuj0t+WowGXv8puXzvwMZTuax8lFZPJO/b7t+iXM7Et1ImvnRsTbVProe504QY/o=
</HostId>
</Error>
fabean commented 2 years ago

Having the same issues

adrianb13 commented 2 years ago

image

This is the browser error I'm getting related to the GET request. Probably an issue specifically to this endpoint.

Zach1L commented 2 years ago

Having the same issues. Can't getting hitting stats

appac commented 2 years ago

Apologies for the very delayed response to this.

This is likely due to MLBAM finally limiting requests or just shutting down endpoints they no longer use.

Unfortunately there's no one-shot fix for it. Originally when I documented these endpoints, I did so by navigating around the mlb.com website and seeing what network requests it was making to pull down data.

You could try doing the same i.e. if you're looking for hitting stats, visit whatever is the current page that renders such data and see if the network requests offer any new options.

borelli28 commented 2 years ago

New endpoint to get individual player statistics is: https://statsapi.mlb.com/api/v1/people/{player_id}?hydrate=currentTeam,team,stats(type=[yearByYear,yearByYearAdvanced,careerRegularSeason,careerAdvanced,availableStats](team(league)),leagueListId=mlb_hist)&site=en

IanKelly134 commented 2 months ago

Hello, I was using this api for a few years to develop an online baseball simulator based on stats. I had to step away from the project for some time but I just came back to it and most of the endpoints are down for me. You can see all the ones not working on the test endpoints on rapid api. Here is an example of one that seems down (Get Roster By Season) curl --location 'https://mlb-data.p.rapidapi.com/json/named.roster_team_alltime.bam?team_id=%27110%27&start_season=%271987%27&end_season=%271987%27' \ --header 'x-rapidapi-host: mlb-data.p.rapidapi.com' \ --header 'X-RapidAPI-Key: af5352e3e5msh027e7a5c8c8cc76p157788jsndab27210c9c4'

JJD05 commented 1 month ago

@appac, are you able to help resolve the non-working endpoint issue? In past years I was pulling the MLB stats daily for use with an application. I'd be willing to provide compensation for helping to resolve, if it's possible.