- Free
- No API key
- JSON
OpenRift's free Riftbound API returns the card catalog, prices and rules as JSON, no key needed. It's the same API that powers OpenRift, and you can use it to build your own tools. If what you're building would fit on OpenRift itself, the code is open source on GitHub and pull requests are very welcome.
$ curl /api/v1/catalog{"energy": 5,"tags": ["Annie", "Noxus"],"name": "Annie, Fiery","domains": ["fury"],"printedRulesText": "Your spells and…","publicCode": "OGS-001/024",…}Getting started
Download the whole catalog:
curl -A "MyDeckTool/1.0 ([email protected])" -o catalog.json /api/v1/catalog
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 Swagger UI.
Endpoints
| Endpoint | Returns |
|---|---|
/api/v1/catalog | All cards, printings and sets in one response. |
/api/v1/cards/{cardSlug} | One card with all its printings and their sets. |
/api/v1/search | Cards matching a search query, one page at a time, in the query syntax the site's search box takes. |
/api/v1/search/named | One card by exact or approximate name, with all its printings. |
/api/v1/search/random | One random card, optionally limited by a search query. |
/api/v1/sets | All sets with their card and printing counts and release dates. |
/api/v1/prices | All current prices from TCGplayer, Cardmarket, CardTrader and CardNexus. |
/api/v1/prices/{printingId} | One printing's current price, store links and price history. |
/api/v1/prices/links | Each marketplace's product id and store link. |
/api/v1/rules | The core and tournament rules, current and older versions, multiple languages. |
/api/v1/rules/versions | Overview of the rules versions and the languages they are available in. |
You can also call the API from the browser, straight from your site's frontend. Browsers don't let a page set its own User-Agent, so I see your site's address instead. Breaking changes are announced on Discord.
The card catalog
The catalog contains cards (the game objects), sets, printings (physical versions), markers, distribution channels, enums, keywords and tags.
If you only need some languages, add ?langs=EN. It takes comma-separated codes. The catalog lists every available language code in enums.languages.
Each printing lists its images by imageId. The file is at /media/cards/{imageId}-{size}.webp, 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.
Search queries
/api/v1/search takes a q parameter in the same syntax as the search box on the site: keys like t:unit, d:fury and e<=3, combined with or, parentheses and a minus to exclude. The search syntax help page lists every key.
curl -A "MyDeckTool/1.0 ([email protected])" "/api/v1/search?q=t%3Aunit%20d%3Afury%20e%3C%3D3&limit=20"
Results come in pages of up to 200, 100 by default (limit). Pass nextCursor back as cursor for the next page. Each card appears once, as an English printing unless the query has lang:. The unique, order and dir parameters, or unique:, order: and direction: in the query, choose printings and sorting, and the query wins. An unknown key or value is left out and named in warnings. A query that matches nothing returns 404. A query with an error, nothing left after leaving terms out, or a key that needs a signed-in user (price, owned, ctag:) returns 400 with the problems in data.diagnostics and data.warnings.
Prices and store links
Prices update once a day. Marketplaces report several numbers, but I only store one: TCGplayer's market price, Cardmarket and CardNexus 'low' prices, and the lowest CardTrader Zero listing on CardTrader. If a printing matches several products on one marketplace, you get the cheapest. Warning: Cardmarket pools all languages into one price, so its numbers often reflect a cheaper copy in another language.
/api/v1/prices/links gives you a url for each marketplace, pointing at the exact product. 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 (these numbers will grow over time).
$ 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.
There's no fixed rate limit, but please keep your traffic light. The per-card endpoint is for single lookups, not for crawling. Clients that send too many requests get blocked. If your User-Agent has contact details, I might try to reach you first.
Attribution (optional)
You don't need to credit OpenRift to use the API, but I'd really appreciate it if you did. Collecting, checking and correcting this data took countless hours. A mention of OpenRift and links from card names to their OpenRift card pages (/cards/{card-slug}) help the most.
Terms
Card text, card images and rules documents belong to Riot Games, so using them falls under Riot's policies for Riftbound apps. I am not responsible for your use of them, and I can't grant you any rights to them.
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 is appreciated.
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.
