# Fantasy Premier League API
> The official Fantasy Premier League (FPL) data as an API — the game played by over 13 million managers. List every player with their price, total points, form, ownership percentage and underlying stats (goals, assists, clean sheets, bonus, expected goals and assists, minutes and injury news). Browse the 20 Premier League clubs with their league record and fixture strength, the full gameweek calendar with deadlines and average scores, and fixtures with live and final results. Pull per-player detail with recent gameweek-by-gameweek history and upcoming fixtures with difficulty ratings. Real data, no key needed upstream. Ideal for FPL tools and draft assistants, fantasy-football apps, stat dashboards and Premier League widgets.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/fpl-api/..."
```

## Pricing
- **Free** (Free) — 10,000 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 135,000 calls/Mo, 8 req/s
- **Pro** ($24/Mo) — 690,000 calls/Mo, 25 req/s
- **Mega** ($80/Mo) — 3,250,000 calls/Mo, 50 req/s

## Endpoints

### FPL

#### `GET /v1/fixtures` — Fixtures & results

**Parameters:**
- `gameweek` (query, optional, string) — Gameweek number, e.g. 1 Example: `1`
- `future` (query, optional, string) — Set 1 for only upcoming fixtures

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fpl-api/v1/fixtures?gameweek=1"
```

**Response:**
```json
{
    "data": {
        "count": 10,
        "fixtures": [
            {
                "id": 1,
                "away": "Bournemouth",
                "home": "Liverpool",
                "kickoff": "2025-08-15T19:00:00Z",
                "started": true,
                "finished": true,
                "gameweek": 1,
                "away_score": 2,
                "home_score": 4,
                "away_difficulty": 4,
                "home_difficulty": 3
            },
            {
                "id": 2,
                "away": "Newcastle",
                "home": "Aston Villa",
                "kickoff": "2025-08-16T11:30:00Z",
                "started": true,
                "finished": true,
                "gameweek": 1,
                "away_score": 0,
                "home_score": 0,
                "away_difficulty": 4,
                "home_difficulty": 3
            },
            {
                "id": 3,
                "away": "Fulham",
                "home": "Brighton",
                "kickoff": "2025-08-16T14:00:00Z",
                "started": true,
                "finished": true,
                "gameweek": 1,
                "away_score": 1,
                "home_score": 1,
                "away_difficulty": 4,
                "home_difficulty": 3
            },
            {
                "id": 6,
                "away": "Burnley",
                "home": "Spurs",
                "kickoff": "2025-08-16T14:00:00Z",
                "started": tr
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/gameweeks` — All gameweeks with deadlines

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fpl-api/v1/gameweeks"
```

**Response:**
```json
{
    "data": {
        "count": 38,
        "gameweeks": [
            {
                "id": 1,
                "name": "Gameweek 1",
                "is_next": false,
                "deadline": "2025-08-15T17:30:00Z",
                "finished": true,
                "is_current": false,
                "average_score": 54,
                "highest_score": 127,
                "most_selected": 235,
                "most_captained": 381
            },
            {
                "id": 2,
                "name": "Gameweek 2",
                "is_next": false,
                "deadline": "2025-08-22T17:30:00Z",
                "finished": true,
                "is_current": false,
                "average_score": 51,
                "highest_score": 140,
                "most_selected": 235,
                "most_captained": 381
            },
            {
                "id": 3,
                "name": "Gameweek 3",
                "is_next": false,
                "deadline": "2025-08-30T10:00:00Z",
                "finished": true,
                "is_current": false,
                "average_score": 48,
                "highest_score": 118,
                "most_selected": 249,
                "most_captained": 430
            },
            {
                "id": 4,
                "name": "Gameweek 4",
                "is_next": false,
                "deadline": "2025-09-13T10:00:00Z",
                "finished": true,
                "is_current": false,
      
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/player` — A single player with history & fixtures

**Parameters:**
- `id` (query, required, string) — Player id, e.g. 1 Example: `1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fpl-api/v1/player?id=1"
```

**Response:**
```json
{
    "data": {
        "player": {
            "id": 1,
            "form": 5,
            "name": "Raya",
            "news": null,
            "team": "Arsenal",
            "bonus": 11,
            "price": 6.2,
            "saves": 60,
            "status": "a",
            "assists": 0,
            "history": [
                {
                    "bonus": 0,
                    "goals": 0,
                    "points": 3,
                    "assists": 0,
                    "minutes": 90,
                    "gameweek": 28,
                    "opponent": "CHE"
                },
                {
                    "bonus": 1,
                    "goals": 0,
                    "points": 7,
                    "assists": 0,
                    "minutes": 90,
                    "gameweek": 29,
                    "opponent": "BHA"
                },
                {
                    "bonus": 0,
                    "goals": 0,
                    "points": 7,
                    "assists": 0,
                    "minutes": 90,
                    "gameweek": 30,
                    "opponent": "EVE"
                },
                {
                    "bonus": 0,
                    "goals": 0,
                    "points": 1,
                    "assists": 0,
                    "minutes": 90,
                    "gameweek": 32,
                    "opponent": "BOU"
                },
                {
                    "bonus": 0,
                    "go
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/players` — Players with prices, points & stats

**Parameters:**
- `search` (query, optional, string) — Name search
- `team` (query, optional, string) — Club name or short code, e.g. MCI
- `position` (query, optional, string) — goalkeeper | defender | midfielder | forward
- `sort` (query, optional, string) — total_points | form | now_cost | selected_by_percent | goals_scored | assists Example: `total_points`
- `limit` (query, optional, string) — Max results (default 30, max 200) Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fpl-api/v1/players?sort=total_points&limit=30"
```

**Response:**
```json
{
    "data": {
        "sort": "total_points",
        "count": 30,
        "players": [
            {
                "id": 430,
                "form": 5,
                "name": "Haaland",
                "news": null,
                "team": "Man City",
                "bonus": 43,
                "price": 14.7,
                "saves": 0,
                "status": "a",
                "assists": 8,
                "minutes": 2953,
                "position": "Forward",
                "last_name": "Haaland",
                "red_cards": 0,
                "first_name": "Erling",
                "photo_code": 223094,
                "team_short": "MCI",
                "clean_sheets": 13,
                "goals_scored": 27,
                "total_points": 239,
                "yellow_cards": 2,
                "expected_goals": 25.5,
                "points_per_game": 6.8,
                "expected_assists": 2.67,
                "selected_by_percent": 62.5
            },
            {
                "id": 449,
                "form": 8.7,
                "name": "B.Fernandes",
                "news": null,
                "team": "Man Utd",
                "bonus": 41,
                "price": 10.4,
                "saves": 0,
                "status": "a",
                "assists": 24,
                "minutes": 3065,
                "position": "Midfielder",
                "last_name": "Borges Fernandes",
                "red_cards": 0,
                "first_name"
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/teams` — The 20 Premier League clubs

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fpl-api/v1/teams"
```

**Response:**
```json
{
    "data": {
        "count": 20,
        "teams": [
            {
                "id": 1,
                "won": 0,
                "code": 3,
                "lost": 0,
                "name": "Arsenal",
                "drawn": 0,
                "played": 0,
                "points": 0,
                "position": 1,
                "strength": 5,
                "short_name": "ARS",
                "strength_overall_away": 1355,
                "strength_overall_home": 1305
            },
            {
                "id": 2,
                "won": 0,
                "code": 7,
                "lost": 0,
                "name": "Aston Villa",
                "drawn": 0,
                "played": 0,
                "points": 0,
                "position": 4,
                "strength": 3,
                "short_name": "AVL",
                "strength_overall_away": 1230,
                "strength_overall_home": 1135
            },
            {
                "id": 3,
                "won": 0,
                "code": 90,
                "lost": 0,
                "name": "Burnley",
                "drawn": 0,
                "played": 0,
                "points": 0,
                "position": 19,
                "strength": 2,
                "short_name": "BUR",
                "strength_overall_away": 1045,
                "strength_overall_home": 975
            },
            {
                "id": 4,
                "won": 0,
                "code": 91,
     
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service description & endpoints

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fpl-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "service": "fpl-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/teams": "The 20 clubs.",
            "GET /v1/player": "A single player with history & upcoming fixtures (id=).",
            "GET /v1/players": "Players (search=, team=, position=, sort=total_points|form|now_cost|…, limit=).",
            "GET /v1/fixtures": "Fixtures & results (gameweek=, future=1).",
            "GET /v1/gameweeks": "All gameweeks with deadlines."
        },
        "description": "Official Fantasy Premier League (FPL) data: all players with prices, total points, form, ownership and underlying stats; the 20 Premier League clubs with their league record; fixtures and results; gameweeks with deadlines and average scores; and per-player detail with recent history and upcoming fixtures. Real data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:34.235Z",
        "request_id": "9238a830-f516-4188-8f79-2f9ede2a9d78"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/fpl-api
OpenAPI spec: https://www.oanor.com/api/fpl-api/openapi.json
