Hampton Roads Crime API
This is an experimental API for accessing crime data compiled for PilotOnline.com and HamptonRoads.com. It should not be considered stable.
The API currently returns data only for Virginia Beach.
For questions, please contact Aaron Bycoffe at aaron.bycoffe@pilotonline.com
Methods
Aggregate (new)
Generate an aggregate report by a given field.
URL:
http://labs.hamptonroads.com/api/crime/aggregate.format
Formats:
json, csv
Parameters:
-
field: Required. The field by which to aggregate data.
HTTP Method:
GET
Neighborhoods
List neighborhoods in the database.
URL:
http://labs.hamptonroads.com/api/crime/neighborhoods.format
Formats:
json, csv
HTTP Method:
GET
Parameters:
-
zipcodes: Optional. A comma-delimited list of ZIP codes to find neighborhoods in.
-
headers: Optional (CSV format only). Set as false to disable column headings.
Crime types
List crime types in the database.
URL:
http://labs.hamptonroads.com/api/crime/crimes.format
Formats:
json, csv
HTTP Method:
GET
Parameters:
-
headers: Optional (CSV format only). Set as false to disable column headings.
ZIP codes
List ZIP codes in the database.
URL:
http://labs.hamptonroads.com/api/crime/zipcodes.format
Formats:
json, csv
HTTP Method:
GET
Parameters:
-
headers: Optional (CSV format only). Set as false to disable column headings.
Streets
List streets in the database.
URL:
http://labs.hamptonroads.com/api/crime/streets.format
Formats:
json, csv
HTTP Method:
GET
Parameters:
-
zipcodes: Optional. A comma-delimited list of ZIP codes to find streets in.
-
headers: Optional (CSV format only). Set as false to disable column headings.
Reports
List crime reports in the database.
URL
http://labs.hamptonroads.com/api/crime/reports.format
Formats:
json, csv
HTTP Method:
GET
Parameters:
-
zipcodes: Optional. A comma-delimited list of zipcodes to find crime reports in.
-
crimes: Optional. A comma-delimited list of crime types to find reports for.
-
neighborhoods: Optional. A comma-delimited list of neighborhoods to find reports in.
-
reported_from: Optional. The start of a date range of when crimes were reported.
-
reported_to: Optional. The end of a date range of when crimes were reported.
-
occurred_from: Optional. The start of a date range of when crimes occurred.
-
occurred_to: Optional. The end of a date range of when crimes occurred.
-
street: Optional. A street to find reports for.
-
block: Optional. A block number for the given street to find reports for. (Street must also be given for block to work.)
-
headers: Optional (CSV format only). Set as false to disable column headings.