OpenWeatherMap · Arazzo Workflow

OpenWeatherMap Air Quality By City

Version 1.0.0

Geocode a city name, then fetch current air pollution and its hourly forecast.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub WeatherForecastClimateAir PollutionAir QualitySolarGeocodingHistoryMapsRoad RiskPublic APIsArazzoWorkflows

Provider

openweathermap

Workflows

air-quality-by-city
Resolve a city name to coordinates, then return current and forecast air quality.
Calls direct geocoding to turn a city query into coordinates, then chains the latitude and longitude into the current air pollution and hourly air pollution forecast endpoints.
3 steps inputs: appid, limit, q outputs: currentAqi, currentComponents, forecastList, lat, lon
1
geocodeCity
Resolve the supplied city query into geographic coordinates, keeping the first and best match.
2
currentAirPollution
Fetch current air pollution at the geocoded coordinates, including the Air Quality Index and pollutant concentrations.
3
airPollutionForecast
Fetch the hourly air pollution forecast for the next five days at the same coordinates.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: OpenWeatherMap Air Quality By City
  summary: Geocode a city name, then fetch current air pollution and its hourly forecast.
  description: >-
    Resolves a free-text city name into coordinates with the geocoding API, then
    feeds the resolved latitude and longitude into the current air pollution and
    hourly air pollution forecast endpoints to produce an air quality snapshot
    plus a five day outlook. Every step spells out its request inline, including
    the appid API key the security scheme requires, so the flow can be read and
    executed without opening the underlying OpenAPI descriptions.
  version: 1.0.0
sourceDescriptions:
- name: airPollutionApi
  url: ../openapi/openweathermap-air-pollution-api-openapi.yml
  type: openapi
- name: geocodingApi
  url: ../openapi/openweathermap-geocoding-api-openapi.yml
  type: openapi
workflows:
- workflowId: air-quality-by-city
  summary: Resolve a city name to coordinates, then return current and forecast air quality.
  description: >-
    Calls direct geocoding to turn a city query into coordinates, then chains
    the latitude and longitude into the current air pollution and hourly air
    pollution forecast endpoints.
  inputs:
    type: object
    required:
    - q
    - appid
    properties:
      q:
        type: string
        description: City name, optionally with state and ISO country codes, comma-separated.
      limit:
        type: integer
        description: Maximum number of geocoding matches to return (1 to 5).
      appid:
        type: string
        description: OpenWeather API key.
  steps:
  - stepId: geocodeCity
    description: >-
      Resolve the supplied city query into geographic coordinates, keeping the
      first and best match.
    operationId: getDirectGeocoding
    parameters:
    - name: q
      in: query
      value: $inputs.q
    - name: limit
      in: query
      value: $inputs.limit
    - name: appid
      in: query
      value: $inputs.appid
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      lat: $response.body#/0/lat
      lon: $response.body#/0/lon
      name: $response.body#/0/name
      country: $response.body#/0/country
  - stepId: currentAirPollution
    description: >-
      Fetch current air pollution at the geocoded coordinates, including the Air
      Quality Index and pollutant concentrations.
    operationId: getCurrentAirPollution
    parameters:
    - name: lat
      in: query
      value: $steps.geocodeCity.outputs.lat
    - name: lon
      in: query
      value: $steps.geocodeCity.outputs.lon
    - name: appid
      in: query
      value: $inputs.appid
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      aqi: $response.body#/list/0/main/aqi
      components: $response.body#/list/0/components
  - stepId: airPollutionForecast
    description: >-
      Fetch the hourly air pollution forecast for the next five days at the same
      coordinates.
    operationId: getAirPollutionForecast
    parameters:
    - name: lat
      in: query
      value: $steps.geocodeCity.outputs.lat
    - name: lon
      in: query
      value: $steps.geocodeCity.outputs.lon
    - name: appid
      in: query
      value: $inputs.appid
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      forecastList: $response.body#/list
  outputs:
    lat: $steps.geocodeCity.outputs.lat
    lon: $steps.geocodeCity.outputs.lon
    currentAqi: $steps.currentAirPollution.outputs.aqi
    currentComponents: $steps.currentAirPollution.outputs.components
    forecastList: $steps.airPollutionForecast.outputs.forecastList

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/openweathermap-air-quality-by-city-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.