Moxfield APImoxfield.com ↗
Search Magic: The Gathering cards on Moxfield. Get card images, pricing, legalities, edition metadata, and multi-face card support via 4 endpoints.
What is the Moxfield API?
The Moxfield API gives developers access to Magic: The Gathering card data across 4 endpoints, covering card images, pricing, legality information, and edition metadata. The search_card_images endpoint accepts Scryfall syntax queries and returns paginated results with per-face image URLs and dimensions. The get_card_details endpoint returns the full card object including prices, set data, and legality per format.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/55189296-4a3a-4cd2-a006-802b22cd2b73/get_startup_card_images' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace moxfield-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Moxfield Card Data API — search MTG cards, get details, discover images."""
from parse_apis.moxfield_card_data_api import Moxfield, CardNotFound
client = Moxfield()
# Search for cards by name — limit caps total items fetched across pages.
for card in client.cardimages.search(query="Lightning Bolt", limit=3):
print(card.card_name, card.image_link, card.dimensions)
# Drill into one search result to get full card details.
result = client.cardimages.search(query="Black Lotus", limit=1).first()
if result:
# Extract card_id from the image_link URL (segment between 'card-' and '-normal')
card_id = result.image_link.split("card-")[1].split("-normal")[0]
detail = client.carddetails.get(card_id=card_id)
print(detail.card.name, detail.card.type_line, detail.card.rarity)
for edition in detail.editions[:3]:
print(f" Edition: {edition.name} ({edition.abbreviation})")
# Handle a not-found card gracefully with the typed error.
try:
client.carddetails.get(card_id="INVALID_ID_000")
except CardNotFound as exc:
print(f"Card not found: {exc.card_id}")
# Get startup card images — a quick bootstrap source.
for img in client.discoveredimages.list_startup(limit=3):
print(img.link, img.source, img.dimensions)
# Discover a bulk collection of card images from multiple sources.
for img in client.discoveredimages.discover(limit=5):
print(img.link, img.source, img.dimensions)
print("exercised: cardimages.search / carddetails.get / discoveredimages.list_startup / discoveredimages.discover")
Retrieves card image URLs from the Moxfield startup card list. Returns all standard-resolution (488x680 webp) card images available in the anonymous startup payload. No parameters required; useful for bootstrapping a card image collection without a search query.
No input parameters required.
{
"type": "object",
"fields": {
"count": "integer total number of images discovered",
"images": "array of objects with link (URL string), source (discovery method string), and dimensions (string)"
},
"sample": {
"data": {
"count": 558,
"images": [
{
"link": "https://assets.moxfield.net/cards/card-E02VW-normal.webp",
"source": "startup",
"dimensions": "488x680"
}
]
},
"status": "success"
}
}About the Moxfield API
Card Search and Image Retrieval
The search_card_images endpoint accepts a query string using standard Scryfall syntax — operators like t:creature, c:blue, or set: codes work as expected. Results are paginated via page and page_size parameters (maximum 175 results per page). Each item in the image_links array includes a card_name, image_link URL (488×680 WebP), dimensions, and an optional face_name for double-faced or split cards. The response also returns total_cards so you can calculate total pages without an extra request.
Card Detail Data
get_card_details takes a card_id — an alphanumeric string sourced from search_card_images or discover_images results — and returns a full card object. The card field includes name, set, legalities across formats, price data, and edition variants. The endpoint also returns image_links (one URL per card face) and the dimensions string for the images. This is the primary endpoint for building card detail views or populating deck-builder card panels.
Discovery Endpoints
get_startup_card_images returns image URLs from Moxfield's curated startup card list — no parameters needed, useful for seeding a card pool or testing. discover_images goes broader, combining the startup list with type-based sweeps across creatures, artifacts, and enchantments. Its response includes a source field on each image object indicating which discovery method produced it, and total_discovered gives the deduplicated count across all sources.
Multi-Face Card Handling
Double-faced and split cards appear in search_card_images results as multiple entries within the same image_links array, distinguished by the face_name field. This applies consistently across search and detail endpoints, so transform and modal double-faced cards are handled the same way.
The Moxfield API is a managed, monitored endpoint for moxfield.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when moxfield.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official moxfield.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Populate a deck-builder UI with card images and format legality using
get_card_details - Build a card search interface backed by Scryfall syntax queries via
search_card_images - Seed a card database with a broad image collection using
discover_images - Display per-format price data alongside card art for a collection tracker
- Handle double-faced card display by consuming the
face_namefield from search results - Paginate through large card type queries using
pageandpage_sizeto build a card gallery - Cross-reference edition variants returned in
get_card_detailsfor a set-completion tracker
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Moxfield have an official public developer API?+
How does `search_card_images` handle double-faced or transform cards?+
image_links array. The face_name field identifies which face the image corresponds to — for example, distinguishing the front and back faces of a transform card. Single-faced cards omit the face_name field.What price data is available through `get_card_details`?+
card object returned by get_card_details includes price data as part of its metadata. However, the specific pricing vendors, currencies, or foil/non-foil breakdowns surfaced depend on what Moxfield exposes per card. Historical price data and real-time price chart series are not covered by these endpoints. You can fork this API on Parse and revise it to add a dedicated pricing endpoint if your use case requires more granular price fields.Can I retrieve a user's saved decks or collection from Moxfield through this API?+
What is the maximum number of results per page in `search_card_images`?+
page_size parameter accepts a maximum value of 175. For queries matching more cards than that, use the page parameter alongside total_cards in the response to iterate through additional pages.