Developers

API reference

Cities

The cities with an Atmy summary, their pages and the request for each of them; filter by country. Find a city by name in any of 25 languages, by slug or id, or by coordinates — the nearest city with a summary within 50 km. Add country= when two cities share a name.

Cities

GEThttps://api.atmy.ai/v1/cities

Query parameters

q string optional

Part of a city name in any of the site languages, or of its slug.

country string optional

Country name or slug, to tell apart cities with the same name.

lang string optional

Language of city and country names and of the page link.

Default: en

GET/cities?country=serbia
curl "https://api.atmy.ai/v1/cities?country=serbia"
200Response
{
  "count": 12,
  "cities": [
    {
      "id": 50068,
      "slug": "serbia/belgrade",
      "name": "Belgrade",
      "country": "Serbia",
      "timezone": "Europe/Belgrade",
      "center": {
        "lat": 44.8155,
        "lon": 20.4457
      },
      "page": "https://atmy.ai/air-quality/serbia/belgrade/",
      "status": "current",
      "current": "https://api.atmy.ai/v1/air-quality/current?city=serbia%2Fbelgrade"
    },
    {
      "id": 51548,
      "slug": "serbia/pancevo",
      "name": "Pančevo",
      "country": "Serbia",
      "timezone": "Europe/Belgrade",
      "center": {
        "lat": 44.87057,
        "lon": 20.63996
      },
      "page": "https://atmy.ai/air-quality/serbia/pancevo/",
      "status": "current",
      "current": "https://api.atmy.ai/v1/air-quality/current?city=serbia%2Fpancevo"
    }
  ]
}