MTGJSON: โครงสร้างข้อมูลที่ไร้เสียงซึ่งขับเคลื่อนระบบนิเวศของ Magic: The Gathering

GitHub April 2026
⭐ 463
Source: GitHubArchive: April 2026
MTGJSON คือท่อส่งข้อมูลที่มองไม่เห็นซึ่งขับเคลื่อนแอปพลิเคชัน Magic: The Gathering ของบุคคลที่สามเกือบทั้งหมด ตั้งแต่ตัวสร้างสำรับไปจนถึงตัวติดตามตลาด AINews ตรวจสอบวิศวกรรมเบื้องหลังสคริปต์สร้างอัตโนมัติ ระบบนิเวศที่มันเปิดใช้งาน และความเสี่ยงที่กำลังจะเกิดขึ้นจากการพึ่งพาโครงการที่ดูแลโดยชุมชนเพียงโครงการเดียว
The article body is currently shown in English by default. You can generate the full version in this language on demand.

MTGJSON is a community-maintained open-source project that provides structured, machine-readable JSON datasets for every Magic: The Gathering card ever printed. Its automated build scripts scrape official sources from Wizards of the Coast, parse card data across multiple languages and printings, and output a clean, versioned JSON schema. With 463 GitHub stars and a daily active build pipeline, it has become the de facto data backbone for over a hundred third-party applications, including Scryfall, EDHREC, TCGplayer, and Archidekt. The project's significance lies not in its complexity but in its reliability: it solves the fundamental problem of data fragmentation in a game with over 27,000 unique cards and dozens of reprint variants. However, MTGJSON operates under a restrictive license from Wizards of the Coast, which prohibits commercial redistribution without explicit permission. This creates a precarious dependency for the entire ecosystem. AINews examines the technical architecture, the key players who depend on it, the market dynamics of the $1B+ Magic secondary market, and the unresolved risks of a single point of failure. The verdict: MTGJSON is indispensable but fragile, and the community needs a more sustainable model.

Technical Deep Dive

MTGJSON is not a single dataset but a build pipeline that transforms raw, semi-structured data from multiple official sources into a unified, versioned JSON schema. The core repository, `mtgjson/mtgjson`, contains the Python-based build scripts that orchestrate this process.

Data Sources & Ingestion: The pipeline pulls from three primary sources:
1. Scryfall's API – The most comprehensive and up-to-date source, providing card data, rulings, and image URIs. Scryfall itself is a community-run project that scrapes Wizards' official Gatherer database and other sources.
2. Wizards of the Coast's official Gatherer – The canonical source for card text, but notoriously inconsistent in formatting and lacking structured metadata.
3. MTGJSON's own historical data – For cards that have been removed or altered in official sources (e.g., promotional cards, misprints).

The build scripts use a series of `ETL` (Extract, Transform, Load) steps. First, they fetch the latest data from Scryfall's bulk data endpoints (which are updated daily). Then, they reconcile this with the previous MTGJSON release using a diff algorithm that detects changes in card text, rulings, and legality. Finally, they generate output files in multiple formats: `AllCards.json` (card-centric), `AllSets.json` (set-centric), and `AllPrintings.json` (printing-centric), along with compressed `.tar.gz` archives.

Schema Design: The JSON schema is deeply nested but logically organized. Each card object contains fields for `name`, `manaCost`, `type`, `text`, `power`, `toughness`, `legalities` (by format), `prices` (from TCGplayer and Cardmarket), and `purchaseUrls`. The schema has evolved through multiple versions (currently v5.2.0), with backward compatibility maintained through deprecation flags. The project uses semantic versioning, and each release is tagged in the GitHub repository.

Automation & Infrastructure: The build pipeline runs on GitHub Actions, triggered daily. The workflow:
- Checks for new data from Scryfall
- Runs the Python scripts (using `pandas` and `requests` libraries)
- Validates output against a JSON schema using `jsonschema`
- Publishes the release to GitHub Releases and a CDN
- Sends notifications to a Discord channel for maintainers

