user2394117
user2394117

Reputation: 21

ESPN API - Do I need to become ESPN partner to retrieve NBA, NFL schedules?

I have a question I hope you can help me with- I am trying to use the ESPN API to get future game schedules/fixtures for NBA, NFL and NHL.

It is unclear to me from the docs if I can get this data without becoming an ESPN partner.

Is it necessary for me to become an ESPN partner to get this data?

Thank you Andy

Upvotes: 1

Views: 2927

Answers (2)

Oleg Kozynenko
Oleg Kozynenko

Reputation: 77

An alternative to ESPN is Hooks Data. The service provides a real-time API for major US sports including NFL, MBL, NBA, Soccer, NHL.

1) Get API KEY here: https://www.hooksdata.io/signup?invite=SM4555

2) Subscribe to soccer results:

curl -H "Content-type: application/json" -d '{
"query": "SELECT * FROM SoccerGames WHERE away_team.team_name = 'Real Madrid' OR home_team.team_name = 'Real Madrid' AND start_datetime.countdown = 3600"}' 'http://api.hooksdata.io/v1/subscriptions'

3) Optional: Add a Webhooks URL where you want to get the data: https://www.hooksdata.io/webhooks

4) Pull the data using fetch endpoint https://www.hooksdata.io/docs/api/api-reference/#query-datasource

5) Get all the data in JSON:

{
"matches_count": 1,
"results": [
    {
        "_entity_type": "SoccerGame",
        "_id": "SoccerGame_490555",
        "away_score": null,
        "away_team": {
            "_entity_type": "SoccerTeam",
            "_id": "SoccerTeam_86",
            "espn_id": 86,
            "id": "SoccerTeam_86",
            "logo_url": "http://a.espncdn.com/combiner/i?img=/i/teamlogos/soccer/500/86.png&h=500",
            "team_name": "Real Madrid"
        },
        "competition": "Spanish Primera División",
        "game_id": "490555",
        "home_score": null,
        "home_team": {
            "_entity_type": "SoccerTeam",
            "_id": null,
            "team_name": "Leganes"
        },
        "link": "http://m.espn.go.com/soccer/gamecast?gameId=490555&lang=EN&wjb=",
        "start_datetime": {
            "countdown": 86970,
            "datetime": "2018-02-21T17:45:00+0000",
            "timestamp": 1519235100
        },
        "status": "FUTURE",
        "timestamp": 1519235100
    }
]}

Upvotes: 1

Will Curran
Will Curran

Reputation: 7110

Currently scores and schedules is for premium partners only, due to licensing agreements with the leagues. Future releases of the API will include opportunities for public developers to access that data.

Relevant page: http://developer.espn.com/docs/scores

Upvotes: 3

Related Questions