> For the complete documentation index, see [llms.txt](https://docs.airqo.net/airqo-rest-api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airqo.net/airqo-rest-api-documentation/api-endpoints/reports.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
