api documentation

Developers, developers, developers, developers, developers...

Are you a developer or if you want to use our data at your site or some other usage mtgmeta provides a REST-like API for ingesting our data programatically.

The API is available at mtgmeta.io/api, check the documentation below and please follow our guidelines.

API Documentation and Guidelines

This API exposes some of the information available on the regular site in a JSON format.

API requests are only served over HTTPS, using TLS 1.0, 1.1, and 1.2. The API uses UTF-8 character encoding for all responses and served as JSON.

Who can use this API?

To have access to the API you need to be a registered mtgmeta user and have the mythic premium tier at patreon.

Rate Limits

At this moment the limit is at 8 requests every 30s.

Usage of this data

You can use the data presented here as you want as long you don't insinuate that mtgmeta has endorsed you, your work, or your product. Otherwise you can and would be appreciated if you could reference us.

You may not require any payment in exchange for access to this data.

You will need to login to the api first (and the login will expire after 24h) your rate will be limited to 4 requests every 10seconds.

Also remember that wizards of the Coast has the intelectual property on Magic the Gathering.

Endpoints Available

Notes

The information here can change at any point and the data can not be 100% acurate use it at your own risk.

General info response

Success

 
{
  "version": string,
  "data": []
}
    

Some error

{
  "version": string,
  "data": null,
  "status": int,
  "error": String
}
    

/login

You need to be authenticated, just do a GET requested with your login information and will be logged in for 30days.

If you are already logged in it will show you some of your user information.

Endpoint request

Example:

GEThttps://mtgmeta.io/api/login?username=myusername&password=mypassword

    {
  "version": "1.5",
  "data": {
      "last_login": "2020-04-09",
      "registered": "2020-01-06",
      "email": false,
      "username": "myusername",
      "premium": false,
      "beta_tester": false,
      "total_decks": "1",
      "total_matches": "0",
      "userid": "00"
  },
"status": "logged in with success."
}
    

/logout

Access this endpoint to be logged out.

Endpoint request

Example:

GEThttps://mtgmeta.io/api/logout

    {

"version": "1.5",
"data": "Logged out"

}
    

/decks

On this endpoint you can get information on all decks available by format and/or specific decks.

Endpoint requests

Example:

GEThttps://mtgmeta.io/api/decks/58

  {
  "version": 1,
  "data": {
    "name": "mono white",
    "metashare": 1,
    "performance": 0,
    "startdate": "2016-11-15",
    "enddate": "2019-03-01",
    "format": "pauper",
    "latest_decklist": {
      "price_eur": 35.9,
      "price_usd": 42.6,
      "main": [
        {
          "card": "Soul Warden",
          "quantity": 3
        },
        {...}
      ],
      "sideboard": [
        {
          "card": "Beckon Apparition",
          "quantity": 2
        },
        {...}
      ]
    },
    "latest_tournaments": [
      {
        "tid": 42,
        "name": "Challenge",
        "url": "https://magic.wizards.com/en/articles/archive/mtgo-standings/pauper-challenge-2018-05-07",
        "place": 6,
        "player": "box",
        "date": "2018-05-07"
      },
      {...}
    ]
  }
}

GEThttps://mtgmeta.io/api/decks/modern/

{
  "version": 1,
  "data": [
    {
      "name": "amulet bloom",
      "did": 224,
      "format": "modern",
      "metashare": 0,
      "performance": 0,
      "price": 0,
      "total": 1
    },
    {...}
  ]
}

/tournaments

On this endpoint you can get information on all tournaments available by format and/or specific tournaments.

Examples:

GEThttps://mtgmeta.io/api/tournaments/standard

{
  "version": 1,
  "data": {
    "has_more": true,
    "tournaments": [
      {
        "tid": 115,
        "url": "https://www.starcitygames.com/events/090219_dallas.html#Standard_Open",
        "format": "standard",
        "date": "2019-02-09",
        "name": "Dallas Open Weekend Standard Open",
        "win_deck": "mono-blue aggro",
        "win_deck_id": 169
      },
      {...}
    ]
  }
}

GEThttps://mtgmeta.io/api/tournaments/standard/2

{
  "version": 1,
  "data": {
    "has_more": false,
    "tournaments": [
      {
        "tid": 115,
        "url": "https://www.starcitygames.com/events/090219_dallas.html#Standard_Open",
        "format": "standard",
        "date": "2019-02-09",
        "name": "Dallas Open Weekend Standard Open",
        "win_deck": "mono-blue aggro",
        "win_deck_id": 169
      },
    ]
  }
}

GEThttps://mtgmeta.io/api/tournaments/115

{
  "version": 1,
  "data": {
    "name": "Dallas Open Weekend Standard Open",
    "format": "standard",
    "url": "https://www.starcitygames.com/events/090219_dallas.html#Standard_Open",
    "date": "2019-02-09",
    "results": [
      {
        "place": 1,
        "player": "robert wagner-krankel",
        "deck": "mono-blue aggro",
        "did": 169
      },
      {
        "place": 2,
        "player": "jonathan hobbs",
        "deck": "esper control",
        "did": 165
      },
      {
        "place": 3,
        "player": "john johnson",
        "deck": "simic nexus",
        "did": 177
      },
      {
        "place": 4,
        "player": "juan leyva",
        "deck": "azorius aggro",
        "did": 164
      },
      {
        "place": 5,
        "player": "jody keith",
        "deck": "rakdos midrange",
        "did": 184
      },
      {
        "place": 6,
        "player": "tannon grace",
        "deck": "mono-blue aggro",
        "did": 169
      },
      {
        "place": 7,
        "player": "dylan donegan",
        "deck": "sultai midrange",
        "did": 162
      },
      {
        "place": 8,
        "player": "eric hawkins",
        "deck": "azorius aggro",
        "did": 164
      }
    ]
  }
}

Footnotes

Current API version: v1.5

Last documentation update 2020/04/09

close icon
logo mtgmeta.io

Currently doing updates, some information might not be entirely accurate. Check again in a few minutes.

We might use cookies to offer you a better browsing experience, analyze site traffic and personalize content. No personal information is stored. If you continue to use this site, you consent to our use of cookies.

up arrowtop