Developers

Resources for developers about our open data endpoints.

Socrata

Find documentation, examples and developer resources for the Socrata Open Data (SODA) API here.

Each dataset on our open data portal has an open, unique SODA endpoint that you can query and filter. Find each endpoint from the primer page under the “API” button.

Try it

For example, request all open Improve Detroit tickets about potholes using Socrata’s Simple Filters:
https://data.detroitmi.gov/resource/a9kb-mhiu.json?request_type_title=Potholes&status=Open

Or query Detroit Demolitions to find the average price of demolition per contractor using SoQL Functions (SoQL is Socrata’s Query Language):
https://data.detroitmi.gov/resource/uzpg-2pfj.json?$select=contractor_name,count(address) as total_demos,avg(price)&$group=contractor_name

ESRI

Available feature services

{Explain public ArcGIS REST Services}

Geocoding

A common operation while working with open data is geocoding. Geocoding is a process to turn a text address (2 Woodward Avenue) into coordinates which can be plotted on a map (42.329543, -83.043720) or a parcel identifier that can be used to join to other datasets (01004068-86).

The city makes available three geocoders:

  • Address point
    • Matches an address input against a table of discrete address points, called the geocoder's reference dataset. Returns a parcel number and geographic coordinates for the center of that parcel
    • Pros: address points in the reference dataset can be related to a parcel
    • Cons:  you need to have good input to return a match - you can get away with small typos in the street name, but not much more than that
  • Street centerline
    • Matches an address input against a layer of city streets which have an address range attached; returns geographic coordinates for where your input address should exist along the street
    • Pros: you can match addresses which don't exist in the address point table used by the address point geocoder
    • Cons: the coordinates returned will be inexact and there will not be a parcel number attached
  • Composite (we recommend using this one!)
    • Accepts address input, parses that input, checks first for a match against the address point geocoder and returns that match. If there’s not an address point match, returns a street centerline match

    Read this blog post for a full introduction to geocoding and more detailed examples of how to utilize the City’s geocoders in your workflow.