nflstats
is a tool developed to test consuming sportsdata.io NFL feeds.
go install github.com/tomshaw/nflstats@latest
nflstats has been tested and supports Go versions >=1.19.x.
First of all, obtain your Free Trial API Key from the sportsdata.io developer portal.
In order to use nflstats
, create a .env
file in the root of the project and add your API key.
API_KEY=API_KEY_GOES_HERE
Run nflstats -h
to print help instructions.
Run nflstats list
to print available API's. Please submit a pull request if you would like
to add addtional endpoints.
â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•®
│ API │ ENDPOINT │
├───────────────┼────────────────────────────────────────────────────────────────────────────┤
│ NewsByTeam │ https://api.sportsdata.io/v3/nfl/scores/json/NewsByTeam/{team} │
├───────────────┼────────────────────────────────────────────────────────────────────────────┤
│ TeamGameStats │ https://api.sportsdata.io/v3/nfl/scores/json/TeamGameStats/{season}/{week} │
╰───────────────┴────────────────────────────────────────────────────────────────────────────╯
Simple specify the official team abbrevation dal
, ari
, buf
, phi
.
All API requests support Json, Pretty Print or Table export options.
nflstats -table -api NewsByTeam -team dal
â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•®
│ NEWS BY TEAM │
├──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ROTOBALLER - 2022-12-11T19:15:40 │
├──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Trevon Diggs Questionable To Return Sunday │
│ Dallas Cowboys cornerback Trevon Diggs (hand) went to the locker room for further evaluation during │
│ Sunday's game versus the Houston Texans. He is listed as questionable to return. The 24-year-old rec │
│ orded three tackles before exiting and will be replaced by Nahshon Wright. │
├──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ STAFF LAST UPDATED: 5 DAYS AGO │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
nflstats -table -api TeamGameStats
â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•®
│ NFL GAME STATS │
├──────┬──────────┬───────┬────────────┬──────────────┬──────────────┬───────┬─────────┬───────┬─────────────────────────┬─────────────────────┤
│ TEAM │ OPPONENT │ SCORE │ TOUCHDOWNS │ RUSHINGYARDS │ PASSINGYARDS │ SACKS │ FUMBLES │ PUNTS │ STADIUM │ DATE │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ ARI │ KC │ 21/44 │ 6 │ 144 │ 250 │ 0 │ 6 │ 10 │ State Farm Stadium │ 2022-09-11T16:25:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ ATL │ NO │ 26/27 │ 4 │ 281 │ 300 │ 8 │ 6 │ 8 │ Mercedes-Benz Stadium │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ BAL │ NYJ │ 24/9 │ 6 │ 88 │ 295 │ 6 │ 2 │ 12 │ MetLife Stadium │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ BUF │ LAR │ 31/10 │ 8 │ 169 │ 408 │ 14 │ 4 │ 0 │ SoFi Stadium │ 2022-09-08T20:20:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ CAR │ CLE │ 24/26 │ 6 │ 75 │ 289 │ 2 │ 10 │ 10 │ Bank of America Stadium │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ CHI │ SF │ 19/10 │ 6 │ 138 │ 147 │ 4 │ 0 │ 12 │ Soldier Field │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ CIN │ PIT │ 20/20 │ 4 │ 186 │ 418 │ 2 │ 4 │ 6 │ Paycor Stadium │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ CLE │ CAR │ 26/24 │ 4 │ 303 │ 193 │ 8 │ 2 │ 8 │ Bank of America Stadium │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ DAL │ TB │ 3/19 │ 0 │ 99 │ 242 │ 4 │ 0 │ 10 │ AT&T Stadium │ 2022-09-11T20:20:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ DEN │ SEA │ 16/17 │ 2 │ 144 │ 461 │ 4 │ 4 │ 2 │ Lumen Field │ 2022-09-12T20:15:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ DET │ PHI │ 35/38 │ 10 │ 253 │ 286 │ 2 │ 2 │ 8 │ Ford Field │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ GB │ MIN │ 7/23 │ 2 │ 155 │ 317 │ 2 │ 2 │ 8 │ U.S. Bank Stadium │ 2022-09-11T16:25:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ HOU │ IND │ 20/20 │ 4 │ 108 │ 310 │ 4 │ 2 │ 14 │ NRG Stadium │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ IND │ HOU │ 20/20 │ 4 │ 247 │ 475 │ 6 │ 10 │ 8 │ NRG Stadium │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ JAX │ WAS │ 22/28 │ 4 │ 172 │ 363 │ 2 │ 2 │ 6 │ FedEx Field │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ KC │ ARI │ 44/21 │ 12 │ 179 │ 503 │ 6 │ 10 │ 4 │ State Farm Stadium │ 2022-09-11T16:25:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ LAC │ LV │ 24/19 │ 6 │ 106 │ 390 │ 12 │ 2 │ 8 │ SoFi Stadium │ 2022-09-11T16:25:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ LAR │ BUF │ 10/31 │ 2 │ 73 │ 267 │ 4 │ 2 │ 8 │ SoFi Stadium │ 2022-09-08T20:20:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ LV │ LAC │ 19/24 │ 4 │ 89 │ 358 │ 0 │ 6 │ 4 │ SoFi Stadium │ 2022-09-11T16:25:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ MIA │ NE │ 20/7 │ 4 │ 91 │ 338 │ 4 │ 4 │ 8 │ Hard Rock Stadium │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ MIN │ GB │ 23/7 │ 4 │ 176 │ 376 │ 8 │ 0 │ 10 │ U.S. Bank Stadium │ 2022-09-11T16:25:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ NE │ MIA │ 7/20 │ 2 │ 109 │ 270 │ 6 │ 4 │ 6 │ Hard Rock Stadium │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ NO │ ATL │ 27/26 │ 6 │ 211 │ 327 │ 0 │ 2 │ 10 │ Mercedes-Benz Stadium │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ NYG │ TEN │ 21/20 │ 6 │ 332 │ 218 │ 2 │ 4 │ 12 │ Nissan Stadium │ 2022-09-11T16:25:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ NYJ │ BAL │ 9/24 │ 2 │ 116 │ 415 │ 4 │ 4 │ 12 │ MetLife Stadium │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ PHI │ DET │ 38/35 │ 10 │ 302 │ 334 │ 2 │ 0 │ 6 │ Ford Field │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ PIT │ CIN │ 20/20 │ 4 │ 105 │ 268 │ 14 │ 4 │ 11 │ Paycor Stadium │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ SEA │ DEN │ 17/16 │ 4 │ 106 │ 247 │ 4 │ 6 │ 4 │ Lumen Field │ 2022-09-12T20:15:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ SF │ CHI │ 10/19 │ 2 │ 246 │ 217 │ 4 │ 4 │ 8 │ Soldier Field │ 2022-09-11T13:00:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ TB │ DAL │ 19/3 │ 2 │ 212 │ 272 │ 8 │ 0 │ 6 │ AT&T Stadium │ 2022-09-11T20:20:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ TEN │ NYG │ 20/21 │ 4 │ 130 │ 372 │ 10 │ 4 │ 12 │ Nissan Stadium │ 2022-09-11T16:25:00 │
├──────┼──────────┼───────┼────────────┼──────────────┼──────────────┼───────┼─────────┼───────┼─────────────────────────┼─────────────────────┤
│ WAS │ JAX │ 28/22 │ 8 │ 119 │ 426 │ 4 │ 2 │ 6 │ FedEx Field │ 2022-09-11T13:00:00 │
╰──────┴──────────┴───────┴────────────┴──────────────┴──────────────┴───────┴─────────┴───────┴─────────────────────────┴─────────────────────╯
- Fork the repo
- Clone the fork (
git clone git@github.com:YOUR_USERNAME/nflstats.git && cd nflstats
) - Create your feature branch (
git checkout -b my-new-feature
) - Make changes and add them (
git add --all
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a pull request
See LICENSE.