# Magic The Gathering Card and Price Scraper (`parselab/scryfall-mtg-cards-scraper`) Actor

Search Magic The Gathering cards by name, set, color, type, rarity, format legality or price. Get USD, EUR, foil and MTGO prices, oracle text, legal formats, EDHREC rank, images and store links. Value a card list in one run, or list all sets and card rulings. Export to CSV or Excel.

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

## Pricing

from $14.25 / 1,000 results

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

## Magic The Gathering Card and Price Scraper

This Magic The Gathering scraper searches every card ever printed and returns clean rows with prices, rules text, legality in every format, images and store links. Filter by name, set, color, type, rarity, format or price, or paste a list of card names and get the price of each one. You can also list all sets and read the official rulings of any card.

Each card row includes non-foil, foil and etched prices in US dollars, euro prices and MTGO tickets, the EDHREC popularity rank, the list of formats where the card is legal or banned, the printing details and links to the store pages. For double-faced cards the text and mana cost of both faces are joined in one row.

Players, collectors, store owners, deck builders and price trackers use it to value collections, build budget decks and watch the market.

### What can you do with this Magic The Gathering scraper?

- Value a card list and get the price of every card in one run
- Find every printing of a card with its price, sorted from most to least expensive
- List the cheapest cards that are legal in Modern or Commander
- Search cards by text, for example every instant that draws a card
- Find blue cards under a dollar sorted by EDHREC rank
- Get card images in small, normal, large and full art sizes
- List all sets of a type with release dates and number of cards
- Read the official rulings of a card
- Check which formats ban or allow a card
- Export Magic card data to CSV or Excel

### What data can you extract from Magic The Gathering?

| Mode | One row is | Highlights |
|---|---|---|
| Search cards | One card, artwork or printing | Name, set, number, rarity, mana cost, mana value, type, oracle text, power, toughness, colors, keywords, prices, legal formats, EDHREC rank, images, store links |
| Look up a card list | One card from your list | Same fields as a card search, with a not found row for names that do not match |
| Sets | One set | Code, name, type, release date, card count, icon |
| Rulings | One ruling | Card, source, date, text |

### How to scrape Magic The Gathering cards

1. Choose **What to collect**, for example Search cards.
2. Add filters such as set, colors, card types, rarity, legal formats or a price range.
3. Optionally type an advanced search in the search text box.
4. Set **Max Items** and click **Start**.
5. Export the dataset as CSV, Excel or from the Apify console.

### Input example

```json
{
  "mode": "cards",
  "colors": ["u"],
  "colorMatch": "exact",
  "types": ["instant"],
  "legalIn": ["modern"],
  "maxPriceUsd": 2,
  "order": "edhrec",
  "maxItems": 100
}
```

### Output example

```json
{
  "name": "Opt",
  "set": "tdc",
  "setName": "Tarkir: Dragonstorm Commander",
  "collectorNumber": "158",
  "rarity": "common",
  "releasedAt": "2025-04-11",
  "manaCost": "{U}",
  "manaValue": 1,
  "typeLine": "Instant",
  "oracleText": "Scry 1. (Look at the top card of your library. You may put that card on the bottom.)\nDraw a card.",
  "colors": ["U"],
  "priceUsd": 0.26,
  "priceEur": 0.19,
  "priceTix": 0.63,
  "legalFormats": ["standard", "pioneer", "modern", "legacy", "vintage", "commander", "pauper"],
  "edhrecRank": 217,
  "imageNormal": "https://cards.scryfall.io/normal/front/b/b/bbc99a51-1501-4525-a3cc-f48249b64bed.jpg"
}
```

### How much does it cost to scrape Magic The Gathering cards?

You pay per result: $19 per 1,000 rows plus a tiny start fee. The free plan returns up to 10 rows per run. A list of 100 card names costs about two dollars.

### Tips for better results

