# Reports

## 1. Comprehensive air quality data analytics for specific grids over customisable time periods

<mark style="color:blue;">`GET`</mark> {{baseURL}}[/analytics/grid/report](https://platform.airqo.net/api/v2/analytics/grid/report?token={token})

This endpoint provides comprehensive air quality data analytics for specific grids over customizable time periods. It endpoints offers detailed insights into particulate matter (PM) concentrations, including annual averages, daily means, hourly measurements, and diurnal patterns. This data enables users to gain deep insights into air quality trends and patterns within their chosen grid.

#### Body Parameters

| Name        | Type  | Description |
| ----------- | ----- | ----------- |
| grid\_id    | tring | the Grid ID |
| start\_time | Date  | timestamp   |
| end\_time   | Date  | timestamp   |

#### Query Parameters

<table><thead><tr><th width="222">Name</th><th width="212">Type</th><th>Description</th></tr></thead><tbody><tr><td>token<mark style="color:red;">*</mark></td><td>string</td><td>the security token</td></tr></tbody></table>

{% tabs %}
{% tab title="Request Body" %}

```json
{
    "grid_id": "659d036497e611001236cd1b",
    "start_time": "2024-08-01T00:00",
    "end_time": "2024-09-30T00:00"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="200 " %}

```json
{
    "annual_data": {
        "pm10_calibrated": 20.5,
        "pm25_calibrated": 15.8,
        // ... other annual data
    },
    "daily_mean_data": [
        {
            "date": "2024-08-01",
            "pm10_avg": 35.2,
            "pm25_avg": 22.1
        },
        // ... other daily data
    ],
    "hourly_mean_data": [
        {
            "time": "2024-08-01T00:00",
            "pm10_avg": 40.5,
            "pm25_avg": 28.3
        },
        // ... other hourly data
    ],
    // ... other data types
}

```

{% endtab %}

{% tab title="401: Unauthorized In case of bad requests" %}

```json
{
"success":false, 
"message":"Invalid authentication", 
"error":"Unauthorized"
}
```

{% endtab %}
{% endtabs %}

## Usage Instructions

You should note that all API endpoints require authentication using a valid AirQo token. Ensure proper handling of the returned data, as it may include sensitive information about air quality conditions. For optimal performance, consider implementing caching mechanisms for frequently accessed data points.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.airqo.net/airqo-rest-api-documentation/api-endpoints/reports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