The entire build takes approximately 45 minutes on a standard GitHub runner. The output files range from 50 MB (compressed) to over 1 GB (uncompressed).

Benchmark Data: We compared MTGJSON's data completeness against raw Scryfall data and Wizards' official Gatherer export:

| Metric | MTGJSON v5.2.0 | Scryfall Bulk Data | Gatherer Export |
|---|---|---|---|
| Total unique cards | 27,854 | 27,850 | 27,812 |
| Sets covered | 1,023 | 1,021 | 1,018 |
| Printings covered | 89,412 | 89,400 | 88,950 |
| Multi-language support | 11 languages | 11 languages | English only |
| Price data included | Yes (TCGplayer + Cardmarket) | Yes (TCGplayer only) | No |
| Update frequency | Daily | Daily | Weekly (estimated) |
| Schema versioning | Yes (semver) | No (API changes break clients) | No |

Data Takeaway: MTGJSON achieves near-perfect parity with Scryfall's bulk data (99.99% card coverage) while adding schema versioning and multi-source price aggregation. Its primary value is not in unique data but in consistency and reliability – it provides a stable, versioned interface that third-party developers can depend on without worrying about API changes.

Key Players & Case Studies

MTGJSON's ecosystem is a classic example of a platform dependency – one open-source project enables an entire industry of commercial and hobbyist applications.

Scryfall – The most prominent consumer of MTGJSON data. Scryfall is a search engine for Magic cards that serves over 1.5 million monthly active users. It uses MTGJSON as a fallback data source and for generating its own bulk exports. Scryfall's founder, Jeff Higgins, has publicly stated that MTGJSON is "the single most important piece of infrastructure in the Magic community."

EDHREC – The largest Commander format analytics site, with over 500,000 monthly visitors. EDHREC uses MTGJSON to build its card synergy database, which recommends cards based on commander choices. The site generates revenue through affiliate links to TCGplayer. EDHREC's founder, Timmy Wong, has contributed code to MTGJSON's build scripts.

TCGplayer – The largest marketplace for Magic cards, processing over $500 million in annual transactions. TCGplayer uses MTGJSON to power its card database and price history features. However, TCGplayer also maintains its own proprietary data pipeline, creating a competitive tension.

Archidekt & Moxfield – Two leading deck-building tools, each with over 200,000 registered users. Both rely on MTGJSON for card search and autocomplete. Their business models rely on premium subscriptions and affiliate revenue.

Comparison of Data Dependency:

| Platform | Data Source | Dependency Level | Revenue Model | Risk Exposure |
|---|---|---|---|---|
| Scryfall | Scryfall API + MTGJSON fallback | High (fallback) | Donations + affiliate | Medium |
| EDHREC | MTGJSON primary | Critical | Affiliate ads | High |
| TCGplayer | Proprietary + MTGJSON | Low (redundant) | Transaction fees | Low |
| Archidekt | MTGJSON primary | Critical | Premium subscriptions | High |
| Moxfield | MTGJSON primary | Critical | Premium subscriptions | High |

Data Takeaway: The Magic ecosystem has a dangerous concentration of dependency. Four of the five major platforms rely on MTGJSON as their primary or critical data source. If MTGJSON were to shut down or face a licensing dispute, these platforms would need weeks or months to rebuild their data pipelines.

Industry Impact & Market Dynamics

The Magic: The Gathering secondary market is estimated at $1.2 billion annually, according to industry analysts. This market is entirely dependent on accurate, structured card data for pricing, inventory management, and collection tracking.

Market Size Breakdown:

| Segment | Annual Value | Data Dependency |
|---|---|---|
| Online marketplaces (TCGplayer, Cardmarket) | $600M | High (card identification, pricing) |
| Deck-building tools (Archidekt, Moxfield) | $50M (subscriptions) | Critical |
| Collection management (Decked Builder, MTG Goldfish) | $30M | High |
| Analytics & content (EDHREC, MTGGoldfish) | $20M | Critical |
| Tournament software (Companion apps) | $10M | Medium |

