Match responses already carry the teams and the players involved, but sometimes a client holds an ID and nothing else. GET /v1/teams/{id} and GET /v1/players/{id} resolve those IDs to a name, an image and the record behind it.
IDs are opaque and prefixed by type — t_ for a team, p_ for a player — and they are not numeric or sortable. Do not parse them; store them. The same ID appears in match summaries, lineups, shots and the advanced endpoints, so one lookup serves every response that mentions the team.
These are reference endpoints, not search. There is no name lookup: resolve a team or player from a match, a lineup or a league's matches, then keep the ID.
Endpoints
Every request takes an X-API-KEY header and returns the JSON envelope described on the overview.
Retrieve a team
A team's name and image URL.
idstringrequiredTeam ID, for example t_9aB2xQ
curl https://api.pitchapi.dev/v1/teams/{id} \
-H "X-API-KEY: $PITCH_KEY"Retrieve a player
A player's name, shirt number, position, country, and image URL.
idstringrequiredPlayer ID, for example p_7YtX4q
curl https://api.pitchapi.dev/v1/players/{id} \
-H "X-API-KEY: $PITCH_KEY"Common questions
- Can I search for a team by name?
- Not through these endpoints. Resolve the team from a match, a lineup or a league's matches and keep the ID. The league catalogue is the closest thing to a directory.
- Are team and player IDs stable?
- Yes. They are opaque and prefixed by type, and the same ID is used everywhere the team or player appears, across seasons.