Welcome to the experimental DemocracyMap API

To give you a sense of some of the information made available here, you may want to see this DemocracyMap Demo

The DemocracyMap API aims to provide normalized structured data for all of the contact details and other primary information for every government body and government official that represents you. Currently this API is more of a meta-API that aggregates, normalizes, and caches other data sources including geospatial boundary queries, but ultimately it aims to help provide standardized geospatial queries and merge with similar efforts like those based on the Boundary Services API (like OpenNorth Represent).

The long term vision includes helping to form part of the core infrastructure for querying geospatially bound web services such as returning Open311 API endpoints associated with a city jurisdiction. If you run the example query for Chicago listed below you'll see that the service discovery data is filled out with information about the Open311 API endpoint in Chicago. This is drawn directly from Chicago's own service discovery document.

Currently this demo is limited to the United States


The default format returned is json, but xml is also supported. You can specify the format as another query parameter, eg "/context?format=xml"



URL: http://rivanna.democracymap.org/context

There are just a few parameters

Example Call


Get Involved

The main place for information about DemocracyMap is democracymap.org and the DemocracyMap mailing list. For more information about the service discovery component, see the description of GeoWeb DNS on the Open311 wiki and join the Open311 mailing list.

Contribute a Data Scraper

The best way to contribute now is to add a scraper for more data. The primary place this is being tracked now is this wiki page for city representatives per state which lists data sources that need scrapers. If you would like to contribute a scraper, you're encouraged to host it on ScraperWiki (which will help share and make it useful even beyond this project) and update the wiki to mention that you are working on it. When your scraper is working, please update the wiki to point to the functioning scraper. You can find examples of existing scrapers for this project on Scraperwiki and github.




Primary contact information for all US States (website, phone number, etc)


Primary contact information for all US counties (website, address, etc)


Primary contact information for all US cities (website, address, etc)

City Officials:


Source Code

The source code for this is available on github. The code is being regularly refactored and is not well documented at the moment, but if you're interested in it, say something on the mailing list.

Data Sources & Credits

This is built on the same data as the main DemocracyMap demo, so I'm repeating those credits here. City and County data from U.S. Census (including the 2007 Census of Governments and TigerWeb) with updated URLs provided by the SBA U.S. City & County Web Data API. City mayor and contact data from the US Conference of Mayors. State data from the National Governors Association and USA.gov. US Congressional data from the Sunlight Congress API. Congressional district boundaries from GovTrack.us. State legislative data from the OpenStates API. All geocoding courtesy of Yahoo! PlaceFinder. Tweet stream uses the Tweet! jQuery plugin from seaofclouds.