openaq / openaq-api-v2

OpenAQ API
https://api.openaq.org
39 stars 9 forks source link

Filtering by country on ``/cities`` returns cities of unwanted countries #355

Open JGeek00 opened 3 weeks ago

JGeek00 commented 3 weeks ago

Using this URL https://api.openaq.org/v2/cities?limit=100&page=1&offset=0&sort=asc&country=BG&order_by=city. I'm requesting the cities of Bulgaria (BG), but it also returns a city of Romania and a city of Bangladesh.

Response:

{
  "meta": {
    "name": "openaq-api",
    "license": "",
    "website": "/",
    "page": 1,
    "limit": 100,
    "found": 3
  },
  "results": [
    {
      "country": "BD",
      "city": "N/A",
      "count": 63413,
      "locations": 1,
      "firstUpdated": "2016-11-09 17:00:00+00",
      "lastUpdated": "2024-06-10 10:00:00+00",
      "parameters": [
        "o3",
        "pm25"
      ]
    },
    {
      "country": "BG",
      "city": "National air network",
      "count": 2454787,
      "locations": 29,
      "firstUpdated": "2020-04-20 18:00:00+00",
      "lastUpdated": "2024-06-10 10:00:00+00",
      "parameters": [
        "co",
        "no",
        "no2",
        "o3",
        "pm10",
        "pm25",
        "so2"
      ]
    },
    {
      "country": "RO",
      "city": "National air network",
      "count": 5317,
      "locations": 1,
      "firstUpdated": "2024-01-28 23:00:00+00",
      "lastUpdated": "2024-06-10 10:00:00+00",
      "parameters": [
        "pm10",
        "so2"
      ]
    }
  ]
}