openaq/openaq-api

How to filter sources by city ?

crazyhitty opened this issue · 1 comments

How can I get sources available in a particular city using https://api.openaq.org/v1/sources

The sources endpoint doesn't provide this type of information. You can use the https://api.openaq.org/v1/locations endpoint instead. The best way to get locations by city, is to use the coordinates parameter, in combination with a radius.

For example, https://api.openaq.org/v1/locations?coordinates=52.09026,5.10623&radius=5000 gets you all locations in Utrecht.