Skip to content

API Documentation

Chris Erickson edited this page Mar 16, 2025 · 5 revisions

Overview

The Vintage Data API provides endpoints to retrieve match and event data from the MTGO Vintage Metagame dataset.

  • Requests are limited to 100 per minute.
  • No authentication is required.

http://api.vintagedata.io/

GET /

Redirects to the GitHub repository.

GET /matches/

Retrieves raw match data.

Query Parameter(s):

- start (string, optional): Start date (YYYY-MM-DD). Default: 2024-08-25.
- end (string, optional): End date (YYYY-MM-DD). Default: Current Date.
- page (integer, optional): Page number. Default: 1.  

GET /matches/{match_id}/

Retrieves a specific match by its match_id.

URL Parameter(s):

- match_id (integer, required): Match ID. 

GET /matches/player/{player_id}/

Retrieves all matches involving a specific player.

URL Parameter(s):

- player_id (string, required): Player identifier.  

Query Parameter(s):

- start (string, optional): Start date (YYYY-MM-DD). Default: 2024-08-25.
- end (string, optional): End date (YYYY-MM-DD). Default: Current Date.
- page (integer, optional): Page number. Default: 1.  

GET /matches/event/{event_id}/

Retrieves all matches from a specific event.

URL Parameter(s):

  • event_id (integer, required): Event ID.

GET /events/

Retrieves all events. Returns event details and total number of players per event.

Query Parameter(s):

- start (string, optional): Start date (YYYY-MM-DD). Default: 2024-08-25.
- end (string, optional): End date (YYYY-MM-DD). Default: Current Date.
- page (integer, optional): Page number. Default: 1.  

GET /events/{event_id}/

Retrieves event details by event_id.

URL Parameter(s):

event_id (integer, required): The ID of the event.

GET /events/{event_id}/standings/

Retrieves event standings by event_id.

URL Parameter(s):

event_id (integer, required): The ID of the event.

Query Parameter(s):

rank (integer, optional): Search for a player of a specific rank. Default: 0 (full standings).

GET /events/{event_id}/player/{P1}/

Retrieves event rank and record for a specific player (P1) by event_id.

URL Parameter(s):

event_id (integer, required): The ID of the event.
P1 (string, required): Player identifier.

GET /events/player/{P1}/

Retrieves events played by a specific player (P1). Returns a JSON object containing event details, deck details, and win-loss record.

URL Parameter(s):

P1 (string, required): Player identifier.

Query Parameter(s):

start (string, optional): Start date (YYYY-MM-DD). Default: 2024-08-25.
end (string, optional): End date (YYYY-MM-DD). Default: Tomorrow.
page (integer, optional): Page number for pagination. Default: 1.

GET /decks/

Retrieves a list of all valid decks.

GET /decks/{deck_id}/

Retrieves details of a specific deck by deck_id.

URL Parameter(s):

deck_id (integer, required): The ID of the deck.

GET /event-types/

Retrieves a list of valid event types (e.g. Challenge, Showcase, etc.).

GET /event-types/{event_type_id}/

Retrieves details of a specific event type by event_type_id.

URL Parameter(s):

event_type_id (integer, required): The ID of the event type.

GET /load-reports/

Retrieves a list of all load reports. Load Reports contain statistics such as matches deleted, matches processed, matches skipped, etc. Matches are processed weekly on Sundays at 2am PST.

GET /load-reports/{load_rpt_id}/

Retrieves a specific load report using load_rpt_id.

URL Parameter(s):

load_rpt_id (integer, required): The ID of the load report.

GET /event-rejections/

Retrieves a list of all event rejections. Event Rejections will contain the post-processed event data along with a Rejection Type and Rejection Reason Text.

GET /event-rejections/{load_rpt_id}/

Retrieves event rejections for a specific load_rpt_id.

URL Parameter(s):

load_rpt_id (integer, required): The ID of the load report.

GET /match-rejections/

Retrieves a list of all match rejections. Match Rejections will contain the post-processed event data along with a Rejection Type and Rejection Reason Text.

GET /match-rejections/{load_rpt_id}/

Retrieves match rejections for a specific load_rpt_id.

URL Parameter(s):

load_rpt_id (integer, required): The ID of the load report.

Logging & Monitoring

All requests are logged and inserted into the "API_LOGGING_STATS" table to track API Endpoint usage statistics. See Data Dictionary for more information.

Error Handling

  • 400 Bad Request: Invalid query parameters.
  • 404 Not Found: Requested resource does not exist.
  • 500 Internal Server Error: Unexpected server error.

Example Requests

Get Matches

curl -X GET "https://api.vintagedata.io/matches/?start=2024-08-25&end=2024-10-30&page=1"
curl -X GET "https://api.vintagedata.io/events/?start=2024-08-25&end=2024-10-30&page=1"
curl -X GET "https://api.vintagedata.io/events/player/IamActuallyLvL1/"
curl -X GET "https://api.vintagedata.io/load-reports/"