How APIs are powering smart cities

4 min reading
How APIs are powering smart cities
How APIs are powering smart cities

BBVA API Market

Companies and institutions are coming together to develop smart cities as international meeting points and business hubs. Barcelona, New York, the Australian government or the EU for example have been using APIs to drive connected cities.

Ciudad inteligente in Spanish. Ville intelligente in French. Smart city in English. All of these terms refer to a single original concept: a city whose urban development is based on sustainability and its ability to improve the lives of its residents as well as provide companies, organizations and public administrations with everything they need in all possible spheres. And this includes mobility, the economy and the environment among other areas.

Rudolf Giffinger, professor at the Technology University of Vienna and one of the world’s leading experts in urban development, defines smart cities using six clearly separate criteria: economy, mobility, environment (as mentioned before), administration, way of life and residents. Most cities in the world assess their characteristics as smart cities, both internally or relying on external parties, based on these values. To some extent, these six sectors are also the focus of daily efforts by governments and private companies to use smart solutions for data business and services.

 The examples of Barcelona and New York

As part of their journey toward becoming real smart cities, major cities strive to provide open and transparent information to their residents. In many cases, local governments allow access to relevant economic data: employability, investments, P&L of public companies, government tenders… And in practically all instances, this information can be processed by external parties through open APIs.

Barcelona has several application programming interfaces with free economic information: the webpage of Greater Barcelona incorporates an API where developers are able to run queries on all types of data which have been sorted by collections: from services for companies to open or negotiated tenders. Queries are returned in JSON format, the default option. However, CSV, XML, KMZ and KML can also be used. Additionally. queries can be run in two languages, Catalan and Castilian.

The API searches by fields in the various collections. If you wished to call the API to filter content by those fields, you would enter something like this:

http://opendata.amb.cat/ {{collection}} /search? {{camp1}} = {{valor}} & {{camp2}} = {{valor}} & {{camp3}} = {{valor}}

Greater Barcelona also shares open information about city news, information about the municipalities, mobility and sustainability studies, cooperation projects, information about parks, beaches, taxi activity and public transportation, etc.

In the city itself there is the City OS project, an umbrella project for several other projects, including a very special one: Apps4bcn. This website  is a repository of applications about all sorts of services in Barcelona as well as a meeting point for experts and developers. The portal’s idea is for programmers to use open APIs of Barcelona’s local government to design applications that can then be assessed by experts from sectors such tourism, transport, urbanism, culture, healthcare, education, sports, etc. This is a truly interesting project.

Europe-wide projects

In Europe there are several very interesting mixed projects about the Internet of Things and the design of smart cities. European institutions and private companies are working together to create environments where open APIs –with free-use information and business opportunities– can be harnessed. The three most important projects are possibly FI-WARE, ICOS (Intelligent / Smart Cities Open Source Community) and Sofia (Smart Objects for Intelligent Applications).

As for New York, the city has a portal exclusively for programmers where eight open APIs allow access to public information:

– Geoclient API: open geocoding service used in New York; completely free access. You only need to register and request a password. Obviously, this service is limited in terms of responding to requests in all applications that use the API as their data provider: up to 2,500 requests per minute and/or 500,000 requests per day. The API’s source code is under Apache 2.0 license and can be found at the code repository GitHub. There is one dependency: developers must download GeoSupport from the Department of City Planning.

– Open311 Inquiry: this open API includes all information which is normally provided to NY residents when they call 311 or its appdata about services and facilities and FAQs. For example, information about public schools, parking, cleaning and waste service, city ads, etc.

– Events Calendar: this API includes information about events sponsored by the city. Information is provided through a REST API in JSON or JSONP format; name, date and time are the fields used.

– DoE School Choice: this API, in collaboration with CivicDashboards, provides developers with information about public schools, curricula and after-school activities as well as educational reports. The entire education community has access to performance reports (A, B, C, D or F) about the schools which are based on the students’ progress and performance as well as the school environment.

– Other APIs: City Hall Data Feeds (RSS with information from the City Hall), HPD Data Feeds (information about housing and development), Comptrollers Checkbook (tracking of budget use) and DOT Data Feeds (information about traffic and public transportation).

There are other examples of smart cities that share open data through APIs. For example, the Australian government has an API with CKAN, a platform for developing repositories of public, open data. This is a RPC (remote procedure call) API that provides information in lists or sets of data from the user’s POST HTTP requests. The information is in JSON format.

– FI-WARE: open, independent community that works to build a sustainable, open ecosystem to develop smart applications in numerous sectors. This platform offers a series of public and free APIs for designing projects and products at a low cost. This proposal includes FIWARE Lab, a lab where users and companies can test the technology and exploit open data published by smart cities.

– ICOS: community of developers from the smart cities business sector which develops apps and solutions in this area. There are currently several interesting projects such as CKAN, the Australian government’s open data platform (mentioned above) and projects by the European institutions (www.publicdata.eu); CiviCRM, an open-source CRM used by institutions such as the Greater Washington Urban League; MATSim, a tool for creating large-scale transport simulations; and HOYRESPIRO, proposal developed in Bilbao that provides georeferenced information about air quality, pollen levels and the weather.

– Sofia: project led by Indra in collaboration with companies such as Nokia, Philips or Acciona which focuses on the Internet of Things, and using sensors, augmented reality and virtual reality to drive smart cities forward. A private project, it has also been granted public funding.

If you are interested in the world of APIs, find out more about BBVA’s APIs here.

Follow us on @BBVAAPIMarket

It may interest you