Skip to main content
IQAir AirVisual logo
  • Category: developer tools
  • Auth: API_KEY
  • Composio-managed OAuth available? N/A
  • Tools: 10
  • Triggers: 0
  • Slug: IQAIR_AIRVISUAL
  • Version: 20261101_00

Tools

Slug: IQAIR_AIRVISUAL_GET_AIR_QUALITY_FORECAST_DATARetrieves daily pollutant forecast data for a specified city, state, and country. A successful city response can produce empty forecast lists when the expected data is missing or cannot be parsed.

Input Parameters

string
required
City name (e.g., ‘Los Angeles’).
string
required
State or region name (e.g., ‘California’).
string
required
Country name (e.g., ‘USA’).

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: IQAIR_AIRVISUAL_GET_CITIESTool to list supported cities in a specified state and country. Use when you need to retrieve cities for a given state/country.

Input Parameters

string
required
State name as returned by the ‘Get States’ action. Use exact state names like ‘California’, ‘Texas’, ‘New York’.
string
required
Country name as returned by the ‘Get Countries’ action. Use exact country names like ‘USA’, ‘India’, ‘Germany’, ‘Canada’. Note: ‘USA’ is used instead of ‘United States’.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: IQAIR_AIRVISUAL_GET_CITY_AIR_QUALITYTool to retrieve air quality data for a specific city. Use when you need current pollution and weather data by specifying city, state, and country.

Input Parameters

string
required
Name of the city to retrieve air quality for. Must match IQAir’s supported city names exactly (e.g., ‘Los Angeles’, ‘New York City’, ‘Paris’).
string
required
Name of the state, province, or region containing the city. Use full name, not abbreviations (e.g., ‘California’ not ‘CA’, ‘Ile-de-France’ for Paris).
string
required
Name of the country containing the city. Use full country name (e.g., ‘USA’, ‘France’, ‘Australia’).

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: IQAIR_AIRVISUAL_GET_COUNTRIESTool to list all supported countries. Use when you need to know which countries are supported by the AirVisual API.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: IQAIR_AIRVISUAL_GET_HISTORICAL_AQI_DATARetrieves AQI data for a specified city, state, and country, with optional start and end dates. Results can consist of only the latest city reading, which is not necessarily within the requested date range.

Input Parameters

string
End datetime in ISO8601 format (inclusive).
string
required
City name
string
Start datetime in ISO8601 format (inclusive).
string
required
State or province name
string
required
Country name

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: IQAIR_AIRVISUAL_GET_NEAREST_CITY_AIR_QUALITYTool to retrieve air quality data for the nearest city based on latitude/longitude or IP. Use when you have precise location data or want to geolocate an IP for air quality.

Input Parameters

string
IPv4 address to geolocate; if neither lat/lon nor ip provided, server uses caller’s IP.
number
Latitude in decimal degrees; must be between -90 and 90. Must be provided with lon.
number
Longitude in decimal degrees; must be between -180 and 180. Must be provided with lat.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: IQAIR_AIRVISUAL_GET_NEAREST_STATION_AIR_QUALITYRetrieves air quality for the nearest station to supplied GPS coordinates. When station access is denied, the result can instead contain nearest-city data.

Input Parameters

number
required
Latitude in decimal degrees, must be between -90 and 90
number
required
Longitude in decimal degrees, must be between -180 and 180

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: IQAIR_AIRVISUAL_GET_STATESTool to list supported states in a specified country. Use when you need to retrieve states/provinces for a given country.

Input Parameters

string
required
Country name as returned by the ‘Get Countries’ action. Use exact country names like ‘USA’, ‘India’, ‘Germany’, ‘Canada’. Note: ‘USA’ is used instead of ‘United States’.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: IQAIR_AIRVISUAL_GET_STATION_BY_IDRetrieves current air quality and weather by station, city, state, and country names. Results can instead be city-level and do not necessarily confirm the named station. Use the countries, states, and cities actions to find valid location names.

Input Parameters

string
required
City’s English name. Must match IQAir’s supported city names exactly (use Get Cities action to find valid names).
string
required
State or region’s English name. Must match IQAir’s supported state names exactly (use Get States action to find valid names).
string
required
Country’s English name. Must match IQAir’s supported country names exactly (use Get Countries action to find valid names).
string
required
Station’s English name. Note: Station name is used as an identifier but is passed through to fallback city data. The actual station-specific endpoint requires premium API access.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: IQAIR_AIRVISUAL_GET_WORLD_RANKINGRequests global city air quality rankings. Results can instead contain air quality for a single nearest city; latitude and longitude or an IP address can specify the location for that result. Latitude and longitude must be supplied together.

Input Parameters

string
IPv4 address for geolocation (e.g., ‘8.8.8.8’). Used to determine location when lat/lon are not provided. Optional - if omitted, uses caller’s IP.
number
Latitude in decimal degrees (-90 to 90). When provided with ‘lon’, returns air quality for the nearest city to these coordinates. Optional - if omitted, uses server’s IP geolocation.
number
Longitude in decimal degrees (-180 to 180). Must be provided together with ‘lat’. Optional - if omitted, uses server’s IP geolocation.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not