Magic: The Gathering API
mtgapi.com
mtgapi.com
The domain was just reused, the site was never actually sold cards.
The current owner has absolutely nothing to do with the original domain name.
It's fairly common to ridicule it's current use in the Bitcoin world by associating the currency exchange with playing cards.
[1]: http://web.archive.org/web/20070817170606/http://mtgox.com/g...
But seriously, associating MtGox with a place to sell playing cards might detract from the serious intentions of the site. Idk.
Source : Close friend and : https://twitter.com/magicaltux
I am pretty sure that Jed was the person who started the business, and he sold it to MagicalTux. This would indicate that it's a coincidence that MT in MagicalTux is like MT in MtGox. Maybe MagicalTux chose his nickname for this reason.
Or I am totally wrong about the origin of the service...
It shares the same designer as Magic (Richard Garfield), but is a Living Card Game rather than a Collectable Card Game. The difference being that in Magic you spend tons of money hoping for the random drop of particular rare cards or buy them individually from dealers. In A:NR, they release a new "data pack" about once a month and then have mini-expansions maybe once a year. It's more like a subscription model, but the net effect is that every card is worth the same as every other card. Still not a cheap hobby, but capped, at least (maybe about $175 to buy every card ever made up to today).
Anyways, someone built a RESTy API for it as well: http://netrunnercards.info/apidoc/en.html
The LCG data-pack model is great for people playing constructed formats, but it does make drafting more of a challenge. Mature LCGs are also quite difficult for latecomers to get into, especially if key packs go out of print.
Netrunner came out 3 years after Magic.
M:TG and Netrunner were both designed by Richard Garfield and Netrunner's design was directly influenced by his experience with M:TG.
Cards in Netrunner aren't tapped because actions in Netrunner are limited by a player's "clicks", not just their available resources.
It was a design decision.
On the other hand, it's just so much better to play. It actually feels like they made a big list of everything that is wrong about MTG and fixed it.
The constant release of new data packs is eventually going to become really tough for new players. I hope they run some kind of restricted tournament format (e.g., only the core + most recent data pack cycle + most recent big box expansion) so that the keen newbie doesn't have so much of a buy-in, but they can grow into the open constructed format later.
I ended up being the local card exchange at university for MTG which was uber-popular. Selling cards made me a fortune simply by enforcing scarcity on some of them and auctioning by email (I wrote an auction system in procmail and perl designed to maximise profit). Made £1320 profit in a year!
Edit: just found my old card database. Had 1540 cards at one point! Still have a box in the cupboard as well according to my wife.
Only thing bothering me is that she has to pick the almost useless Unicorn each time - because it looks nice. ;)
Until I saw Mox Perl, I had no idea that web pages could be dynamically-generated by computer programs. It truly blew my mind and triggered a year-long love affair with Perl.
I have a few thoughts right off the bat.
1.
It would be nice to put a Gatherer link in every response, just for browsing purposes.
2.
Split cards are weirdly reported, as if they are two separate cards. In Gatherer these are reported with an id and a "part" field:
http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=249394&part=Malice
It looks like you're only getting the first part. See that Spite//Malice is missing fromhttp://mtgapi.com/api/v1/fetch/search/malice
But I can search for "spite" and I find:
http://mtgapi.com/api/v1/fetch/id/249394
3.
It looks like you're using the Oracle text for every version (for example, http://mtgapi.com/api/v1/fetch/id/198 and http://mtgapi.com/api/v1/fetch/id/226588 have the same rules text, though they appeared differently when printed). Is there any way to get that information? That could be really cool for mining information about how terminology has changed over time.
http://en.wikipedia.org/wiki/Magic:_The_Gathering_–_Duels_of...
It focuses on premade decks with limited means of customization, rather than open freeform deckbuilding. (Of course they want you to start buying Magic proper to do that.) But it is the only official way to play modern Magic against an adequate AI.
By the way, there is an awesome program called lackeyCCG[1] that I use whenever I feel the need for a quick fix, it's almost like a free version of magic online. Plus you can use it to test your own CCG's if you ever had the urge to make one.
It uses websockets and modern javascript to let anyone create their own TCG/CCG in the browser. Unlike Lacky or similar all the cards and actions are automated so there's no work for the player. It's currently in beta.
This is one of the games that have been built on it:
I had no idea this existed, can't wait to check it out (awww... closed source? Still cool!).
Shameless plug for CardSplice[1] since hacker news is talking about MTG. I had a ton of fun developing this awesome app that lets you quickly feed Magic Cards behind your mobile and uses some advanced image processing and OCR to detect the cards and upload the list into the cloud. Amazing for draft deck building and organizing.
Anyways, thanks for the MTG web service.
The game itself, meta-game and the entire ecosystem around it taught me a lot about value, perceived value, sales, psychology... I don't regret any of the thousands dollars spent on it more than a decade ago.
I don't regret any of my money spent on my MTG cards, but not because it taught me skills to become a stock broker.
https://github.com/ancestral/Verse/tree/master/json
(The Github project itself is many things, and very experimental, but hopes to, one day, achieve the Holy Grail of being able to enforce rules through NLP. Yeah, I’m holding my breath too.)
MTGOX == Magic: The Gathering Online eXchange
(Edit: As someone pointed out already.)
I spent the summer of 2011 scraping Gather to build out a product catalog and API for a start up that didn't start. I really wish that I had taken the time to put the data out as a torrent.
"Magic: The API" doesn't appear to support:
* Multi-faceted cards such as "Fire // Ice"(http://gatherer.wizards.com/Pages/Card/Details.aspx?multiver...)
Both return the data for the "Fire" facet, but with different artists: http://mtgapi.com/api/v1/fetch/id/27165 & http://mtgapi.com/api/v1/fetch/id/27166
* Double sided cards such as "Student of Elements" (http://gatherer.wizards.com/Pages/Card/Details.aspx?multiver...)
Only shows data for "Tobita, Master of Winds": http://mtgapi.com/api/v1/fetch/id/78691
* Double cards such as B.F.M (http://gatherer.wizards.com/Pages/Card/Details.aspx?multiver...)
Only shows 1/2 of the cards: http://mtgapi.com/api/v1/fetch/id/9844
* Multi-sided cards such as "Cloistered Youth // Unholy Fiend" (http://gatherer.wizards.com/Pages/Card/Details.aspx?multiver...)
Only shows the "Unholy Fiend" data: http://mtgapi.com/api/v1/fetch/id/221212
M:TG has 20 years of strangeness to take into account when creating a data model... And Gatherer has its own issues. For example, the way symbols are represented in card text is inconsistent. (e.g. The tap symbol can be represented as both "ocT" and "{T}", and the representations for mana symbols have evolved inconsistently as well.)
Wizards of the Coast are the only ones who can build this API legally. They hold the copyright on all of the data related to M:TG and I truly wish that they would open up it up so that we, as a people, wouldn't have to spend hundreds of hours recreating the wheel. Poorly. [0]
Fortunately, I stopped what I was doing and started on a board gaming "thingy" with friends instead: http://www.shutupandsitdown.com/
[0]: That isn't to say that the mtgapi.com guys/gals did a shoddy job. It's just a big task that WotC should be forward looking enough to do themselves.
While I have WotC on the line... Why wasn't the D&D 5th Edition SRD hosted on GitHub during development?
http://gatherer.wizards.com/Pages/Card/Details.aspx?multiver...
Even without counting the two Collector's Edition print runs of the original core set, it's also missing the Anthologies printing, the FNM promo printing and the judge promo printing along with the version that appeared in the Coldsnap theme deck "Kjeldoran Cunning" (which kept the Ice Age art and expansion symbol but put it in the modern card frame).
Meanwhile, this has all of those printings listed:
So many good times!
The dev team learned their lesson from the earlier days[1] and do strict evaluations of cards and interactions before releasing them. The most popular format, "Standard", is played with the last 2 "blocks" (3 sets of card "sets"), and 1 "Core Set". So basically the last 1.5—2 years worth of cards. Those interactions are studied carefully before being released. Very infrequently do you run into something truly overpowered and needing to be banned from the competitive scene.
Not to mention, in the most basic sense, cards like Counterspell[2] will probably never be printed in a Standard playable set, but cards like Cancel[3] will. One being too cheap to cast and being almost game breaking, while the other has its power balanced just right for the cost.
[1]: http://www.wizards.com/magic/magazine/article.aspx?x=mtg/dai...
If you haven't played in a while, you should check it out again. There's a game[1] now for Steam/Xbox/PS3/Android/iOS to get you back into the swing of things and show you many of the current cards.
[1]: https://www.wizards.com/magic/digital/duelsoftheplaneswalker...
What is the business opportunity of an open M:TG API? I'm not sure I see the real potential there.
From what I can tell, there's only one or two guys at WotC that come close to understanding the data. With the rest of the organization in mind, I highly doubt WotC will open up their data - the business guys wouldn't understand it. It's a closed-source kind of company.
Hell yeah. I'm tempted to contact some of the creators of some of my favorite RPG systems (Jason Bulmahn, Jonathan Tweet, Monte Cook), and beg them to agree to make a completely free RPG. Or at least design the core mechanics. I'm thinking maybe some Creative Commons license, which would allow commercial use. Get them to make a bid, as to how much it would cost to have their work-for-hire for however long they estimate it would take to make the Core Rules of this game...
...and then have a Kickstarter, to raise the funds to do it.
And make implementations of the Core Rules in several programming languages, probably JavaScript first (good for the Browser, or for Node.JS), with Reach Goals for other languages...
Let me tell my personal story: I was a DM for D&D 3rd Edition, and I chose to run through Return to the Temple of Elemental Evil. I had a hard time running it, though, so I made an electronic version of the campaign book. I scanned every single page, I made a wiki on my laptop, one for each NPC. I made a wiki page, with the scanned content for every single monster that showed up. I made wiki pages for every spell (with the scanned content of every spell, right there.) I didn't have to settle for the OGL content, I had the ACTUAL CONTENT FROM THE BOOKS, so my rule-lawyering players couldn't complain that the DM's rules were slightly different from their rules. I made hot-clickable maps, to take me to rooms. I made spreadsheets with every NPC, and their Initiatives, and Hit Points, and any effects on them...
...and now that I've made this thing, for personal use, it would be ILLEGAL for me to share this with anyone.
That sucks.
I've also played around with making computer role playing games, based off of some fantasy role playing game, but most of the "FREE" ones out there, are not available for commercial use, or I'd have to pay a licensing fee.
That sucks.
Ah well, I'm done rambling for now...
One more quick point: I don't begrudge people for making copyrighted, commercial art like games and campaigns. But I think the time for the "Linux" of Fantasy Role Playing Games has come.
I have previously written a crawler for http://gatherer.wizards.com/Pages/Default.aspx in Perl that was fairly effective, but never actually finished with the project. That may be a potential source for the data, though.
Just be careful because Wizards of the Coast might disagree with you about what is and isn't public information. Especially when you are showing the rating and number of votes and rating straight from Gatherer.
They won't be 100% correct, but they'll probably work okay. https://github.com/RealTimeWeb/MagicTheGatheringService
Gatherer offers all of these abilities but not in an easy to use API. Even if you query gatherer programmatically you're still stuck scraping the page to get the data.
The big one with rarity is Serra Angel and Hypnotic Spectre as both of those have switched between uncommon and rare, as well as the original Planeswalkers were just rare in Lorwyn, not mythic as that rarity did not exist at that time.
Another suggestion is to remove the empty fields. It doesn't really matter too much normally, but it could be a slight boost in performance for mobile apps taking advantage of this API as they would essentially be pulling down less data, especially if it is a multi-card search. (100 bytes isn't too much for 1 card, but 100 cards suddenly makes that 9.7kb of extra data that isn't necessary.)
Looks really great though, very responsive.
https://github.com/zephyrfalcon/magicripper2 (to scrape cards from Gatherer)
https://github.com/zephyrfalcon/magicquery (to query the card database)
I also made a set of files (not on Github (yet)) that indicate a card's keywords and other properties (e.g. flying, protection, split card, etc etc). I found it very hard (read: ~impossible) to extract this kind of info reliably from the card text.
Similarly, are you allowed to create an endpoint for "products for sale at Whole Foods" assuming you collect the data legally?
As long as you aren't directly republishing without modification a collection of facts, you aren't violating c.r.
You could still be liable, depending whether your efforts create a negative business affect (torturious interference).
IANAL.
Pretty sure that the text/flavour will be under copyright. The names might well be too.
I told him that it could be a great project and I would be happy to supervise it, but the first thing he needed to do was to ensure there would be no legal problems. So I told him to write to the WotC legal department. He wrote a nice email saying if it would be OK to do this, taking into account that it was not for profit, he would recognize all copyrights, not use illustrations (just raw data about the cards), etc.
They (politely, but clearly) said no.
Oh well. I appreciate the whole api but what I would really enjoy is the source to where the database is acquired from. I presume it is gatherer but could be wrong because there is at least another site that could be scraped. That or they are scraping a storefront which would be interesting and efficient.
And does it handle double sided cards? That's the thing that buggered my scrapping to the point of annoyance. Damn Innistrad and it's double sided creatures!
[edited for typo]
I can transfer it to your official Mashape account. You can continue documenting it there (on top of managing users, getting analytics, etc). Let me know! - chris@mashape.com
www.mtgprice.com looks like a really good price API, but I haven't tried it out yet.
I'm sure I'll tinker with this idea eventually, but if anyone would like to collaborate give me a buzz. I'll spin up a repo and get the ball rolling.
[
{
"id": "202424",
"name": "Tundra",
...
}
]
id# is in the 200000s ? Are these allocated sequentially and contiguously ? If so, M:tG _really_ got away from me since I stopped paying attention to it.Edit: and they are not allocated sequentially. These two cards have only ever appeared in the 2014 core set, and have sequential collector numbers in the set but not sequential IDs:
http://gatherer.wizards.com/Pages/Card/Details.aspx?multiver...
http://gatherer.wizards.com/Pages/Card/Details.aspx?multiver...
http://wiki.mtgsalvation.com/article/Magic:_The_Gathering_st...
Eg all GG creatures with power greater than 3
Nonetheless sweet job!
http://magiccards.info/search.html
(magiccards.info does most of this already, albeit not with a JSON API)
https://github.com/davidchambers/tutor and npm install tutor
Nintendo is very happy to give out C&Ds though, which might explain why such a thing doesn't already exist.
Edit: Wait, you are Veekun! Or at least I think you are, "eevee"'s GitHub profile links to Veekun's website.