Citoid/API

This document describes how to interact with the citoid service.

Currently there is one endpoint, /url.

So on localhost, "http://localhost:1970/url". This endpoint is reserved for requesting metadata via URL.

The endpoint accepts post data. In your request header you must request set 'Content-Type' as 'application/json' as the endpoint only accepts request for json, and not, for instance, application/html.

In the POST request, two arguments are accepted: 'url' and 'format'.

In prior versions of citoid, only one format was available. This is now available as 'mwDeprecated'. The other two formats are 'zotero' and 'mediawiki'. 'zotero' is the format used by the zotero service used by citoid and is the format that citoid uses internally. 'mediawiki' is the targeted format, and is designed for use by TemplateData found in citation templates. You may find, depending on your use case, for the 'zotero' format to be more rich. 'mwDeprecated' is most similar to and more easily translatable to en-wiki CS1 citation formats but as can be indicated by its name, may not stick around for too much longer.

Sample output
Below are sample outputs of the three export formats. The primary difference is in how creators/authors/editors are handled. In 'zotero', these are all in the 'creator' object, in 'mwDeprecated' these are formatted like in en wiki CS1 fields, and in 'mediawiki' these are in a list of [firstname, lastname] lists. The only other difference of note is that in both 'mediawiki' and 'mwDeprecated', PMID is available as a field.