canonical: https://jentic.com/apis/scryfall.com/scryfall

# Scryfall API

The Scryfall API serves Magic: The Gathering card data: full-text card search using the same syntax as the Scryfall site, exact and fuzzy name lookup, and card retrieval by Scryfall id, set code and collector number, Multiverse id, MTGO id, or Arena id. It returns every set, official rulings for a card, the mana and card symbol list with a mana-cost parser, and catalogs of card names, creature types, land types, powers, toughnesses, and more. A bulk-data endpoint lists downloadable full-database exports for offline use.

## For AI agents

Search and look up Magic: The Gathering cards, sets, rulings, symbols, and catalogs for AI agents, by name, full-text query, set and collector number, or platform id.

## Scope

Does not sell cards, manage user collections, or run games. Use for reading Magic: The Gathering card, set, and ruling data only.

## Capabilities

- Search Magic: The Gathering cards with Scryfall full-text syntax and sort by fields such as name, released, rarity, cmc, or edhrec
- Look up a card by exact or fuzzy name, optionally pinned to a set
- Fetch a card by set code and collector number, or by Multiverse, MTGO, or Arena id
- Read official rulings for a card by Scryfall id, Multiverse id, MTGO id, or set and number
- List every set or fetch one by set code, Scryfall id, or tcgplayer id
- Parse a mana cost string and list all card symbols
- Pull catalogs such as creature types, land types, powers, and the full card-name list for autocomplete or validation

## Use cases

### AI deck-building assistant

An AI agent helping a player build a deck needs accurate card text and legality instead of recalled guesses. Through Jentic the agent searches by intent, gets the matching Scryfall operation such as card search or named lookup with its input schema, and calls it directly. Card objects carry fields such as legalities and color_identity, so the agent can check a card against a format before suggesting it.

Example prompt: Call GET `/cards/search` with q 'c:green t:creature cmc<=2' and order 'edhrec', then return the top ten cards with their names and legalities

### Rules lookup in a game chat bot

A Discord bot answers rules questions about specific cards. It resolves a typed card name with the fuzzy parameter on the named endpoint, then fetches that card's rulings by Scryfall id, returning official clarifications rather than forum opinions.

Example prompt: Call GET `/cards/named` with fuzzy 'jace mind sculptr', take the returned id, then call GET `/cards/{id}/rulings` and summarise the rulings

### Collection and inventory apps

A collection tracker scans cards by set and collector number and needs canonical card records. Scryfall returns a card for a set code and collector number, maps platform ids from MTGO and Arena to the same card, and lists every set so the app can group a collection by release.

Example prompt: Call GET `/cards/{code}/{number}` with code 'dmu' and number '107', then call GET `/sets/{code}` with code 'dmu' to attach the set name and release date

### Offline card database sync

Apps that need every card locally should not page through search results. The bulk-data endpoint lists Scryfall's downloadable exports with their type, updated_at time, and compressed_size, so a nightly job can fetch a fresh file only when it has changed.

Example prompt: Call GET /bulk-data, find the export whose updated_at is newer than the last sync, and record its permalink_uri for download

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/cards/search` | Full-text card search |
| GET | `/cards/named` | Look up a card by exact or fuzzy name |
| GET | `/cards/{id}` | Get a card by Scryfall id |
| GET | `/cards/{code}/{number}` | Get a card by set code and collector number |
| GET | `/cards/{id}/rulings` | Get rulings for a card |
| GET | `/sets` | List all sets |
| GET | `/symbology/parse-mana` | Parse a mana cost |
| GET | `/bulk-data` | List bulk data exports |

## Key resources

- **Cards** — Full-text search, exact and fuzzy named lookup, autocomplete, random card, and retrieval by Scryfall id, set and collector number, or platform ids
- **Rulings** — Official rulings for a card by Scryfall id, Multiverse id, MTGO id, or set and number
- **Sets** — All sets, or one set by code, Scryfall id, or tcgplayer id
- **Symbology** — All card symbols and a parser for mana cost strings
- **Catalogs** — Card names, word bank, creature, planeswalker, land, artifact, enchantment, and spell types, powers, toughnesses, loyalties, and watermarks
- **Bulk data** — List of downloadable full-database exports

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 50 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 74 / 100
  - Developer Experience & Jentic Compatibility: 66 / 100
  - AI-Readiness & Agent Experience: 39 / 100
  - Agent Usability: 94 / 100
  - Security: 100 / 100
  - AI Discoverability: 18 / 100
- **View full report:** https://jentic.com/apis/scryfall.com/scryfall/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Scryfall by hand means learning its search syntax, choosing between search, named, and id-based lookups, and paging list objects yourself. Through Jentic you install once, import Scryfall from the API Directory, and your agent calls it.
- **Permission scoping:** Scryfall puts the card id in the URL path (`/cards/{id}/...`), so a rule can pin your agent to one card's record and rulings. You choose the operations it may call, so heavier ones like bulk-data listing or full catalogs are not included unless you add them.
- **Credential handling:** The Scryfall API needs no credential per its spec, so nothing is stored. Your own Jentic One instance still runs and logs each call.
- **Discovery method:** Agents search Jentic by intent such as 'find Magic cards by query' or 'get rulings for a card', and Jentic returns the matching Scryfall operation with its input schema so the agent uses the right lookup.

## Related APIs

- **Magic: The Gathering API** — Community Magic: The Gathering card and set database
- **Pokemon TCG** — Card and set data for the Pokemon Trading Card Game
- **TCGdex API** — Multi-language trading card game database

## FAQ

### What authentication does the Scryfall API use?

The Scryfall OpenAPI spec declares no security scheme, so its card, set, and ruling endpoints are called without a key. Through Jentic there is nothing to store; your own Jentic One instance runs each call and logs it.

### Can I search cards with Scryfall query syntax through the API?

Yes. GET `/cards/search` takes the same full-text syntax as the Scryfall site in the q parameter, plus unique to collapse by cards, art, or prints, order and dir for sorting, include_extras, and page for paging.

### What are the rate limits for the Scryfall API?

The OpenAPI spec does not specify rate limits. Scryfall publishes request-pacing guidance in its API documentation at https://scryfall.com/docs/api, and bulk-data exports are the intended route for whole-database jobs.

### Is there a Scryfall MCP server?

You don't need an MCP server to give your agent Scryfall. Jentic connects it directly from the API Directory: import it and your agent calls the card, set, and ruling operations on demand without extra tool definitions in its context.

### How do I look up a card by name through Jentic?

Search Jentic for 'look up a Magic card by name', load the GET `/cards/named` operation, and execute it with exact for a precise name or fuzzy for a partial or misspelled one, plus set to pin a printing. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Can I limit what my agent is allowed to do with the Scryfall API?

Yes. For example, allow only GET `/cards/named` and GET `/cards/{id}/rulings`, and a rules bot can resolve cards and read rulings without touching bulk-data exports or catalogs. Every call it makes is logged.
