Spare the Air Data Feed
Interested in using the Bay Area Air Quality District’s air quality data for your website or iPhone app?
The Bay Area Air Quality Management District (BAAQMD) has partnered with AIRNow in order to provide daily air quality data for developers, such as particulate matter and ozone forecasts.
If you’re a developer who is interested in displaying Bay Area air quality information on your website or application, visit the AirNow Gateway and request an AirNow Gateway account. After you have obtained an API key, use it to log onto the site.
Once logged in, click on “Data Feeds” in the upper left hand corner.

You’ll be taken to a page with links to old and new web services. Click on “Information regarding the new version of the Gateway Web Services” as shown:
Next, you’ll be taken to a page with XML, CSV, and JSON examples to query the air quality database.
Try it!
As shown in the example above, type:
http://ws1.airnowgateway.org/GatewayWebServiceREST/Gateway.svc/forecastbyzipcode?zipcode=94954&date=2010-01-15&format=xml&key=API_KEY
into the URL bar of your browser, but replace API_KEY with your API key. You should get a JSON result that looks like this:
We used it to build that neat little widget on our home page, as well as the boxes on our air quality page – we’d like to see what you come up with. E-mail us at webmaster@511contracosta.org and let us know if you’ve done something neat.
Note: 511CC no longer uses the XML feeds previously available on this page in order to display air quality data in each of the Bay Area’s five air basins.




