APIs (application programming interfaces) are increasingly being released by city authorities around the world as a programmatic way for community organisations and businesses to interact with city open data. Think of it like a bridge between data and people who use the data.
The reason why this is important is because cities all over the world are running hackathons or civic hacking events to encourage reuse of city datasets. The reason why APIs are important is because APIs are discussed in terms of their benefits to civic engagement through greater transparency, for more efficient delivery of government services, and as an enabler of a new wave of local industry innovation. And this falls in line with another international trend on “smart city” — in which open data, e-government, and real-time sensor feeds contribute to more automated and sustainable city functioning — will also rely heavily on APIs in order to make much of that agenda possible.
The truth is, cities around the world are only starting on their Open Data Journey, let alone their API journey. Many have commenced with open data portals that were published with an ad-hoc collection of historical data released, which are threatened to stagnate with unusable data. Others have focused on civic hacking events that have given rise to sporadic events that built some app prototypes and not much more.
Few cities are focused on creating transactional APIs that would enable citizens and local businesses to engage with services directly via API. While there are many successes across the globe, there is also much more work to do.
Here is a look at three city examples from around the globe, which I took from Programmable Web. Here's their take:
Barcelona continues to win international awards as one of the most innovative smart cities in the world. Some of their recent acclaimed projects include:
- A CityOS project that enables tech makers and devs to prototype sensor and API-enabled projects using an area of the city as an experimental lab
- The business incubator BDigital program for apps development
- New models of procurement for city services, like Citymart (which posts a city’s urban problems, and then facilitates submissions from businesses who are encouraged to create innovative solutions, rather than the usual city tendering process where the city completely defines the service they want to contract in advance).
APIs are published across various government departments, including:
- Area Metroplitana de Barcelona: a collection of agencies that publish transport, environment, land use, and business data. API documentation is published in Catalan and includes datasets of publications, city news, research study results (on transport, the environment, etc.), current projects and works, urban plans, and datasets that outline city infrastructure and resources (beach locations, bus stops, taxis, business services, etc.). Documentation is a webpage explaining the various query parameters, etc., that can be made, with links to the available JSON datasets. An API key is not necessary to make the calls.
- Sentilo: Sentilo is Barcelona city’s open source, Internet of Things (IoT) smart city infrastructure platform aimed at enabling access to sensor and actuator data (monitoring temperature and air quality, garbage collection, parking, pedestrian flows, etc.). A REST API provides access to the city’s sensors and actuators. Documentation includes example code snippets and an active Google Groups forum is used to respond to developer issues.
- Open Data BCN: An open data catalog publishes 118 datasets in ODATA format, and 41 in XML format.
The city hosts Apps4BCN, a directory site of available apps built using city data and APIs. The directory includes reviews, where anyone can register as an expert user of apps and contribute, which in turn gives them a profile page. (So savvy app developers could use these experts as early adopters for user feedback on their future creations.)
Barcelona also invests in a Code for Europe initiative that currently has a Fellowship based at the city, working with internal staff on implementing Open 311 API standards so that citizens can register and communicate local issues such as broken city infrastructure directly via an application.
Barcelona has a number of partnerships aimed at fostering standardization in the use of APIs so that civic tech solutions created in another city are transferable locally. This includes CitySDK, iCity, and Open-DAI.
The city is also currently hosting a Smart City App Hack event. Unlike the hackathons that the city has hosted in the past, the Smart City App Hack allows dev teams to build apps over a period of months instead of a weekend.
Barcelona’s open data portal averages around 10,000 website visits each month.
New York City
New York City has 8 APIs available via its developer portal, including a geoclient, an Open311 API, an event calendar, city government spending data, and several news and data feeds, including transport.
In addition, New York City has a Socrata-based open data portal, which means that all of the published datasets are available as APIs using Socrata’s Open Data API (SODA) standard. These are intended for community and hackathon use without a registration key, although it is possible to build small scale applications with up to 1,000 request calls per hour (with a registered key).
A roadmap clearly articulates the city’s planned data releases up until 2018. Current datasets are often provided in close-to-realtime. For example, building permits data includes data up until the previous working day.
Data visualizations and stories of how city APIs and open data are being used by business, researchers, and the community are showcased on the open data portal.
An annual NYC Big Apps competition has replaced the city’s hackathon approach, and aims to foster more sustainable civic tech product development over a six-month period. This includes social media profile pages for teams competing in events and progress updates on their product development. Team profile pages show what APIs they are using in their civic tech solutions. These pages could be used as a developer marketplace or directory for those seeking to collaborate with city API developers beyond the life of the competition.
Via the NYC Big Apps website, the city does signpost to a wider data and API ecosystem, including state open data sources, and proprietary API data services relevant to New York City, like Foursquare, Yelp, The New York Times, Mapbox, and SeatGeek. Interestingly, wider government open data APIs such as the Federal U.S. Census Bureau APIs are not referenced.
New York City’s developer portal currently has an average of around 6,000 visits each month, with half of visits coming from searches predominantly for the Geoclient mapping API.
Australian city open datasets can be accessed via the Australia Government’s open data CKAN catalog (which enables all datasets to be called via the CKAN API). Alongside this, open data platform OpenDataSoft has local agents keen to sell their product to Australian city authorities. Meanwhile, Melbourne has opted for Socrata as their data portal, which — like New York City — means all datasets are available as Socrata Open Data API endpoints.
To aid discoverability, the city has introduced a simple flowchart for data use, based on the potential role of the API developer-consumer. Potential API users interested in social change, entrepreneurial opportunities, community participation, and urban planning are routed to their own separate data catalog landing pages with a curated set of data chosen for them to initially explore.
In the past six months, Melbourne’s open data portal has seen an average of 5,000 monthly visits.
Like any other major project, it's going to take us all and is going to take us forever, but then, that's the point.