Developers Area

The crime map intends to be developer friendly by providing an open and flexible Web API (application programming interface). In fact, the crime map utilizes the very same API itself to query and retrieve all of the incident information! The data is published under the terms of the Open Government Licence - Nanaimo.

Web API
Nanaimo's entire crime incident database is accessible in a variety of data formats, through a collection of read-only RESTful Web API endpoints. Furthermore, all of the crime map API endpoints support querying using OData syntax. This allows developers and end users to perform custom queries against the crime incident database to retrieve exactly the information they are interested in. View the crime map Web API Help Page for endpoint descriptions and samples.

Data Formats
All of the API end points can return the following data formats:

  • CSV - Comma-separated values
  • JSON - JavaScript Object Notation

The Incidents end point can return also return the following data formats:

  • Atom - Atom Syndication Format
  • GeoJSON - Geographic JavaScript Object Notation
  • KML - Keyhole Markup Language
  • KMZ - Compressed KML

View the crime map Web API Help Page for information about requesting specific data formats and samples.

Open Data Protocol (OData)
There is an accessible OData endpoint that returns a denormalized view of the crime incidents dataset in Atom and JSON representations. The /crimereporting/odata/oIncidents endpoint can be queried against using OData query syntax.

Cross-Origin Resource Sharing
The crime map API is CORS-enabled (Cross-origin resource sharing), so developers are able to access the City of Nanaimo's crime incident database from their own custom applications and mashups.

Feedback
Feedback is encouraged, please send an email to webmaster@nanaimo.ca and let us know what you think!

Help us improve our website

Don't include private or financial information in this form.