# Scryfall on Onekey > 3 endpoints for Scryfall (3 stable, 0 beta), 1 to 5 credits each. Category: Gaming. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/scryfall Reference (Markdown): https://onekey.dev/docs/api/scryfall.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 3 mapped Scryfall endpoints return each: - `content.createdAt` (ISO 8601 date): 3 - `entity.id` (string): 3 - `entity.name` (string): 3 - `entity.type` (string): 3 - `entity.url` (URL): 3 - `author.displayName` (string): 2 - `content.text` (string): 2 - `listing.price` (number): 2 - `media.thumbnailUrl` (URL): 2 - `media.url` (URL): 2 - `entity.slug` (string): 1 - plus 6 platform-specific fields under `ext.` ## Endpoints ### scryfall.card Fetch a Magic: The Gathering card by (fuzzy) name. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/scryfall/card?name=lightning%20bolt` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Card name - Fields returned: `entity.id`, `entity.name`, `content.text`, `entity.type`, `content.createdAt`, `entity.url`, `media.url`, `media.thumbnailUrl`, `listing.price`, `author.displayName`, `ext.manaCost`, `ext.manaValue`, `ext.rarity`, `ext.set`, `ext.edhrecRank` - Reference: https://onekey.dev/docs/api/scryfall/card.md ### scryfall.search Search Magic: The Gathering cards with Scryfall syntax. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/scryfall/search?q=lightning%20bolt` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Scryfall search query - Fields returned: `entity.id`, `entity.name`, `content.text`, `entity.type`, `content.createdAt`, `entity.url`, `media.url`, `media.thumbnailUrl`, `listing.price`, `author.displayName`, `ext.manaCost`, `ext.manaValue`, `ext.rarity`, `ext.set`, `ext.edhrecRank` - Reference: https://onekey.dev/docs/api/scryfall/search.md ### scryfall.sets All Magic: The Gathering sets. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/scryfall/sets` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.id`, `entity.slug`, `entity.name`, `entity.type`, `content.createdAt`, `entity.url`, `ext.cards` - Reference: https://onekey.dev/docs/api/scryfall/sets.md ## Sample request ```bash curl "https://api.onekey.dev/v1/scryfall/card?name=lightning%20bolt" \ -H "x-api-key: YOUR_API_KEY" ```