Moxfield APImoxfield.com ↗
Search Magic: The Gathering cards, retrieve pricing, legalities, and edition data, and fetch public decklists from Moxfield via a structured JSON API.
What is the Moxfield API?
This API exposes 5 endpoints for retrieving Magic: The Gathering card and deck data from Moxfield. Use search_card_images to query cards by name or Scryfall syntax and get paginated image URLs for each card face, or call get_card_details with a Moxfield card ID to pull full metadata including prices across editions, format legalities, artist credits, and set information.
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 cards, get details, browse user decks."""
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.card_images.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.card_images.search(query="Black Lotus", limit=1).first()
if result:
card_id = result.image_link.split("card-")[1].split("-normal")[0]
try:
detail = client.card_details.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})")
except CardNotFound as exc:
print(f"Card not found: {exc.card_id}")
# Browse a user's public decklists.
user = client.user(username="Aspiringspike")
for deck in user.list_decks(limit=3):
print(deck.name, deck.format, deck.mainboard_count, deck.view_count)
# Get startup card images — a quick bootstrap source.
for img in client.discovered_images.list_startup(limit=3):
print(img.link, img.source)
print("exercised: card_images.search / card_details.get / user.list_decks / discovered_images.list_startup")
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
search_card_images accepts a query string supporting Scryfall search syntax — type filters like t:creature, color filters like c:blue, or plain card names — alongside page and page_size (up to 175 per page) parameters. Each result in image_links includes card_name, image_link, dimensions (488×680 px WebP), and face_name for multi-faced cards, which get separate entries per face. The total_cards field lets you compute page counts client-side without an extra request.
Full Card Metadata and Pricing
get_card_details takes a card_id — extractable from image_link URLs returned by search — and returns a card object with fields including id, name, set, type_line, rarity, cmc, legalities, prices, and artist. The editions array lists every printing with its own cardId, abbreviation, releasedAt, and per-edition prices object, making cross-edition price comparison straightforward.
Bulk Image Discovery and Startup Collections
get_startup_card_images returns the full anonymous startup payload — a ready-made set of card image URLs with no query required, useful for seeding a UI before any user input. discover_images combines that startup list with broad type searches (creature, artifact, enchantment) to return over 1,000 unique images in one call. Each image object includes link, source, and dimensions.
Public Deck Browsing
get_user_decks fetches paginated public decklists for any Moxfield username (case-insensitive). Deck objects include name, format, colors, color_identity, like_count, view_count, comment_count, public_url, and timestamps. Results are sorted by last-updated descending. page_size caps at 100 decks per page, and total_pages and total_results are returned for pagination control.
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?+
- Build a card image gallery seeded by
discover_imagesfor a deck-building tool without requiring user input. - Compare card prices across all printings using the
editionsarray fromget_card_details. - Check format legalities (e.g. Standard, Commander) for any card via the
legalitiesfield inget_card_details. - Paginate through a player's public Moxfield decklists using
get_user_decksto analyze format and color preferences. - Search for cards by type or color using Scryfall syntax in
search_card_imagesto populate filtered card lists. - Display per-face images for double-faced or transform cards using the
face_namefield insearch_card_imagesresults. - Aggregate artist credits and set data across editions for a card catalog or collection tracker.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Moxfield have an official public developer API?+
What does `get_card_details` return beyond basic card info?+
get_card_details returns a card object with type_line, rarity, cmc, artist, legalities, and prices, plus an editions array. Each edition entry includes its own cardId, abbreviation, releasedAt, and prices object, so you get pricing history across all known printings in a single response.Can I retrieve the full card list inside a specific deck?+
get_user_decks returns deck metadata — name, format, colors, counts, and a public_url — but does not currently return the individual cards within each deck. You can fork this API on Parse and revise it to add an endpoint that fetches the card list for a given deck ID.How does pagination work across the search endpoint?+
search_card_images returns total_cards in every response alongside the current page. Divide total_cards by your chosen page_size (max 175) to determine how many pages to request. There is no cursor-based pagination; all navigation is integer page numbers.Does the API cover private or unlisted Moxfield decks?+
get_user_decks only returns decks a user has set to public on Moxfield. Private and unlisted decks are not accessible. You can fork this API on Parse if you need to revise the scope or add filtering by format or color.