With this football API endpoint you can pull the country flags for national football teams.
Pairing national football team names with their country flags is a solid way to level up the look of your website or mobile app, and it pays off from both a design and a user experience standpoint. That is exactly why we added the country flag football API endpoint to our product. The sections below walk you through how to get the most out of it.
Endpoint
To use our football API endpoint for national team flags, the only things you need are the team_id or the country_id of the national football team. A complete list of all teams along with their identifiers is available through our team listing api endpoint. You can also grab the full list of all countries by following the guidelines on our countries documentation page. The response from the countries football API endpoint includes the id field, which holds the country identifier. Use that value to fetch the country flag, as demonstrated in the example below for the flag of Australia.
Check this Football API endpoint in our postman collection. Download it now!
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| country_id | number | 71 | The id of the country whose flag you want to retrieve. | |
| team_id | number | 1440 | The id of the team that serves as the national team for a given country. |
Response
The response comes back as a png image holding the flag of that country. Every country flag shares a fixed height of 240px, while the width varies from one flag to another.