This is version 1 of the API. Please see here for the latest version.
Our Yu-Gi-Oh! API is now available for public consumption. Below are the details on how to use the API and what kind of response is to be expected from the API.
Please download and store all data pulled from this API locally to keep the amount of API calls used to a minimum. Failure to do so may result in either your IP address being blacklisted or the API being rolled back.
Rate Limiting on the API is enabled. The rate limit is 20 requests per 1 second. If you exceed this, you are blocked from accessing the API for 1 hour. We will monitor this rate limit for now and adjust accordingly.
Our API responses are cached on our side. The cache timings will be given below. These are subject to change.
The Card Information endpoint is available at https://db.ygoprodeck.com/api/cardinfo.php
This endpoint takes the variable name
which is the card name. For example: https://db.ygoprodeck.com/api/cardinfo.php?name=Decode Talker
You can also pass an ID
as the name
and it will search by ID! For example: https://db.ygoprodeck.com/api/cardinfo.php?name=58775978
The specific results from this endpoint are cached for 3 Hours (10800 seconds)
Response Information:
*Card Types Returned:
Main Deck Types
Extra Deck Types
We are working on to soon include price data as part of the response information.
The Ban List endpoint is available at https://db.ygoprodeck.com/api/banlist.php
This endpoint takes the variable banlist
which is the Ban List you want to query (TCG, OCG or GOAT). For example: https://db.ygoprodeck.com/api/banlist.php?banlist=TCG
The specific results from this endpoint are cached for 10 Days (864000 seconds). We manually purge the cache when a ban list updated is needed.
Response Information:
The Card Sets endpoint is available at https://db.ygoprodeck.com/api/cardset.php
This endpoint takes the variable set
which is the name of the card set you want to query. For example: https://db.ygoprodeck.com/api/cardset.php?set=Metal Raiders
The specific results from this endpoint are cached for 1 Day (86400 seconds).
Response Information:
The All Cards endpoint is available at https://db.ygoprodeck.com/api/allcards.php
This will return every card we have stored. If you are only looking for newly added cards, please use the endpoint below.
This endpoint takes no variable. For example: https://db.ygoprodeck.com/api/allcards.php
The specific results from this endpoint are cached for 1 Day (86400 seconds).
Response Information:
The New Cards endpoint is available at https://db.ygoprodeck.com/api/newcards.php
This will return the 20 latest cards added to the Database.
This endpoint takes no variable. For example: https://db.ygoprodeck.com/api/newcards.php
The specific results from this endpoint are cached for 1 Day (86400 seconds).
Response Information:
Card images can be pulled from our Google Cloud server but please only pull an image once and then store it locally. If we find you are pulling a very high volume of images per second then your IP will be blacklisted and blocked.
Our card images are in .jpg
format and are web optimized.
All of our cloud URLs will either be https://storage.googleapis.com/ygoprodeck.com/pics/
or https://storage.googleapis.com/ygoprodeck.com/pics_small/
. You pass the ID of the card to retrieve the image.
Example Limit Reverse Card Image: https://storage.googleapis.com/ygoprodeck.com/pics/27551.jpg
The image URLs are found within the JSON response as both image_url
and image_url_small
.