Developers

OpenRift runs on a public API, and you're welcome to use it too, whether you run a shop, organize tournaments, make content or build your own tools. The card catalog, prices and rules are free to use, without a key. If your idea would fit on OpenRift itself, the code is open source on GitHub and pull requests are welcome.

Getting started

Here's how to get every set with its card and printing counts:

curl -A "MyDeckTool/1.0 ([email protected])" /api/v1/sets

Please send a User-Agent with your project's name and a way to reach you, like the example does. That way I can warn you before a breaking change.

For the full reference, see the OpenAPI specification. It's always up to date, and in Swagger UI you can try every endpoint right in your browser.

Endpoints

EndpointReturns
/api/v1/catalogEvery card, printing and set in one response.
/api/v1/cards/{cardSlug}One card with all its printings, their sets and the products they come in. Printings have the same shape as in the catalog.
/api/v1/setsEvery set with its card and printing counts.
/api/v1/pricesCurrent prices from TCGplayer, Cardmarket, CardTrader and CardNexus.
/api/v1/prices/{printingId}One printing's current price, store links and price history on every marketplace.
/api/v1/prices/linksEach marketplace's product id and store link, for a list of printings or for all of them.
/api/v1/rulesThe official core and tournament rules, in every version. Older versions also list what changed in them.
/api/v1/rules/versionsEvery rules version and the languages it's available in.

The API doesn't allow cross-origin requests from browsers, so call it from your server or a build step.

The card catalog

The catalog is the whole card database in one response. A card is the game object, with its rules and stats. A printing is one physical version of a card, with its own set, language, finish and art. The catalog also brings the labels and translations you need to display all of it.

If you only need some languages, add ?langs=EN. It takes comma-separated codes, and the catalog lists every code in enums.languages.

Each printing lists its images by imageId. The file is at /media/cards/{imageId}-{size}.webp on this site, where the size is 120w, 240w, 400w or full.

Card images and art belong to Riot Games. OpenRift hosts these files to show cards on this site and can't grant you any rights to them. Riot's policies for Riftbound apps decide whether and how you may show them, so check those before you use them. Please don't mirror the images in bulk.

Prices and store links

Prices update once a day. Marketplaces report several numbers, so here's which one you get: TCGplayer's market price, the lowest listing on Cardmarket and CardNexus, and the lowest CardTrader Zero listing on CardTrader. If a printing matches several products on one marketplace, you get the cheapest. TCGplayer only sells English printings. Cardmarket pools all languages into one price, so its numbers often reflect a cheaper copy in another language.

Need store links? /api/v1/prices/links gives you a ready-made url for each marketplace, pointing at the exact product, for the printings you name or for all of them in one response. Links to TCGplayer, CardTrader and CardNexus carry OpenRift's referral code. If you use them, purchases through your site help keep this API free, at no extra cost to you or the buyer.

Caching and rate limits

Every response is cacheable for an hour (max-age=3600) and comes with an ETag. Keep each response at least that long, then check back with If-None-Match. The full catalog is about 8 MB today, or 750 KB compressed, and it only grows.

$ curl -si -A "MyDeckTool/1.0 ([email protected])" /api/v1/sets
HTTP/2 200
cache-control: public, max-age=3600, stale-while-revalidate=86400
etag: "ef44dbbc"

$ curl -si -A "MyDeckTool/1.0 ([email protected])" -H 'If-None-Match: "ef44dbbc"' /api/v1/sets
HTTP/2 304

When nothing has changed, the second request comes back as 304 Not Modified with no body, so you keep using your copy.

There's no fixed rate limit, so please keep your traffic light. If you need every card, fetch the catalog once and cache it. The per-card endpoint is for single lookups, not for crawling. Clients that send too many requests get blocked, and if your User-Agent has contact details, I'll try to reach you first.

Terms

OpenRift's own data, like ids, slugs and marketplace mappings, is yours to use for anything, commercial projects included. Card text, card images and rules documents belong to Riot Games, so using them falls under Riot's policies for Riftbound apps.

Collecting, checking and correcting this data took countless hours. If you show it, please credit OpenRift and link card names to their OpenRift card pages (/cards/{card-slug}).

The API is still young, so things can change. I try to add fields without renaming or removing existing ones, and I'll announce breaking changes on Discord and to every client whose User-Agent has contact details.

Questions and requests

Found a missing card, printing or image, or something that's wrong? You can add or fix it on the Contribute page. The card data is maintained by one person, so every bit of help filling in the gaps counts.

Missing a field or an endpoint, or found a bug? Open an issue on GitHub or ask on Discord. And if you've built something with the API, tell me about it. I'd like to link to it.