# Magic: The Gathering Card Scraper (Scryfall) (`hipersoft/scryfall-scraper`) Actor

Scrape Magic: The Gathering card data from Scryfall: name, set, type, mana cost, rarity, oracle text, colors, power/toughness, USD/EUR prices, format legality and card image. Use Scryfall search syntax. One row per card as JSON, CSV or Excel.

- **URL**: https://apify.com/hipersoft/scryfall-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0002 / card scraped

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 Scraper (Scryfall)

Scrape **Magic: The Gathering card data** with the **MTG Card Scraper**, powered by Scryfall search. Query cards with Scryfall's powerful syntax and export each one's **name, set, type, mana cost, rarity, oracle text, colors, power/toughness, USD/EUR prices, format legality and card image** — one clean row per card as **JSON, CSV or Excel**.

Built for **deck builders, card-price trackers, collection managers, MTG apps and market research**, it turns a search into a structured card dataset with prices.

### What it does

- 🃏 **Full card data** — name, set, collector number, type line, mana cost, CMC, colors, oracle text, power/toughness and keywords.
- 💵 **Prices** — USD, USD foil, EUR and MTGO tix.
- ⚖️ **Legality** — Standard, Modern and Commander legality for each card.
- 🔎 **Powerful search** — use full Scryfall syntax (`t:dragon c:r`, `set:mh3 r:mythic`, `o:draw`).
- 🖼️ **Images** — a card image URL and the Scryfall page link.
- 📄 **Auto-pagination** — pulls every matching card, not just the first page.
- 📤 **Export anywhere** — JSON, CSV or Excel, or straight into a deck tool, sheet or dashboard.

### Example output

```json
{
  "name": "Adult Gold Dragon",
  "setName": "Adventures in the Forgotten Realms",
  "typeLine": "Creature — Dragon",
  "manaCost": "{3}{R}{W}",
  "rarity": "rare",
  "priceUsd": 0.37,
  "power": "4",
  "toughness": "3",
  "legalCommander": "legal"
}
```

### How to use it

1. Add one or more **card searches** using Scryfall syntax.
2. Set **Max cards** and run.
3. Download the results as **JSON, CSV or Excel**.

**Search tips:** `t:` type, `c:` color, `set:` set code, `r:` rarity, `o:` oracle text, `cmc<=3`, `is:commander`. Combine them, e.g. `t:dragon c:r cmc<=5`.

### Input fields

| Field | Description |
|-------|-------------|
| **Card searches** | Scryfall-syntax searches; each paginates through all matches. |
| **Max cards** | Maximum cards to collect (0 = no limit). |

### Output fields

`id`, `name`, `setName`, `set`, `collectorNumber`, `rarity`, `typeLine`, `manaCost`, `cmc`, `colors`, `colorIdentity`, `oracleText`, `power`, `toughness`, `keywords`, `priceUsd`, `priceUsdFoil`, `priceEur`, `priceTix`, `releasedAt`, `artist`, `legalStandard`, `legalModern`, `legalCommander`, `image`, `url`.

### Popular use cases

- **Deck building** — pull all cards matching a strategy or color identity.
- **Price tracking** — export card prices for a set or collection over time.
- **Collection management** — build a spreadsheet of cards with prices and rarity.
- **MTG apps & bots** — power search and card detail with structured data.
- **Market research** — analyse prices, rarity and legality across sets.

### FAQ

**Do I need an account or key?**
No. Enter a search and run.

**What search syntax can I use?**
Full Scryfall search syntax — types, colors, sets, rarity, oracle text, mana value and more can be combined.

**Are prices included?**
Yes — USD, USD foil, EUR and MTGO tix where available.

**Can I export to Excel or Google Sheets?**
Yes — results download as JSON, CSV or Excel and integrate with Sheets, deck tools and dashboards.

***

Scrape **Magic: The Gathering cards with prices** using powerful search — clean, complete and export-ready for deck building, pricing and collection tools.

# Actor input Schema

## `searchQueries` (type: `array`):

Card searches using Scryfall syntax — e.g. 'lightning bolt', 't:dragon c:r' (red dragons), 'set:mh3 r:mythic', 'o:draw c:u'. Each runs its own search and paginates through all matches.

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

Maximum number of cards to collect (0 = no limit).

## Actor input object example

```json
{
  "searchQueries": [
    "t:dragon c:r"
  ],
  "maxItems": 175
}
```

# Actor output Schema

## `results` (type: `string`):

The results as dataset items.

# 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 = {
    "searchQueries": [
        "t:dragon c:r"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/scryfall-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 = { "searchQueries": ["t:dragon c:r"] }

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/scryfall-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 '{
  "searchQueries": [
    "t:dragon c:r"
  ]
}' |
apify call hipersoft/scryfall-scraper --silent --output-dataset

```

## MCP server setup

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