As of September 23, 2017, crime data will no longer be updated as the original data source has disappeared. I've contacted the OPD in the hopes it's just an oversight, but until then, this API is dead. See this post for more details.
CrimeWatch_ contains the Oakland government's repository of public crime data. Unfortunately, they only keep a rolling 90 day window of crime reports. This makes it very difficult to do any long term crime analysis. And the data they do provide is unfortunately in CSV format.
It's because of these limitations that I built an ongoing database of Oakland crime, and a JSON API to view them.
The API is located here: http://oaklandcrime.unionandgrant.com/api/
limit: How many reports should be returned (default: 25)
type: Crime type. Can be any of the following (Case sensitive):
- BURG - AUTO
- STOLEN VEHICLE
- MISDEMEANOR ASSAULT
- PETTY THEFT
- DOMESTIC VIOLENCE
- GRAND THEFT
- BURG - RESIDENTIAL
- BURG - COMMERCIAL
- RECOVERED O/S STOLEN
- DISORDERLY CONDUCT
- FELONY ASSAULT
- TOWED VEHICLE
- BURG - OTHER
- STOLEN AND RECOVERED VEHICLE
- FORGERY & COUNTERFEITING
- RECOVERED VEHICLE - OAKLAND STOLEN
- MISCELLANEOUS TRAFFIC CRIME
- CHILD ABUSE
- POSSESSION - STOLEN PROPERTY
- INCIDENT TYPE
- MISDEMEANOR WARRANT
- OAKLAND MUNI CODE
beat: Police beat. Find your beat at OaklandBeats. E.g. http://oaklandcrime.unionandgrant.com/api/?beat=07X
startdate: Date crime reports should start at. Must be in YYYY-MM-DD format
enddate: Date crime reports should end at. Must be in YYYY-MM-DD format
Arguments may be stacked to return multiple conditions.
Vandalism since February 1st, 2015 http://oaklandcrime.unionandgrant.com/api/?type=VANDALISM&startdate=2015-02-01
Homicides in beat 07X http://oaklandcrime.unionandgrant.com/api/?type=HOMICIDE&beat=07X
500 stolen vehicle reports between January 1st, 2015 and January 31st, 2015 http://oaklandcrime.unionandgrant.com/api/?startdate=2015-01-01&enddate=2015-01-31&limit=500&type=STOLEN%20VEHICLE
Data is returned in a JSON format with the following keys:
address: Where did the crime occur? This can be anonymized for certain crimes (see "A Note on Privacy" below)
beat: What beat did the crime occur?
case_number: The crime report's case number. Multiple charges can have the same case number.
city: What city did the crime occur? This is almost always Oakland.
description: A more detailed description of the crime
state: What state did the crime occur? This is almost always California
time: The date and time the crime occurred. E.g.
type: The type of crime
Because the API is built off of CrimeWatch, it will carry over the some of the same limitations that they have. For one, open cases will not be available. The OPD has their own non-public database, their public version is a subset of that. Please note this paragraph from their site:
The City of Oakland intends that the information provided by this web site is accurate; however, errors sometimes occur. There are no implied or express warranties on the materials in this site; the materials that are provided will be subject to revision. Use this service at your own risk. This service does not reflect official crime index totals as reported to the FBI's Uniform Crime Reporting program. The listed crimes are subject to change for a variety of reasons, including late reporting, reclassification of some offenses and discovery that some offenses were unfounded.
I don't care about citation. If you use the data (either for research or development), I'd love to know how!
A note on privacy
CrimeWatch_'s map will not display certain types of reports (for example, domestic violence). They do offer these details within their daily public crime data (with the addresses anonymized). I've chosen to include them within the API. I don't think it's necessarily my call not to report these incidents, particularly because they are already public, they are crimes, and they happen in our neighborhood. Again, the exact addresses are anonymized.
Questions? Suggestions? Concerns? [email: firstname.lastname@example.org]