---
updatedAt: 2026-06-04T22:07:08.000Z
agentTools:
  projectIndex: https://developer.opticodds.com/llms.txt
---

# /fixtures/player-results/last-x

## Description

Returns a list of player results for a given player over the last X number of games they played in.

## Specific Parameter Information

You can either set `earliest_date` or `season_year` not both!

For a full list of parameters, scroll to the bottom of this page.

### earliest\_date

A date objects in the form `YYYY-MM-DD`. More information about the functionality can be found in the [changelog](https://opticodds.readme.io/changelog/ability-to-set-earliest_date-on-fixturesplayer-resultslast-x) .

## Example Response

#### Baseball

URL: `https://api.opticodds.com/api/v3/fixtures/player-results/last-x?player_id=370FCD1B2322&season_year=2024`

```json
{
  "data": [
    {
      "sport": {
        "id": "baseball",
        "name": "Baseball"
      },
      "league": {
        "id": "mlb",
        "name": "MLB"
      },
      "player": {
        "id": "370FCD1B2322",
        "name": "Miguel Rojas",
        "position": "SS",
        "number": 11
      },
      "team": {
        "id": "8E80F9DD4C5E",
        "name": "Los Angeles Dodgers"
      },
      "stats": {
        "rbi": [1, 2, 0, 0, 1],
        "hits": [1, 2, 1, 0, 3],
        "runs": [0, 3, 0, 0, 0],
        "at_bats": [3, 4, 3, 3, 4],
        "doubles": [0, 0, 0, 0, 0],
        "starter": [1, 1, 1, 1, 1],
        "triples": [0, 0, 0, 0, 0],
        "home_runs": [0, 1, 0, 0, 0],
        "total_bases": [1, 5, 1, 0, 3],
        "stolen_bases": [0, 0, 0, 0, 0],
        "batting_walks": [0, 0, 0, 0, 0],
        "caught_stealing": [0, 0, 0, 0, 0],
        "batting_flyballs": [0, 0, 1, 3, 0],
        "batting_picked_off": [0, 0, 0, 0, 0],
        "batting_strikeouts": [0, 1, 0, 0, 0],
        "batting_groundballs": [1, 2, 1, 0, 3],
        "batting_hit_by_pitch": [0, 0, 0, 0, 0],
        "batting_sacrifice_hits": [0, 0, 1, 0, 0],
        "batting_sacrifice_flies": [1, 0, 0, 0, 0],
        "batting_intentional_walks": [0, 0, 0, 0, 0],
        "batting_plate_appearances": [4, 4, 4, 3, 4],
        "batting_ground_into_double_play": [0, 0, 0, 0, 1]
      }
    }
  ]
}
```

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "OpticOdds",
    "description": "OpticOdds API",
    "version": "3.0.0"
  },
  "servers": [
    {
      "url": "https://api.opticodds.com/api/v3",
      "description": "Production server"
    }
  ],
  "paths": {
    "/fixtures/player-results/last-x": {
      "get": {
        "tags": [
          "Results"
        ],
        "parameters": [
          {
            "required": false,
            "deprecated": false,
            "explode": true,
            "schema": {
              "title": "player_id",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "name": "player_id",
            "in": "query",
            "allowEmptyValue": false,
            "allowReserved": false
          },
          {
            "required": false,
            "deprecated": false,
            "explode": true,
            "schema": {
              "title": "team_id",
              "type": "string"
            },
            "name": "team_id",
            "in": "query",
            "allowEmptyValue": false,
            "allowReserved": false
          },
          {
            "required": false,
            "deprecated": false,
            "explode": true,
            "schema": {
              "title": "season_year",
              "type": "string"
            },
            "name": "season_year",
            "in": "query",
            "allowEmptyValue": false,
            "allowReserved": false
          },
          {
            "required": false,
            "deprecated": false,
            "explode": true,
            "schema": {
              "title": "earliest_date",
              "type": "string"
            },
            "name": "earliest_date",
            "in": "query",
            "allowEmptyValue": false,
            "allowReserved": false
          },
          {
            "required": false,
            "deprecated": false,
            "explode": true,
            "schema": {
              "title": "lookback_num",
              "type": "string"
            },
            "name": "lookback_num",
            "in": "query",
            "allowEmptyValue": false,
            "allowReserved": false
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixturePlayerResultsExternalResponse"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "BaseFixture": {
        "title": "BaseFixture",
        "required": [
          "id",
          "start_date",
          "home_competitors",
          "away_competitors",
          "status",
          "is_live",
          "venue_neutral"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "numerical_id": {
            "title": "Numerical Id",
            "type": "integer",
            "nullable": true
          },
          "game_id": {
            "title": "Game Id",
            "type": "string",
            "nullable": true
          },
          "start_date": {
            "title": "Start Date",
            "type": "string",
            "format": "date-time"
          },
          "home_competitors": {
            "title": "Home Competitors",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Competitor"
            }
          },
          "away_competitors": {
            "title": "Away Competitors",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Competitor"
            }
          },
          "home_team_display": {
            "title": "Home Team Display",
            "type": "string",
            "nullable": true
          },
          "away_team_display": {
            "title": "Away Team Display",
            "type": "string",
            "nullable": true
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "is_live": {
            "title": "Is Live",
            "type": "boolean"
          },
          "season_type": {
            "title": "Season Type",
            "type": "string",
            "nullable": true
          },
          "season_year": {
            "title": "Season Year",
            "type": "string",
            "nullable": true
          },
          "season_week": {
            "title": "Season Week",
            "type": "string",
            "nullable": true
          },
          "venue_name": {
            "title": "Venue Name",
            "type": "string",
            "nullable": true
          },
          "venue_location": {
            "title": "Venue Location",
            "type": "string",
            "nullable": true
          },
          "venue_neutral": {
            "title": "Venue Neutral",
            "type": "boolean"
          },
          "tournament": {
            "nullable": true,
            "$ref": "#/components/schemas/BaseTournament"
          },
          "tournament_stage": {
            "title": "Tournament Stage",
            "type": "string",
            "nullable": true
          }
        }
      },
      "BaseLeague": {
        "title": "BaseLeague",
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "numerical_id": {
            "title": "Numerical Id",
            "type": "integer",
            "nullable": true
          }
        }
      },
      "BasePlayer": {
        "title": "BasePlayer",
        "required": [
          "id",
          "name",
          "position",
          "number"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "position": {
            "title": "Position",
            "type": "string",
            "nullable": true
          },
          "number": {
            "title": "Number",
            "type": "integer",
            "nullable": true
          },
          "numerical_id": {
            "title": "Numerical Id",
            "type": "integer",
            "nullable": true
          },
          "base_id": {
            "title": "Base Id",
            "type": "integer",
            "nullable": true
          }
        }
      },
      "BaseSport": {
        "title": "BaseSport",
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "numerical_id": {
            "title": "Numerical Id",
            "type": "integer",
            "nullable": true
          }
        }
      },
      "BaseTeam": {
        "title": "BaseTeam",
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "numerical_id": {
            "title": "Numerical Id",
            "type": "integer",
            "nullable": true
          },
          "base_id": {
            "title": "Base Id",
            "type": "integer",
            "nullable": true
          }
        }
      },
      "BaseTournament": {
        "title": "BaseTournament",
        "required": [
          "id",
          "name",
          "start_date"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "start_date": {
            "title": "Start Date",
            "type": "string",
            "format": "date-time"
          },
          "end_date": {
            "title": "End Date",
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "numerical_id": {
            "title": "Numerical Id",
            "type": "integer",
            "nullable": true
          }
        }
      },
      "Competitor": {
        "title": "Competitor",
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "numerical_id": {
            "title": "Numerical Id",
            "type": "integer",
            "nullable": true
          },
          "base_id": {
            "title": "Base Id",
            "type": "integer",
            "nullable": true
          },
          "abbreviation": {
            "title": "Abbreviation",
            "type": "string",
            "nullable": true
          },
          "logo": {
            "title": "Logo",
            "type": "string",
            "nullable": true
          }
        }
      },
      "FixturePlayerResults": {
        "title": "FixturePlayerResults",
        "required": [
          "sport",
          "league",
          "fixture",
          "results"
        ],
        "type": "object",
        "properties": {
          "sport": {
            "$ref": "#/components/schemas/BaseSport"
          },
          "league": {
            "$ref": "#/components/schemas/BaseLeague"
          },
          "fixture": {
            "$ref": "#/components/schemas/BaseFixture"
          },
          "results": {
            "title": "Results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlayerResult"
            }
          }
        }
      },
      "FixturePlayerResultsExternalResponse": {
        "title": "FixturePlayerResultsExternalResponse",
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "title": "Data",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FixturePlayerResults"
            }
          }
        }
      },
      "PeriodStats": {
        "title": "PeriodStats",
        "required": [
          "period",
          "stats"
        ],
        "type": "object",
        "properties": {
          "period": {
            "title": "Period",
            "type": "string"
          },
          "stats": {
            "title": "Stats",
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "PlayerResult": {
        "title": "PlayerResult",
        "required": [
          "player",
          "team",
          "status"
        ],
        "type": "object",
        "properties": {
          "player": {
            "$ref": "#/components/schemas/BasePlayer"
          },
          "team": {
            "$ref": "#/components/schemas/BaseTeam",
            "nullable": true
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "stats": {
            "title": "Stats",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeriodStats"
            },
            "nullable": true
          },
          "market_stats": {
            "title": "Market Stats",
            "type": "object",
            "additionalProperties": true,
            "nullable": true
          },
          "is_starter": {
            "title": "Is Starter",
            "type": "boolean",
            "nullable": true
          }
        }
      }
    },
    "securitySchemes": {
      "Header": {
        "type": "apiKey",
        "name": "X-Api-Key",
        "in": "header"
      },
      "QueryParam": {
        "type": "apiKey",
        "name": "key",
        "in": "query"
      }
    }
  },
  "security": [
    {
      "Header": []
    },
    {
      "QueryParam": []
    }
  ]
}
```