API
Crimespotting data is available to developers and researchers via a simpe web service.
Reports
Individual crime reports can be downloaded in a variety of formats, suitable for use in spreadsheets, feed readers, and more. All requests are simple HTTP GET, and there is no registration or authentiction requirement.
Example
Last ten reports as tab-separated values suitable for use in a spreadsheet:
http://sanfrancisco.crimespotting.org/crime-data?format=tsv&count=10
Case Number Description Date, Time Weekday Time Crime Type Police Beat Zip Code Address Latitude Longitude Accuracy URL 091120154 Grand theft from person (Arrest, booked) 2009-10-30 20:50:00 Friday 20:50 THEFT 37.756826 -122.406657 Unknown http://sanfrancisco.crimespotting.org/crime/2009-10-30/Theft/35063 091120182 Possession of meth-amphetamine (Arrest, booked) 2009-10-30 20:38:00 Friday 20:38 NARCOTICS 37.779885 -122.413211 Unknown http://sanfrancisco.crimespotting.org/crime/2009-10-30/Narcotics/35070 091119890 Attempted robbery on the street with bodily force (Arrest, booked) 2009-10-30 18:33:00 Friday 18:33 ROBBERY 37.782231 -122.410294 Unknown http://sanfrancisco.crimespotting.org/crime/2009-10-30/Robbery/35069 091119793 Malicious mischief, graffiti (Arrest, cited) 2009-10-30 18:10:00 Friday 18:10 VANDALISM 37.739567 -122.40698 Unknown http://sanfrancisco.crimespotting.org/crime/2009-10-30/Vandalism/35053 091119577 Aggravated assault with bodily force (Arrest, booked) 2009-10-30 17:20:00 Friday 17:20 SIMPLE ASSAULT 37.784419 -122.407583 Unknown http://sanfrancisco.crimespotting.org/crime/2009-10-30/Simple_Assault/35068 091119577 Robbery, bodily force (Arrest, booked) 2009-10-30 17:20:00 Friday 17:20 ROBBERY 37.784419 -122.407583 Unknown http://sanfrancisco.crimespotting.org/crime/2009-10-30/Robbery/35067 091119721 Petty theft shoplifting (Arrest, cited) 2009-10-30 17:05:00 Friday 17:05 THEFT 37.729091 -122.476012 Unknown http://sanfrancisco.crimespotting.org/crime/2009-10-30/Theft/35072 091119276 Sale of base/rock cocaine (Arrest, booked) 2009-10-30 15:41:00 Friday 15:41 NARCOTICS 37.784866 -122.412784 Unknown http://sanfrancisco.crimespotting.org/crime/2009-10-30/Narcotics/35075 091119276 Possession of base/rock cocaine for sale (Arrest, booked) 2009-10-30 15:41:00 Friday 15:41 NARCOTICS 37.784866 -122.412784 Unknown http://sanfrancisco.crimespotting.org/crime/2009-10-30/Narcotics/35074 091119276 Possession of base/rock cocaine (Arrest, booked) 2009-10-30 15:41:00 Friday 15:41 NARCOTICS 37.784866 -122.412784 Unknown http://sanfrancisco.crimespotting.org/crime/2009-10-30/Narcotics/35073
Arguments
- format
-
Data format to return.
Possible values are:- xml
- Raw XML, fast to parse and used by the dynamic map.
- csv
- Comma-separated values, useful in spreadsheet software.
- tsv
- Tab-separated values, useful in spreadsheet or database software.
- json
- GeoJSON, useful with geographic software.
- atom
- Atom symdication format, useful in feed-reader software such as Bloglines, NetNewsWire, FeedDemon, or Google Reader.
- type
-
Crime type(s) as comma-separated list.
Possible values include: aggravated_assault, murder, robbery, simple_assault, arson, burglary, theft, vandalism, vehicle_theft, alcohol, disturbing_the_peace, narcotics, prostitution, e.g.vehicle_theft
orburglary,theft,vandalism
.
Also acceptable are the short versions of each crime type from the key: AA, Mu, Ro, SA, Ar, Bu, Th, Va, VT, Al, DP, Na, Pr, note that these are case-sensitive. - dstart
-
Start date of included reports.
Must be in YYYY-MM-DD form, e.g. April 20th, 2009 is2009-04-20
.
If dtstart is provided, this is ignored.
Defaults to one week in the past. - dend
-
End date of included reports.
Must be in YYYY-MM-DD form, e.g. April 30th, 2009 is2009-04-30
.
If dtend is provided, this is ignored.
Defaults to now. - dtstart
-
Start datetime of included reports.
Must be in YYYY-MM-DDTHH:MM:SSZ (GMT) or YYYY-MM-DDTHH:MM:SS+HHMM form, e.g. April 30th, 2009 8:00am PDT is2009-04-30T08:00:00-0700
.
Overrides dstart if provided.
Defaults to one week in the past. - dtend
-
End datetime of included reports.
Must be in YYYY-MM-DDTHH:MM:SSZ (GMT) or YYYY-MM-DDTHH:MM:SS+HHMM form, e.g. April 30th, 2009 2:00pm PDT is2009-04-30T14:00:00-0700
.
Overrides dend if provided.
Defaults to now. - bbox
-
Geographical bounding box of included reports.
Must be in west,south,east,north form, where values are floating point, e.g. downtown Oakland is-122.2777,37.7993,-122.2682,37.8077
.
GetLatLon.com can help you figure out specific geographical coordinates. - count
-
Number of reports to return.
Defaults to 20 if omitted. - offset
-
Offset in the list of reports to return.
Defaults to 0 if omitted.