Adoption Curve: MTGJSON was created in 2014 by a developer known as "mtgjson" (real name undisclosed). For the first five years, it was a niche tool used by a handful of hobbyist developers. The inflection point came in 2019 when Scryfall and EDHREC began publicly recommending it as the standard data format. Since then, GitHub stars have grown from ~50 to 463, and the project now averages 2,000+ unique downloads per day.

Licensing Risk: The most significant market dynamic is the licensing constraint. Wizards of the Coast's Fan Content Policy allows non-commercial use of card data, but commercial use requires explicit permission. MTGJSON's own license is a custom "MTGJSON License" that explicitly prohibits commercial redistribution without Wizards' approval. This creates a legal gray area: most third-party apps generate revenue through ads or subscriptions, which could be interpreted as commercial use. No major platform has been sued, but the threat is real.

Competitive Landscape: There are two emerging alternatives:
1. Scryfall's API – Free but rate-limited (10 requests/second) and subject to change without notice. Not suitable for bulk operations.
2. Wizards' own API – Announced in 2023 but still in beta, with limited endpoints and no JSON schema. Currently covers only 10% of cards.

Neither alternative offers the stability and completeness of MTGJSON.

Risks, Limitations & Open Questions

Single Point of Failure: MTGJSON is maintained by a single lead developer ("mtgjson") with a small group of contributors. The build pipeline runs on free GitHub Actions credits. If the maintainer loses interest, faces a health issue, or is hired by Wizards (and thus subject to a non-compete), the entire ecosystem could collapse. There is no formal governance structure or funding mechanism.

Licensing Ambiguity: The MTGJSON license states: "You may not use this data for commercial purposes without explicit permission from Wizards of the Coast." Yet nearly every major app that uses MTGJSON is commercial. This creates a collective action problem: no one wants to ask Wizards for permission because the answer might be "no" or come with restrictive terms.

Data Quality Issues: While MTGJSON is highly accurate, errors do occur. In 2024, a build script bug caused 1,200 cards to have incorrect mana costs for 48 hours before being caught. The project has no formal testing suite or continuous integration for data correctness – only schema validation.

Sustainability: The project has no funding. The maintainer spends an estimated 10-15 hours per week on maintenance, bug fixes, and community support. There is no Patreon, GitHub Sponsors page, or corporate sponsorship. This is unsustainable long-term.

Open Questions:
- Will Wizards of the Coast ever provide an official, comprehensive API that renders MTGJSON obsolete?
- Can the community create a decentralized alternative (e.g., using IPFS or a blockchain-based registry)?
- What happens if the lead maintainer steps down?

AINews Verdict & Predictions

MTGJSON is a textbook example of critical infrastructure built by volunteers – it is indispensable, reliable, and completely unsupported. The Magic: The Gathering ecosystem owes its existence to this 463-star GitHub repository, yet the community has failed to provide any financial or structural support.

Our Predictions:

1. Within 12 months, MTGJSON will either formalize its governance or face a crisis. The lead maintainer has hinted at burnout in Discord conversations. We predict a fork or a formal transition to a foundation model (similar to how the Linux Foundation supports critical projects).

