Published on March 2, 2026
FC Barcelona Player Data — Free API Access 2026
Get FC Barcelona player information for free via REST API in 2026. Access player profiles including name, position, shirt number, nationality, and captain status with no API key required.
Player Data from the Barça API
The Barça API gives you access to individual player profiles from the current FC Barcelona squad. You can query the full squad and filter by position, or look up a specific player directly by their database ID.
All player data is available completely free — no registration, no API key, no billing.
Querying Individual Players
To fetch a specific player, use the player endpoint with their ID:
GET /api/player/:id
Example:
curl https://api.fc-barcelona.app/api/player/9
Example response:
{
"data": {
"id": 9,
"name": "Robert Lewandowski",
"number": 9,
"position": "FW",
"nationality": "Poland",
"isCaptain": false
}
}
Getting All Players at Once
For a full squad list, use the squad endpoint:
GET /api/squad
You can then filter in your application or use the built-in position query parameter to narrow results:
GET /api/squad?position=MF # midfielders only
GET /api/squad?position=DF # defenders only
Player Fields
| Field | Type | Description |
|---|---|---|
id |
number | Unique player ID |
name |
string | Full player name |
number |
number | Shirt number |
position |
string | GK, DF, MF, or FW |
nationality |
string | Country |
isCaptain |
boolean | Team captain flag |
Finding a Player by Shirt Number
The API doesn't have a direct "find by shirt number" endpoint, but you can easily filter the squad response client-side:
const response = await fetch('https://api.fc-barcelona.app/api/squad');
const { data } = await response.json();
const shirtNumber = 10;
const player = data.find(p => p.number === shirtNumber);
if (player) {
console.log(`#${player.number} ${player.name} — ${player.position}`);
}
The interactive terminal supports this directly with the /player command:
visitor@barca-api:~$ /player 10
Practical Examples
List all captains:
const { data } = await (await fetch('/api/squad')).json();
const captains = data.filter(p => p.isCaptain);
Group players by position:
const { data } = await (await fetch('/api/squad')).json();
const byPosition = data.reduce((acc, player) => {
(acc[player.position] ??= []).push(player);
return acc;
}, {});
Count nationalities:
const { data } = await (await fetch('/api/squad')).json();
const nationalities = [...new Set(data.map(p => p.nationality))];
console.log(`${nationalities.length} different nationalities in the squad`);
Full Documentation
See the API docs for the complete reference including request/response schemas and error codes.