If you want to use our data, we’ve provided an API to allow you to query it for use in your own applications. There are a number of endpoints: four which allow you to browse features (ie. buildings, parks, and other places in Whitechapel), documents, images, and media or return individual records in these categories; and a second set of four which allow you to chain queries. All endpoints are read-only, and if you visit them using your browser, you'll get a human-friendly html representation of what each one will send back to you.
Returns features as geoJSON
Returns documents as JSON
Returns images as JSON
Returns media items as JSON
To retrieve a single record (for example, for a feature):
Or a document:
The features endpoint accepts the following parameters:
So, to return every feature with contributions from author 2, in categories 14 and 12, tagged ‘baths’ and ‘cholera’, and built between 1800 and 2000:
The documents, images, and media endpoints accept most of the above parameters, though categories are omitted, and year_range is replaced by date_range. This allows you to narrow contributions by date of submission using either a single date value in the format YYYY-MM-DD, or a comma-separated list of two dates, for example, date_range=2016-06-01,2016-07-30.
So, to return every document containing the string 'baths' by author 2 and contributed between 24th June and 24th July:
For all endpoints, results are paginated by 20 records by default. To change the page, append page=<page_no> (ie. page=2) to the query string. To change the number of records returned per page append page_size=<no_records> (ie. page_size=100). For performance reasons, the maximum number of records the API will return is 100.
We’d love feedback on this, and if there’s a feature you’d like to see added, please email Duncan Hay at firstname.lastname@example.org. Most of all, if you make anything using the API, let us know - we want the Survey of London Whitechapel data to be a resource for others for others to use, and we’d love to see what you build.