← Back to Documentation

Top Goalscorers

GET https://api.worldcupapi.com/goalscorers

Description

Get top goalscorers for World Cup 2026. Returns a ranked list of players with their goal counts, assists, and match appearances.

Parameters

Name Type Required Description
key string Yes Your API key for authentication
lang string No Language code (es, fr, de, etc.) - defaults to English

Example Request

GET /goalscorers?key=YOUR_API_KEY

Example Response

[
	{
	  "goals": 3,
	  "assists": 2,
	  "played": 1,
	  "team": {
		"id": 1438,
		"name": "Spain",
		"logo": "https://cdn.worldcupapi.com/teams/0d9bf5d8117ac245f6fcb1e63af9c8ff.png"
	  },
	  "player": {
		"id": 14849,
		"name": "Dani Olmo",
		"photo": "https://cdn.worldcupapi.com/players/f/2/5/c/f25c6ac5f918996124bfb5cb65201434.png"
	  }
	},
	{
	  "goals": 3,
	  "assists": 1,
	  "played": 1,
	  "team": {
		"id": 1649,
		"name": "Netherlands",
		"logo": "https://cdn.worldcupapi.com/teams/127be6979f0a3dff81db03646642b49a.png"
	  },
	  "player": {
		"id": 14475,
		"name": "Cody Gakpo",
		"photo": "https://cdn.worldcupapi.com/players/4/7/c/2/47c25f64f2b40398afb5cd9e67e53f28.png"
	  }
	},
	{
	  "goals": 3,
	  "assists": 1,
	  "played": 1,
	  "team": {
		"id": 1449,
		"name": "Germany",
		"logo": "https://cdn.worldcupapi.com/teams/b4ff424fda8ebabeb116f64821ab78b8.png"
	  },
	  "player": {
		"id": 91174,
		"name": "Jamal Musiala",
		"photo": "https://cdn.worldcupapi.com/players/e/6/7/8/e678c019bd5a54a28103c0229d76bf40.png"
	  }
	}
]

Code Examples

JavaScript (Fetch)

const response = await fetch('https://api.worldcupapi.com/goalscorers?key=YOUR_API_KEY');
const data = await response.json();
console.log(data);

Python (Requests)

import requests

url = 'https://api.worldcupapi.com/goalscorers'
params = {'key': 'YOUR_API_KEY'}
response = requests.get(url, params=params)
data = response.json()
print(data)
			

PHP (cURL)

$url = 'https://api.worldcupapi.com/goalscorers?key=YOUR_API_KEY';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
			

Java (HttpURLConnection)

URL url = new URL("https://api.worldcupapi.com/goalscorers?key=YOUR_API_KEY");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String response = in.readLine();
			

C# (HttpClient)

using (var client = new HttpClient())
{
	var response = await client.GetAsync("https://api.worldcupapi.com/goalscorers?key=YOUR_API_KEY");
	var content = await response.Content.ReadAsStringAsync();
	var data = JsonSerializer.Deserialize<object>(content);
}
			

Go

import (
	"encoding/json"
	"net/http"
)

resp, err := http.Get("https://api.worldcupapi.com/goalscorers?key=YOUR_API_KEY")
if err != nil {
	log.Fatal(err)
}
defer resp.Body.Close()

var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)
			

Ruby

require 'net/http'
require 'json'

uri = URI('https://api.worldcupapi.com/goalscorers?key=YOUR_API_KEY')
response = Net::HTTP.get_response(uri)
data = JSON.parse(response.body)