On this documentation page for the football API, we walk through the competition top goal scorers endpoint.
No football API would feel finished without a way to grab the top goal scorers for a competition. That is the reason this endpoint now ships. It hands you that list directly.
Endpoint
To pull the top goal scorers for a competition through this football API, you only need the competition_id for the league you care about. Then you call the URL shown below. Plenty of endpoints in the product accept competition_id values, but if you want the full list of competitions, head to the competitions listing endpoint docs or run a competition search on the competitions coverage page.
Check this Football API endpoint in our postman collection. Download it now!
Parameters
The competition top goal scorers football API endpoint accepts two parameters: competition_id and lang. The competition_id parameter is required, and a missing value in the URL causes an error. The lang parameter lets you receive translated names for teams, competitions, and players in the language you pass, provided your subscription package supports it.
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| competition_id | number | 1 | 1 | The id of the competition whose top goal scorers you want to fetch. |
| lang | string | ar | Two letter ISO 639 1 language code. More on this in the docs for data in various languages. |
Response
The response from this football API endpoint returns up to 20 top goal scorers for the competition_id you chose. In the sample below only 2 players appear, purely to keep things short. These scorers belong to the current season of that competition, meaning the season running right now or one that wrapped up recently. If a new season is about to kick off, the list can come back empty since nothing has been played yet. Alongside the scorers you also get general competition info, plus each player performance stats and the team that player represents in the competition.
The scorers list is ordered with the strongest performer at the top and the player with the fewest goals at the bottom.
{
"success": true,
"data": {
"competition": {
"id": 1,
"name": "Bundesliga",
"is_league": true,
"is_cup": false,
"tier": 1,
"has_groups": true,
"active": true,
"national_teams_only": false
},
"edition": {
"id": 2538,
"season_id": 57,
"is_current": true
},
"season": {
"id": 57,
"name": "2026\/2027",
"start": "2026-07-01",
"end": "2027-06-30"
},
"topscorers": [
{
"goals": 5,
"assists": 1,
"played": 5,
"team": {
"id": 57,
"name": "Bayer Leverkusen",
"stadium": "BayArena",
"country_id": 1,
"logo": "https:\/\/cdn.football-api.com\/teams\/57.png"
},
"player": {
"id": 14848,
"name": "Patrik Schick",
"photo": "https:\/\/cdn.football-api.com\/players\/1\/3\/9\/2\/1392a70e4978d9890a1a1d40a11edbe8.png"
}
},
{
"goals": 4,
"assists": 1,
"played": 5,
"team": {
"id": 44,
"name": "RasenBallsport Leipzig",
"stadium": "Red Bull Arena",
"country_id": 1,
"logo": "https:\/\/cdn.football-api.com\/teams\/44.png"
},
"player": {
"id": 14842,
"name": "Christopher Nkunku",
"photo": "https:\/\/cdn.football-api.com\/players\/8\/a\/a\/d\/8aad11ad0535421ef52a534d5cce4bd3.png"
}
}
]
}
}| Name | Type | Example | Description |
|---|---|---|---|
| competition | object | An object carrying the competition details. It follows the shape of the standard competition object. | |
| edition | object | An object carrying the edition details for the competition. It follows the shape of the standard edition object. | |
| season | object | An object carrying the season details for the competition whose top scorers you are fetching. It follows the shape of the standard season object. | |
| topscorers | list | The array containing the competition top goal scorers. | |
| topscorers.assists | number | 4 | The count of assists the player has provided on goals scored by teammates. |
| topscorers.goals | number | 20 | The total goals scored by the player. |
| topscorers.played | number | 15 | The count of matches the player has appeared in during the current edition of the competition. |
| topscorers.player | object | An object carrying the details of the player. It follows the shape of the standard player object. | |
| topscorers.team | object | An object carrying the details of the team the player competes for. It follows the shape of the standard team object. |
Getting top scorers in various languages
If your subscription package supports translated data across languages, pass the lang parameter to receive competition, team, and player names in the language you pick.
cUrl:
curl -XGET "https://api.football-api.com/competitions/topscorers.json?key=demo_key&secret=demo_secret&competition_id=362&lang=ar"
PHP:
file_get_contents('https://api.football-api.com/competitions/topscorers.json?key=demo_key\&secret=demo_secret\&competition_id=362&lang=ar');
Python:
import urllib2
req = urllib2.Request('https://api.football-api.com/competitions/topscorers.json?key=demo_key\&secret=demo_secret\&competition_id=362&lang=ar')
response = urllib2.urlopen(req)
print response.read()