Digital Commonwealth

API

APIs (Application Programming Interface) provide programmatic machine-based interaction with metadata and image content from items in the Digital Commonwealth collections, allowing this content to be used in other applications and data services.

Please contact us with any questions or comments.

OAI-PMH

Metadata records for all collections and items are accessible in the Digital Commonwealth OAI-PMH feed.

Base URL:

https://fedora.digitalcommonwealth.org/fedora/oaiprovider/?

JSON

Search results and item detail pages are available as JSON. To retrieve a page as JSON, append .json to the page url, as in the examples below:

Search results:

# normal, return HTML
https://www.digitalcommonwealth.org/search?q=Boston

# return JSON
https://www.digitalcommonwealth.org/search.json?q=Boston

Item detail:

# normal, return HTML
https://www.digitalcommonwealth.org/search/commonwealth:abcd12345

# return JSON
https://www.digitalcommonwealth.org/search/commonwealth:abcd12345.json

IIIF

Digital Commonwealth supports the following International Image Interoperability Framework APIs:

Image 2.0

Base URL:

https://iiif.digitalcommonwealth.org/

To request a IIIF Image response, you will need the image identifier. Images have different identifiers than the parent item. To find the image identifier, right-click on the image in a browser window and view or copy the image URL. The image identifier is part of the URL string, as in:

https://fedora.digitalcommonwealth.org/fedora/objects/IMAGE_ID/datastreams/thumbnail300/content

The image identifier can then be used to construct a URL to create a valid IIIF Image request:

# image information request
https://iiif.digitalcommonwealth.org/IMAGE_ID/info.json

# full image, 50% size, as JPEG
https://iiif.digitalcommonwealth.org/IMAGE_ID/full/pct:50/0/default.jpg

Presentation 2.0

IIIF Presentation manifests in JSON-LD can be returned by appending /manifest to the URL for the item detail page. (A 404 will be returned if no manifest is available.)

# normal, return HTML
https://www.digitalcommonwealth.org/search/commonwealth:abcd12345

# return IIIF manifest
https://www.digitalcommonwealth.org/search/commonwealth:abcd12345/manifest