GRIMORIA
HomeDiscoverCollectionDeckbuilder
Log InSign Up

Grimoria API

Let apps, scripts and AI assistants read and manage a Grimoria user's Magic: The Gathering collection, decks and wishlists, and look up card data. Every call acts on behalf of one user and only reaches what that user allowed.

Base URL and spec

Base URL: https://grimoria.app/api/v1
OpenAPI 3 spec: https://grimoria.app/api/v1/openapi.json — it lists every endpoint available to API clients, with its required scope and request and response schemas.

Most responses wrap their payload as { "success": true, "data": … }. Card lookups under /cards return the payload directly.

Authentication

Send a token in the Authorization header. Tokens start with gma_. There are two ways to get one.

Personal API key

For your own scripts. Create one in Settings → API access, choose its permissions and an optional expiry, and copy it: it is shown only once. You can hold up to 10 active keys and revoke any of them there.

curl https://grimoria.app/api/v1/collections \
  -H "Authorization: Bearer gma_YOUR_KEY"

OAuth 2.1 (for apps used by many people)

Grimoria is an OAuth 2.1 authorization server supporting the authorization code flow with PKCE. Only S256 challenges are accepted, and state is required. Discovery document: https://grimoria.app/.well-known/oauth-authorization-server.

  • Send the user to https://grimoria.app/oauth/authorize with response_type=code, your client_id, a registered redirect_uri, space-separated scope, state and the PKCE challenge. The user signs in and approves or denies.
  • Exchange the code (valid for 60 seconds, usable once) at POST https://grimoria.app/api/v1/oauth/token as form data with your code_verifier. Confidential clients authenticate with HTTP Basic or client_secret in the body; public clients send only client_id.
  • Access tokens last 1 hour; refresh tokens last 30 days and rotate on every use. Reusing an old refresh token revokes the whole grant. Revoke tokens at POST https://grimoria.app/api/v1/oauth/revoke.
  • Users see connected apps in Settings → API access and can disconnect them at any time.

Client registration is manual for now: send your app name, redirect URIs and the scopes you need through the feedback form.

Scopes

ScopeGrants
cards:readSearch and read card data, printings, rulings and sets.
collection:readList the user's collections and read or search the cards in them.
collection:writeAdd cards to a collection (one or in bulk) and edit collection cards.
decks:readList and read the user's decks, validate them, read public decks.
decks:writeCreate decks, edit deck details, add and edit deck cards.
wishlist:readList and read the user's wishlists and their cards.
wishlist:writeCreate and edit wishlists, add and edit wishlist cards.

Tokens can never reach account, login, payment, deletion, sync or admin endpoints, and cannot create or manage other tokens. Card data is public; collection, deck and wishlist data belongs to the user who approved the token. Prices come mainly from European markets (Cardmarket, CardTrader).

Rate limits

  • 10 requests per second per token, with bursts up to 30.
  • 200 requests per second per client IP across all tokens.
  • OAuth endpoints: 5 requests per second per IP, with bursts up to 10.

Over the limit you get HTTP 503 or 429. Back off and retry, honouring Retry-After or the X-RateLimit-* headers when a response carries them.

Errors

Errors are JSON with statusCode, message and, where one applies, a stable code. The OAuth endpoints use the standard { "error", "error_description" } format.

  • 401 — the token is missing, unknown, revoked or expired (AUTH_004). Get a new token.
  • 403 — the endpoint is not available to API tokens (AUTH_020) or the token lacks the scope it needs (AUTH_021).
  • 404 — the resource does not exist or belongs to someone else.

Requirements

A free Grimoria account is all you need. Create one, then make a key or connect an app.

Download on the App StoreGet it on Google Play

2026 Grimoria. All rights reserved.

Support GrimoriaPrivacy PolicyTerms of ServiceCookie PolicyGrimoriaHelp & GuideFeedbackFollow @grimoria.app
v2.1.18 (2026101101)

The literal and graphical information presented on this site about Magic: The Gathering, including card images, mana symbols, and card text, is copyright Wizards of the Coast, LLC, a subsidiary of Hasbro, Inc. Grimoria is not produced by, endorsed by, supported by, or affiliated with Wizards of the Coast.

Grimoria may earn commissions from affiliate links to TCGPlayer, CardMarket, CardTrader, and Amazon. These links do not affect the price you pay.