The Dementia of Magic JSON metadata interface

If you've got some manner of tool that wants to automatically pick out DoM comics and any associated metadata, you can use this handy-dandy JSON interface which may or may not be shamelessly inspired by Randall Munroe's JSON metadata interface for XKCD!

If you want data from the most recent comic, you can find it at:

https://dementiaofmagic.net/comic.0.json

For a specific comic (by date), you can use the YYYYMMDD format in the /d/ directory, such as:

https://dementiaofmagic.net/d/20200108.0.json

That is, /d/YYYYMMDD.0.json.

Note very carefully, "inspired by" is not the same as "compatible with"! The DoM's structure is rather embarrassingly still based on a literally decades-old format that KeenSpace/ComicGenesis used, while Randall Munroe's is likely cleaner. As such, you will need the nextday and prevday fields to navigate, and remember that imgs is an array of potentially multiple image links.

This interface won't capture footnotes (yet), just image files. The caption field is more or less an artifact of the software I'm using to do this; that might find a use someday. The news field is data that gets pasted into the RSS feed that doesn't show up on the site. This is generally just used for site updates an RSS feed reader wouldn't know about otherwise.

More data may occur in later revisions.

Also, if a date's imgs array is empty, that day probably only had footnotes in it. If there's any of those in there, I'll need to find a better way to handle that, but on your end, you'll probably just have to skip those dates.