Sports
NFL game roster API with player X accounts
Get both teams’ rosters for 1 NFL game from X, with each player’s jersey, position, headshot & X account, plus each team’s name, colors & logos. 1 credit.
- 200
- 400
- 401
- 402
- 404
- 424
- 429
- 502
- 503
GET
NFL game roster API with player X accounts
1 credit per request · All plans from $0.00012/credit · Direct MPP at USD 0.00015 per call · Supports guest paid reads
Read both rosters
UseGET /x/sports/{league}/games/{id}/roster for the players of both teams. Find the game ID with
List football games.
rostersholds each team’steamId& itsplayerIds, in X’s order.playersholds each player once, keyed by ID, with jersey, position, headshot & X account.- A player’s
xUseralso says whether the account isprotected, can offer subscriptions & has a highlighted label.
Path parameters
string
required
nfl, in any case. X has no college rosters, so ncaafb gets a free 400 unsupported_league.
Another value gets a free 400 invalid_league.string
required
Game ID, a number up to 19 digits, such as
2055084502741811200. List football
games returns it as id. Another value gets a free 400 invalid_game_id.Query parameters
string
Fields to keep in each row, comma-separated, such as
id,text,author.username. Use dots for nested fields. Case & underscores do not matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics always stay. An unknown name returns 400 unknown_field with the valid names, before any read. The price stays the same.string
Fields to drop from each row, comma-separated, such as
entities,media. It takes the same names as fields. With fields, it drops from the kept fields.Headers
string
Full account key. Sessions and OAuth also work.
string
Bearer xq_your_guest_key_here for paid_reads.Response
200 OK
string
The game ID from your request.
string
Always
nfl.object[]
object
The 2 teams, keyed by team ID.
string
The team ID that games & players refer to.
string
The team’s full name, such as
San Francisco 49ers.string
The team’s short name.
string
The team’s abbreviation, such as
SF.string
Another ID X keeps for the team. College plays & drives name a side by it.
string
The school or place the team plays for. College schedules & a game’s audience send it.
object[]
The team’s colors. Each has
r, g & b, from 0 to 255.object
The team’s logo links.
default is the one X shows. light & dark suit light or dark
backgrounds.object
The team’s
wins, losses & ties this season. X sends it only in college football games.object[]
The team’s recent games, newest first. Games without a kickoff time come last. Each has
id,
startsAt, venue, status, clock, quarter, home & away. home & away hold teamId
& points. X sends them only with the teams of a college football game. The list is empty
elsewhere.object
Every rostered player, keyed by player ID.
string
The player ID that plays & stats refer to.
string
The player’s team, a key of
teams.string
The player’s full name.
string
The name play descriptions use, such as
B.Purdy.string
The jersey number, as text.
string
The position, such as
QB or DE.string
The college the player came from.
string
Where the player was born. X sends it only for NFL players.
string
The birth date, as
YYYY-MM-DD.object
Photo links in
original, large, medium & small. Any of them can be null.object
The player’s X account, with
id, username & blueVerified. Null when the player has none.
Rosters also fill protected, superFollowEligible & the highlighted labelType, such as
BusinessLabel. Other answers send them as null.400 Unsupported league
nfl as the league. A game ID that is not a number gets invalid_game_id. Both answers are
free.
404 Game not found
401 Unauthenticated
Anonymous requests getWWW-Authenticate: Bearer and a guest wallet checkout action. This is not a Payment challenge.