# Scryfall Scraper: MTG Cards, Prices & Legalities (`recordsdata/scryfall-mtg-cards-scraper`) Actor

Scrape Scryfall: Magic The Gathering cards via full Scryfall search syntax with USD/EUR/foil prices, format legalities, EDHREC ranks, oracle text and images, plus fuzzy card lookups and the complete set list. Export CSV, Excel, JSON, XML.

- **URL**: https://apify.com/recordsdata/scryfall-mtg-cards-scraper.md
- **Developed by:** [RecordsData](https://apify.com/recordsdata) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

<p align="center">
  <img src="https://api.apify.com/v2/key-value-stores/AAm3a1h3Z9nYfrvh9/records/banner?v=3" alt="RecordsData" width="100%" />
</p>

## 🃏 Scryfall Scraper - MTG Cards, Prices & Legalities - RecordsData

> 🚀 **The Scryfall MTG Scraper is an Apify actor that exports Magic: The Gathering card data with the full power of Scryfall search syntax: any query like "c:red cmc<=2 t:instant" or "f:commander usd>=50" becomes rows with USD/EUR/foil prices, format legalities, EDHREC popularity rank, oracle text, mana cost and card images** (top Commander staple measured live: Mishra's Workshop at $3,699.99). Add fuzzy name lookups and the complete list of 1,053 Magic sets. Export to CSV, Excel, JSON or XML.

Scryfall is the canonical MTG database; this actor turns any search you can type there into a priced, legality-tagged dataset.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Card sellers and LGS owners | Price lists by set, rarity or format |
| Collectors and investors | Reserved List and high-value tracking |
| Deck builders and content creators | Staples by EDHREC rank per color |
| TCG app developers | Card databases with images, key-free |

### 📋 What the Scryfall Scraper does

- **Search**: full Scryfall syntax (colors, cmc, types, sets, rarity, format, price ranges, artist...) with pagination; sorted by EDHREC rank, USD price, release, name, rarity or mana value.
- **Card rows**: name, mana cost, CMC, type line, oracle text, P/T, colors, rarity, set, collector number, release date, USD/foil/EUR/MTGO prices, EDHREC rank, Standard/Modern/Commander/Pioneer legality, artist, Reserved List flag and image.
- **Fuzzy lookups**: one row per card name, typo-tolerant.
- **Sets**: all 1,053 sets with type, date and card count.

> 💡 **Why it matters:** every MTG price list, deck tool and collection tracker starts with this data; this actor delivers it query-shaped.

### 📊 Output of the MTG card export

Real sample from a live run:

```json
{
  "recordType": "card",
  "name": "Ocelot Pride",
  "manaCost": "{W}",
  "typeLine": "Creature - Cat",
  "rarity": "mythic",
  "setCode": "MH3",
  "priceUsd": "42.64",
  "priceUsdFoil": "55.10",
  "edhrecRank": 1102,
  "legalCommander": "legal",
  "legalModern": "legal",
  "imageUrl": "https://cards.scryfall.io/normal/front/...",
  "error": null
}
```

You can download the dataset in various formats such as JSON, CSV, Excel or XML.

### ✨ Why choose this Scryfall scraper

- **Full search syntax passthrough**: anything Scryfall answers, this exports; rivals hardcode a few filters.
- **Four price columns + four legality columns** per card, flat and CSV-ready.
- **EDHREC rank included** for demand-aware pricing and deck curation.
- **Fuzzy lookups + set list** as extra modules.

### 📈 How this Scryfall scraper compares to alternatives

Measured against the Scryfall actors on the Apify Store (September 2026):

| | This actor | The five alternatives |
|---|---|---|
| Full Scryfall query syntax | Yes | Limited inputs |
| Prices (USD/foil/EUR/tix) flat | Yes | Partial |
| Legalities as columns | 4 formats | Rare |
| EDHREC rank + 6 sorts | Yes | No |
| Price per 1,000 cards | $0.70 | $0.50 for bare rows |

### 🚀 How to use the Scryfall Scraper

1. Create a free Apify account (with $5 of credit) at console.apify.com.
2. Open this actor's page and click **Try for free**.
3. Type any Scryfall query (the input shows examples).
4. Optionally add fuzzy card names and toggle the set list.
5. Click **Start** and download CSV, Excel, JSON or XML.

### 💼 Business use cases

#### Store pricing

Nightly USD/foil price sheets per set or format.

#### Investment tracking

Reserved List and usd>=X watchlists with EDHREC demand.

#### Content production

"Top budget staples under $2" tables per color, sourced.

#### App backends

Seeded card databases with images and legalities.

### 🔌 Automating the Scryfall Scraper

Connect to **Make**, **Zapier**, **Slack**, **Airbyte**, **GitHub** or **Google Drive**: nightly price refreshes, spike alerts on tracked queries, or database syncs.

### 🤖 Ask an AI assistant about this scraper

> "I need every Modern Horizons 3 mythic with USD and foil prices plus Commander legality as CSV. Would the Scryfall Scraper on Apify (apify.com/recordsdata/scryfall-mtg-cards-scraper) do this?"

### ❓ Frequently Asked Questions

#### 🃏 What query syntax works?

Scryfall's own, unchanged: c: colors, t: types, set:, r: rarity, f: format, usd>=, cmc<=, a: artist and everything else in their syntax guide.

#### 💵 Where do prices come from?

Scryfall's daily market prices (USD, USD foil, EUR, MTGO tix), the same shown on card pages.

#### 🔤 What if I misspell a card name?

Fuzzy lookup resolves typos ("blak lotus" finds Black Lotus); true misses come back as clear error rows.

#### ⚖️ Is this allowed?

The actor uses Scryfall's public API within its rate guidance. Card data per Scryfall's terms; Magic is a Wizards of the Coast property.

#### 🆓 Can I try it for free?

Yes, free users get a 10-row preview. Paid Apify plans unlock full runs.

Found a bug or missing field? Open the **Issues tab** on this actor's page. Custom solutions available on request.

# Actor input Schema

## `searchQuery` (type: `string`):

Full Scryfall syntax: 'lightning bolt', 'c:red cmc<=2', 'set:mh3 r:mythic', 'f:commander usd>=20'...

## `sortBy` (type: `string`):

Order of search results.

## `cardNames` (type: `array`):

Exact or fuzzy card names for one-row lookups (e.g. black lotus).

## `includeSets` (type: `boolean`):

One row per Magic set with code, type, release date and card count.

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## Actor input object example

```json
{
  "searchQuery": "c:red cmc<=2 t:instant",
  "sortBy": "edhrec",
  "cardNames": [],
  "includeSets": false,
  "maxItems": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

Key fields per row

## `fullData` (type: `string`):

Complete dataset with all fields

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQuery": "c:red cmc<=2 t:instant",
    "cardNames": [],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("recordsdata/scryfall-mtg-cards-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQuery": "c:red cmc<=2 t:instant",
    "cardNames": [],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("recordsdata/scryfall-mtg-cards-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQuery": "c:red cmc<=2 t:instant",
  "cardNames": [],
  "maxItems": 10
}' |
apify call recordsdata/scryfall-mtg-cards-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,recordsdata/scryfall-mtg-cards-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/WT2waXbaiFeHeeAEU/builds/UJP0cUDmcIsGUvQyO/openapi.json
