# Parameters

## Version 2

### Request parameters

| Parameter     | Description                                                                                                         | Default | Required |
| ------------- | ------------------------------------------------------------------------------------------------------------------- | ------- | -------- |
| `apikey`      | Your API key                                                                                                        | —       | Yes      |
| `version`     | API version                                                                                                         | `v2`    | Yes      |
| `locationkey` | Unique location ID. Use the [Locations API](/developers/locations/general) to find the appropriate key.             | —       | Yes      |
| `format`      | Response format (currently only JSON is supported)                                                                  | `json`  | No       |
| `hour#`       | Time of forecast measured in hours from the current time. Available time spans are 1, 12, 24, 48, 72, and 96 hours. | —       | Yes      |
| `day#`        | Time of forecast measured in days from the current time. Available time spans are 1, 2, 3, 4, 5, 6, and 7 days.     | —       | Yes      |
| `pollutants`  | Returns detailed information about each pollutant when `true`. **Only available with the premium option.**          | `false` | No       |
| `language`    | Language code for localized content. See [Language Support](/developers/languages).                                 | `en-us` | No       |

---

### Current conditions/forecast response parameters

| Field                                        | Type    | Description                                                                                                                 |
| -------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------- |
| `success`                                    | boolean | Whether the server responded properly                                                                                       |
| `status`                                     | string  | Code indicating the status of the returned data                                                                             |
| `version`                                    | string  | The current version of the API                                                                                              |
| `data[]`                                     | array   | Array containing the requested weather data along with relevant metadata                                                    |
| `data[].date`                                | string  | Datetime of the forecast in format `YYYY-MM-DDTHH:MM:SS-HH:MM`. Provided in the query location's time zone.                 |
| `data[].epochDate`                           | integer | Number of seconds elapsed since January 1, 1970 (midnight UTC/GMT).                                                         |
| `data[].overallIndex`                        | number  | Air quality rating on a scale set by local regulating bodies. Scales vary by location.                                      |
| `data[].overallPlumeLabsIndex`               | number  | Internationally normalized air quality rating on a scale from 0 to 300+, with higher numbers representing worse air quality |
| `data[].dominantPollutant`                   | string  | The pollutant with the highest concentration                                                                                |
| `data[].category`                            | string  | One-word description of the air quality in the requested language                                                           |
| `data[].categoryColor`                       | string  | Color assigned to the level of air quality in hexadecimal format                                                            |
| `data[].hazardStatement`                     | string  | Textual explanation of the associated air quality data in the requested language                                            |
| `data[].link`                                | string  | Direct AccuWeather URL for the air quality information                                                                      |
| `data[].pollutants[]`                        | array   | Detailed look at each individual pollutant. **Premium option only.**                                                        |
| `data[].pollutants[].type`                   | string  | Description of the pollutant. Possible values: `PM2.5`, `PM10`, `NO2`, `O3`, `CO`, `SO2`. More may be added.                |
| `data[].pollutants[].name`                   | string  | Name of the pollutant in plain English                                                                                      |
| `data[].pollutants[].index`                  | number  | Air quality rating on a scale set by local regulating bodies                                                                |
| `data[].pollutants[].plumeLabsIndex`         | number  | Internationally normalized air quality rating (0–300+)                                                                      |
| `data[].pollutants[].concentration`          | object  | Pollutant particles per volume of air                                                                                       |
| `data[].pollutants[].concentration.value`    | number  | Concentration of the pollutant                                                                                              |
| `data[].pollutants[].concentration.unit`     | string  | Unit type for the concentration                                                                                             |
| `data[].pollutants[].concentration.unitType` | integer | Numeric ID for unit translations                                                                                            |
| `data[].pollutants[].source`                 | string  | Name of the air quality data provider                                                                                       |

---

### Observational response parameters

| Field                                        | Type    | Description                                                                                                  |
| -------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------ |
| `success`                                    | boolean | Whether the server responded properly                                                                        |
| `status`                                     | string  | Code indicating the status of the returned data                                                              |
| `version`                                    | string  | The current version of the API                                                                               |
| `data[]`                                     | array   | Array containing the requested weather data along with relevant metadata                                     |
| `data[].date`                                | string  | Datetime in format `YYYY-MM-DDTHH:MM:SS-HH:MM`. Provided in the query location's time zone.                  |
| `data[].epochDate`                           | integer | Number of seconds elapsed since January 1, 1970 (midnight UTC/GMT).                                          |
| `data[].overallIndex`                        | number  | Air quality rating on a scale set by local regulating bodies                                                 |
| `data[].category`                            | string  | One-word description of the air quality in the requested language                                            |
| `data[].categoryColor`                       | string  | Color assigned to the level of air quality in hexadecimal format                                             |
| `data[].hazardStatement`                     | string  | Textual explanation of the associated air quality data in the requested language                             |
| `data[].pollutants[]`                        | array   | Detailed look at each individual pollutant                                                                   |
| `data[].pollutants[].type`                   | string  | Description of the pollutant. Possible values: `PM2.5`, `PM10`, `NO2`, `O3`, `CO`, `SO2`. More may be added. |
| `data[].pollutants[].name`                   | string  | Name of the pollutant in plain English                                                                       |
| `data[].pollutants[].concentration`          | object  | Pollutant particles per volume of air                                                                        |
| `data[].pollutants[].concentration.value`    | number  | Concentration of the pollutant                                                                               |
| `data[].pollutants[].concentration.unit`     | string  | Unit type for the concentration                                                                              |
| `data[].pollutants[].concentration.unitType` | integer | Numeric ID for unit translations                                                                             |
| `data[].pollutants[].source`                 | string  | Name of the air quality data provider                                                                        |

---

## Version 1 (deprecated)

### Request parameters

| Parameter     | Description        | Default | Required |
| ------------- | ------------------ | ------- | -------- |
| `apikey`      | Your API key       | —       | Yes      |
| `version`     | API version        | `v1`    | Yes      |
| `locationkey` | Unique location ID | —       | Yes      |
| `format`      | Response format    | `json`  | No       |

---

### Response parameters

| Field                  | Type    | Description                                                                                                         |
| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------- |
| `Date`                 | string  | Date                                                                                                                |
| `EpochDate`            | integer | Number of seconds elapsed since January 1, 1970 (midnight UTC/GMT).                                                 |
| `Index`                | number  | Air quality index. Scale from 0–500, with 0 being best and 500 being worst.                                         |
| `ParticulateMatter2_5` | number  | Concentration of particles smaller than 2.5 microns (ug/m³). Hourly average.                                        |
| `ParticulateMatter10`  | number  | Concentration of particles larger than 2.5 microns in diameter but smaller than 10 microns (ug/m³). Hourly average. |
| `Ozone`                | number  | Concentration of ozone particles (ug/m³). Hourly average.                                                           |
| `CarbonMonoxide`       | number  | Concentration of carbon monoxide (ppm). Hourly average.                                                             |
| `NitrogenMonoxide`     | number  | Concentration of nitrogen monoxide (ug/m³). Hourly average.                                                         |
| `NitrogenDioxide`      | number  | Concentration of nitrogen dioxide (ug/m³). Hourly average.                                                          |
| `SulfurDioxide`        | number  | Concentration of sulfur dioxide (ug/m³). Hourly average.                                                            |
| `Lead`                 | number  | Concentration of lead particles (ug/m³). Hourly average.                                                            |
| `Source`               | string  | Data source                                                                                                         |