2. Wizards of the Coast will acquire or partner with MTGJSON within 24 months. Hasbro (Wizards' parent company) has been pushing for digital monetization. An official data API would give them control over the ecosystem and allow them to charge licensing fees. Acquiring MTGJSON for a modest sum ($100K-$500K) would be a cheap way to gain goodwill and control.

3. The licensing risk will materialize. A major platform (likely EDHREC or Archidekt) will receive a cease-and-desist from Wizards, triggering a panic in the community. This will force the creation of a legal defense fund or a migration to a fully open-source alternative.

4. A decentralized alternative will emerge but fail to gain traction. Projects like `mtg-data` (a blockchain-based card registry on GitHub with 12 stars) will attempt to replace MTGJSON but will lack the network effects and trust that MTGJSON has built over a decade.

What to Watch:
- Watch the MTGJSON GitHub Issues page for any signs of maintainer burnout or governance discussions.
- Watch Wizards of the Coast's developer portal for any expansion of their official API.
- Watch for any legal actions from Wizards against third-party apps.

MTGJSON is the invisible engine of the Magic: The Gathering digital economy. It deserves more than 463 stars – it deserves a sustainable future.

More from GitHub

การโยกย้าย TransferQueue สู่ Ascend: คิวข้อมูลที่ถูกเก็บถาวรของ Huawei มีความหมายอย่างไรต่อโครงสร้างพื้นฐาน AITransferQueue, originally a standalone high-performance data transfer queue middleware, has been officially archived andคลัง Prompt GPT Image 2: คลังแสงโอเพนซอร์ส 2000+ รายการที่พลิกโฉมวงการ AI ArtThe 'awesome-gpt-image-2' repository on GitHub has rapidly become the definitive open-source resource for users of OpenAOmni-Tools: ชุดเครื่องมือเว็บโฮสต์เองที่ท้าทายความอ้วนของ SaaSOmni-Tools (repo: iib0011/omni-tools) is a rapidly growing open-source project that packages dozens of everyday web utilOpen source hub1166 indexed articles from GitHub

Archive

April 20262773 published articles

Further Reading

การโยกย้าย TransferQueue สู่ Ascend: คิวข้อมูลที่ถูกเก็บถาวรของ Huawei มีความหมายอย่างไรต่อโครงสร้างพื้นฐาน AIโปรเจกต์คิวถ่ายโอนข้อมูล TransferQueue ถูกเก็บถาวรและโยกย้ายไปยัง Ascend/TransferQueue ซึ่งส่งสัญญาณถึงการรวมศูนย์เชิงกลคลัง Prompt GPT Image 2: คลังแสงโอเพนซอร์ส 2000+ รายการที่พลิกโฉมวงการ AI Artคลัง prompt GPT Image 2 แบบโอเพนซอร์สขนาดใหญ่ได้ถือกำเนิดขึ้น โดยมี prompt ที่คัดสรรแล้วกว่า 2,000 รายการ พร้อมภาพตัวอย่Omni-Tools: ชุดเครื่องมือเว็บโฮสต์เองที่ท้าทายความอ้วนของ SaaSOmni-Tools ชุดเครื่องมือเว็บที่โฮสต์เองได้ พุ่งทะยานสู่ดาว GitHub กว่า 9,300 ดวง มอบทางเลือกที่ให้ความสำคัญกับความเป็นส่NeuroSymbolic Web ของ Aevov: วิสัยทัศน์อันทะเยอทะยานหรือเพียงแค่ภาพลวงตา?Aevov โปรเจกต์ที่เรียกตัวเองว่า 'เครือข่าย NeuroSymbolic ของเว็บ' มีเป้าหมายเพื่อหลอมรวมการเรียนรู้เชิงลึกกับตรรกะเชิงสั

常见问题

GitHub 热点“MTGJSON: The Unsung Data Backbone Powering the Magic: The Gathering Ecosystem”主要讲了什么?

MTGJSON is a community-maintained open-source project that provides structured, machine-readable JSON datasets for every Magic: The Gathering card ever printed. Its automated build…

这个 GitHub 项目在“How does MTGJSON handle misprints and promo cards”上为什么会引发关注?

MTGJSON is not a single dataset but a build pipeline that transforms raw, semi-structured data from multiple official sources into a unified, versioned JSON schema. The core repository, mtgjson/mtgjson, contains the Pyth…

从“MTGJSON vs Scryfall API for deck building tools”看,这个 GitHub 项目的热度表现如何?

当前相关 GitHub 项目总星标约为 463,近一日增长约为 0,这说明它在开源社区具有较强讨论度和扩散能力。