- To value a collection, use **Look up a card list** and add the set code after a pipe, for example `Counterspell|mh2`, to price an exact printing.
- A card name alone returns one default printing, which can be a new set without a price yet. Turn on **All printings** to see every printing with its price.
- Prices are in US dollars for non-foil cards. Foil and etched prices are separate fields. Some printings have no price.
- Use the search text for anything the filters do not cover, for example `o:"enters tapped"` or `pow>=5`.
- Sort by EDHREC rank to find the most played cards in Commander.

### Who uses Magic card data?

- **Collectors** track the value of their collection.
- **Store owners** price singles and spot spikes.
- **Deck builders** find budget staples in a format.
- **Developers and content creators** feed apps, spreadsheets and videos.

### Automate and connect

Schedule the Actor daily with the same card list to track price changes over time. Send finished datasets to Google Sheets, Zapier, Make or n8n, or trigger a webhook when a run ends.

### FAQ

**Do I need an account?**
No. The Actor works without any login.

**Where do the prices come from?**
Prices are the market prices published with the card data, and they are refreshed once a day. They are a guide, not a price offer.

**Does it include digital-only cards?**
Yes when they match your search. Use the search text `game:paper` to keep only cards printed on paper.

**Can I get cards in other languages?**
Rows follow the language of the printing that matches your search, which is English by default.

**Does it cover other trading card games?**
No. This Actor covers Magic The Gathering only.

### Legal note

This Actor collects information that is publicly visible on the website. Check the source site's terms and your local rules before using the data. Magic The Gathering and card images belong to Wizards of the Coast. This Actor is not affiliated with Wizards of the Coast.

### Support

Missing a field or found a bug? Open an issue from the Actor page.

# Actor input Schema

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

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

## `mode` (type: `string`):

Cards searches the full card database with filters. Collection looks up a list of card names and returns prices and details for each. Sets lists every set with release dates and card counts. Rulings returns the official rulings of the cards you name.

## `query` (type: `string`):

Optional advanced search in Scryfall syntax, for example o:"draw a card" t:instant or name:dragon. It is combined with the filters below.

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

For collection and rulings modes. One card per line. Add a set code after a pipe to pick a printing, for example Counterspell|mh2.

## `allPrintings` (type: `boolean`):

In collection mode, return every printing of each named card with its price instead of one default printing. Sorted with the highest price first.

## `sets` (type: `array`):

Set codes such as mh3, blb or lea.

## `colors` (type: `array`):

Colors using the letters w, u, b, r, g, or c for colorless.

## `colorMatch` (type: `string`):

Contains includes cards with at least these colors. Exact returns only these colors. At most returns cards that use only some of these colors.

## `types` (type: `array`):

Types or subtypes such as creature, instant, artifact, legendary or dragon.

## `rarities` (type: `array`):

common, uncommon, rare, mythic, special or bonus.

## `legalIn` (type: `array`):

Formats where the card is legal, for example standard, modern, commander, pioneer, pauper or legacy.

## `setTypes` (type: `array`):

Set kinds such as expansion, core, masters, commander, draft\_innovation or promo. Also filters the sets list.

## `minPriceUsd` (type: `number`):

Lowest non-foil price in US dollars.

## `maxPriceUsd` (type: `number`):

Highest non-foil price in US dollars.

## `unique` (type: `string`):

Cards returns one row per card name. Art returns one per artwork. Prints returns every printing.

## `order` (type: `string`):

How to sort the cards.

## `direction` (type: `string`):

Ascending, descending or the natural direction for the chosen sort.

## `includeExtras` (type: `boolean`):

Include tokens, emblems and other extra cards in the search.

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "cards",
  "allPrintings": false,
  "colorMatch": "contains",
  "unique": "cards",
  "order": "name",
  "direction": "auto",
  "includeExtras": false
}
```

# Actor output Schema

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

No description

# 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 = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parselab/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 = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("parselab/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 '{
  "maxItems": 10
}' |
apify call parselab/scryfall-mtg-cards-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parselab/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/wDRc7wfOGzHPchc47/builds/lQrsiHeiGD0b558OS/openapi.json
