# FC Barcelona — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access the latest FC Barcelona news, browse player profiles and squad rosters for both the first team and women's team, and check match schedules, results, and competition standings. Search across all available content to stay updated on team information, upcoming fixtures, and performance data.

**Category:** Sports | **Website:** [fcbarcelona.com/](https://fcbarcelona.com/) | **Docs:** [parse.bot/marketplace/16be7afd-5c0d-4706-8569-8fc73a252e97/fcbarcelona-com-api](https://parse.bot/marketplace/16be7afd-5c0d-4706-8569-8fc73a252e97/fcbarcelona-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-fcbarcelona-com-api-16be7afd/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_competitions

Retrieve available competitions and their season IDs for FC Barcelona. Each competition includes an array of compSeasons with id and label. Use compSeasons[*].id values as the comp_seasons parameter for schedule and results endpoints.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fcbarcelona-com-api-16be7afd/get_competitions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_first_team_results

Retrieve completed match results for the FC Barcelona First Team. Returns past fixtures (status 'C') sorted by most recent first, including scores, goals, match officials, attendance, and ground information.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `comp_seasons` | string | No | Comma-separated competition season IDs to filter by (from get_competitions content[*].compSeasons[*].id). Leave blank to return all seasons. |
| `limit` | integer | No | Max results to return. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fcbarcelona-com-api-16be7afd/get_first_team_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"comp_seasons":"<string>","limit":"<integer>"}'
```

### get_first_team_schedule

Retrieve upcoming match fixtures for the FC Barcelona First Team. Returns scheduled matches (status 'U') with kickoff times, teams, and venue. Results sorted ascending by kickoff. May return empty content array when no upcoming fixtures exist (e.g. off-season).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `comp_seasons` | string | No | Comma-separated competition season IDs to filter by (from get_competitions content[*].compSeasons[*].id). Leave blank to return all seasons. |
| `limit` | integer | No | Max results to return. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fcbarcelona-com-api-16be7afd/get_first_team_schedule \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"comp_seasons":"<string>","limit":"<integer>"}'
```

### get_first_team_squad

Retrieve the full FC Barcelona men's First Team squad roster. Returns all active players with biographical info (known name, full name, place of birth, date of birth), position, shirt number in metadata, headshot image, and bio HTML content. Each player's references array contains FOOTBALL_PERSON type entries whose id is used for get_player_profile.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fcbarcelona-com-api-16be7afd/get_first_team_squad \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_latest_news

Retrieve the latest news articles from FC Barcelona. Returns paginated content with article summaries including title, description, date, tags, and full body HTML. Supports filtering by category tag. Pagination via offset/limit against the full article catalog.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Category filter slug appended to content-category- tag. Omitting returns all news categories. |
| `limit` | integer | No | Max results to return per page. |
| `offset` | integer | No | Pagination offset (0-based index of first result). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fcbarcelona-com-api-16be7afd/get_latest_news \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### get_news_article

Retrieve the full content of a specific news article by its numeric ID. Returns the complete article including HTML body, author, lead media, and tags. The article_id is obtained from get_latest_news content[*].id or search results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `article_id` | string | Yes | Numeric ID of the news article (from get_latest_news content[*].id or search results). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fcbarcelona-com-api-16be7afd/get_news_article \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"article_id":"<string>"}'
```

### get_player_profile

Retrieve detailed biography and career statistics for a specific player by their FOOTBALL_PERSON ID. Returns the player's bio content (name, position, headshot, bio HTML) and career stats (appearances, goals, assists). The player_id is obtained from get_first_team_squad content[*].references where type is FOOTBALL_PERSON.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `player_id` | string | Yes | Numeric player FOOTBALL_PERSON ID (from get_first_team_squad content[*].references where type is FOOTBALL_PERSON). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fcbarcelona-com-api-16be7afd/get_player_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"player_id":"<string>"}'
```

### get_women_team_squad

Retrieve the FC Barcelona Women's Football team squad roster. Returns active players with the same bio structure as the men's team: known name, position, shirt number, headshot, and bio content.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fcbarcelona-com-api-16be7afd/get_women_team_squad \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search

Search for content by keyword across FC Barcelona's content catalog. Returns matching articles, videos, photos, or playlists with title, description, date, and image URL. Paginates via start/limit offsets. Results are sorted by timestamp descending.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Max results to return per request. |
| `query` | string | Yes | Search keyword. |
| `start` | integer | No | Pagination start offset (0-based). |
| `type` | string | No | Content type filter. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-fcbarcelona-com-api-16be7afd/search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","query":"<string>","start":"<integer>","type":"<string>"}'
```
