ParseForge Scrapers

Scryfall Random Card Scraper

parseforge/scryfall-random-card-scraper

GAMES

Scrape random Magic: The Gathering cards from Scryfall's random card page. Returns card name, image URL, and full structured data. No API key required.

Run this scraper See the API call
Total users
2
Monthly active
1
Total runs
27
Bookmarked
0
Rating
Not rated yet
Last modified
5 days ago

Overview

ParseForge

Scryfall Random Card Scraper

Scryfall Random Card scraper fetches random Magic: The Gathering cards from the official API. Each card comes with its name, mana cost, type line, oracle text, power, toughness, prices, legalities, and set details. No API key required. Export to CSV, JSON, Excel, or XML.

Scryfall's search API is built for targeted queries, but sometimes you need a stream of random Magic cards for analysis, simulation, or dataset building. This actor calls the random card endpoint directly, returning each card in a consistent, flat schema. It handles rate limits and pagination so you get exactly the number of random cards you request.

Who uses it What they scrape Scryfall for
Game designers Generating random card pools for playtesting or drafting simulations.
Data analysts Building unbiased MTG card datasets for statistical modeling.
MTG content creators Pulling random cards for articles, videos, or social media challenges.
Collectors and traders Sampling random cards to estimate set value distributions.

What it does

This Actor collects random Magic: The Gathering cards from the Scryfall API and returns each one as a flat row with all public fields.

  • 🎲 Every call hits the /cards/random endpoint for a uniformly distributed card.
  • πŸ“Š Returns the name, mana cost, type line, oracle text, power, toughness, and more.
  • πŸ’° Returns USD, EUR, and TIX prices from TCGplayer, Cardmarket, and MTGO.
  • βš–οΈ Returns legalities for commander, modern, standard, pauper, and every other format.
  • πŸ–ΌοΈ Returns the artist, illustration ID, set name, rarity, and image URIs.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with Scryfall data

🎲 Build a random card dataset.

A data scientist runs the actor for 100,000 random cards to analyze color distribution and mana curve trends across Magic's history.

πŸƒ Power a draft simulator.

A game developer fetches random cards to populate a cube draft environment, filtering later by rarity and set.

πŸ“ˆ Sample card prices.

A collector pulls 10,000 random cards to calculate average TCGplayer market prices by rarity and set.

🎨 Curate art references.

An artist scrapes random cards to build a mood board of Magic illustration styles, sorted by artist and frame.

Why choose this scraper

What you get
No API key Calls the public Scryfall API with no registration or authentication.
Uniform sampling Every card in the Scryfall database has an equal chance of being returned.
Fixed schema All fields are flattened into predictable columns for easy analysis.
Bulk friendly Fetch up to a million random cards in a single run.

How it compares

This actor does random card sampling. The other Scryfall scraper does targeted searches by set or query.

Feature ParseForge Scryfall MTG Card Scraper
Random card sampling Yes, calls /cards/random endpoint Not listed
Search by set or format Not listed Yes
Full pricing data (USD/EUR/TIX) Yes Yes
No API key required Yes Yes
Bulk runs up to 1,000,000 items Yes Not listed

What a Scryfall record looks like

Every record returns as one flat JSON row. Here is a real one from a run:

{
 "imageUrl": "https://cards.scryfall.io/normal/front/b/7/b70e7b3a-3fe2-4f3c-8292-b44e4a0fc5a4.jpg?1783909407",
 "id": "b70e7b3a-3fe2-4f3c-8292-b44e4a0fc5a4",
 "oracleId": "8fb7ad08-9bb2-49f1-8ed0-8cc8abca4fe0",
 "name": "Peer Past the Veil",
 "lang": "en",
 "releasedAt": "2024-09-27",
 "uri": "https://api.scryfall.com/cards/b70e7b3a-3fe2-4f3c-8292-b44e4a0fc5a4",
 "scryfallUri": "https://scryfall.com/card/dsk/325/peer-past-the-veil?utm_source=api",
 "layout": "normal",
 "highresImage": true,
 "imageStatus": "highres_scan",
 "manaCost": "{2}{R}{G}",
 "cmc": 4,
 "typeLine": "Instant",
 "oracleText": "Discard your hand. Then draw X cards, where X is the number of card types among cards in your graveyard."
}

Every value above comes from a real run. A field a record does not have comes back as null.

Configure the run

Drive the Actor by setting the number of random cards to fetch, and each card is returned with its full Scryfall record. The Input tab lists every parameter.

A first run with the defaults:

{
 "maxItems": 10
}

A larger pull:

{
 "maxItems": 200
}

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account.
  2. Open the Scryfall Random Card Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to Scryfall through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/scryfall-random-card-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting fewer results than my maxItems setting?

Check the run log for rate-limit warnings. Scryfall may throttle requests if you fetch too quickly. The actor will slow down automatically, but very large runs may take longer.

Some cards are missing oracle text or power/toughness.

This is expected. Non-creature cards, lands, and some special card types do not have power, toughness, or oracle text fields. The actor returns null for those fields.

I see duplicate cards in my dataset.

The random endpoint can return the same card more than once across many calls. If you need unique cards, deduplicate on the 'id' field after the run completes.

The actor stopped before reaching my maxItems.

This is usually a temporary API issue. The actor will retry failed requests, but if Scryfall is down for an extended period, try again later.

FAQ

Question Answer
Does this scraper need a Scryfall API key? No. The actor uses the public /cards/random endpoint, which does not require authentication or an API key.
How random is the card selection? It calls Scryfall's own random card endpoint, which returns a uniformly distributed card from their entire database. We do not add any client-side bias.
Can I limit the random cards to a specific set or format? The random endpoint does not support filters. If you need cards from a specific set or format, use a search-based Scryfall scraper instead.
What pricing fields are included? Prices in USD, EUR, and TIX are included from TCGplayer, Cardmarket, and MTGO, along with foil and non-foil variants.
Does it return double-faced or split cards correctly? Yes. The actor returns the full JSON for each card, including layout, card faces, and all related image URIs.
How many random cards can I fetch in one run? Free users can fetch up to 10 cards as a preview. Paid users can set any number up to 1,000,000.
What output formats are supported? You can export your dataset to CSV, JSON, Excel, or XML from the Apify platform.
Does it respect Scryfall's rate limits? Yes. The actor includes polite delays between requests to stay within Scryfall's published rate limits.

Related actors

Browse the full ParseForge collection for more scrapers.

πŸ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Scryfall, LLC. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

πŸ’° How much does it cost to scrape Scryfall Random Card?

This Actor uses pay-per-result pricing: $0.004 per result collected. You are billed only for the results you receive, so a run that returns nothing costs nothing.

Input

FieldTypeWhat it doesDefault
maxItems integer Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000 10

Pricing

from $3.62 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.00362 to $0.004

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST Β· run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~scryfall-random-card-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run Scryfall Random Card Scraper on Apify All scrapers