{
  "id": 22254370,
  "title": "Alabama has 71 NFL players, Duke 27 in the NBA. Mapping 5,111 pro rosters with ESPN's hidden JSON API",
  "url": "https://urgent.news/2026/11/27/alabama-has-71-nfl-players-duke-27-in-the-nba-mapping-5-111-pro",
  "topic": "finance",
  "section": "Finance & Markets",
  "published": "2026-11-27T23:06:13.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/scrapemint/alabama-has-71-nfl-players-duke-27-in-the-nba-mapping-5111-pro-rosters-with-espns-hidden-json-389d"
  },
  "original_language": "en",
  "account": "ESPN's website utilizes a public JSON API without requiring a key. This API provides scores, betting lines, standings, injury reports, rosters, and news for various sports including NFL, NBA, MLB, NHL, college sports, and world soccer. By leveraging this API, the author extracted every roster from the four major US leagues, totaling 5,111 players. This enabled the author to explore some intriguing questions.\n\nThe API structure is hierarchical, with endpoints organized under site.api.espn.com/apis/site/v2/sports/{sport}/{league}/. For NFL, the roster endpoint is /football/nfl/teams/{team_id}/roster, while the NBA roster endpoint is /football/nba/teams/{team_id}/roster. The API also offers other endpoints for scores, injuries, team lists, and news across different sports.\n\nHowever, there are a few limitations to consider. A standard browser User-Agent is required to avoid a 403 error. Date ranges used in API calls may sometimes result in a 400 error. Loops should be executed day by day to avoid issues.\n\nThere are two shapes in which roster data is presented. NFL and NHL group players by unit, with each team's roster being an array of athletes. In contrast, NBA and MLB provide a flat list of players. To handle both shapes, the author demonstrated how to fetch the team data and then retrieve the players' details using appropriate fetch and JSON methods.\n\nThe scoreboard endpoint, which provides game details such as spread, total, and moneylines, was also examined. Additionally, the API can be used to uncover valuable insights about US college players. For instance, it reveals that Alabama has 71 NFL players, Ohio State has 67, Georgia has 66, and so on, with Duke having 27 NBA players.\n\nFurthermore, the author analyzed the international representation within these leagues. In the NFL, only 3% of players are born outside the USA, primarily from Canada, Australia, and Nigeria. In contrast, the NBA is more diverse, with 22% of players born outside the USA, including players from France, Canada, Australia, and other countries.\n\nThe author also examined how many players had reported injuries at the time of the data snapshot. NFL players had a slightly higher injury rate at 21%, compared to NBA players at 20%. Other sports like MLB and NHL had lower injury rates, around 12%.\n\nAverage age varies across leagues, with the NBA having the youngest players at 25, followed by the NFL at 26, MLB at 27, and NHL at 28.\n\nAll the data, including player details such as team, position, age, height, weight, birthplace, college, experience, status, injury flag, is freely available on Kaggle at ESPN Sports Data. If users prefer a simpler approach, they can utilize the Apify platform to access the entire dataset. The possibilities are endless - from building a betting tool, to analyzing player demographics, or even creating a fantasy sports app, the potential applications of this dataset are vast.",
  "summary": "ESPN's website is built on a public JSON API. It has no docs and needs no key, and it covers scores, betting lines, standings, injury reports, rosters and news for the NFL, NBA, MLB, NHL, college sports and world soccer. I used it to pull every roster in the four major US leagues ( 5,111 players ) and answer some bar-argument questions. First, the endpoints. The endpoints Everything hangs off…",
  "summary_source": "publisher",
  "key_points": [
    "Alabama leads with 71 NFL players, Duke has 27 NBA players",
    "ESPN's JSON API provides scores, rosters, injury reports across major US sports",
    "NBA is more diverse internationally with 22% non-US born players compared to NFL's 3%"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}