# Enhanced AIO (AI Overview)

## AI Overview for Google

Some Google Search results include an **AI Overview** section that summarizes answers directly on the SERP page. This section is dynamically generated and may not always be available through standard SERP extraction methods.

To accurately retrieve AI Overview content, NetNut's SERP API offers **Enhanced AI Overview extraction** for Google searches via the `enhancedAio` parameter.

This feature is specifically designed and optimized to handle Google’s AI Overview elements, ensuring you receive structured, complete, and consistent AI Overview data directly from the SERP.

### **Parameter:** `enhancedAio`

| Field           | Description                                                                                                                                     |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **Type**        | Boolean (`0`/ `1`)                                                                                                                              |
| **Default**     | `false`                                                                                                                                         |
| **Description** | When set to `1`, the API enables Enhanced AI Overview extraction, ensuring accurate and structured AI-generated summary data from Google SERPs. |

**Time & Performance**

The average processing time for rendered request is approximately 2-4 **seconds.**

***

### Example API Request

```bash
curl --location 'https://serp-api.netnut.io/search?hl=en&googleDomain=www.google.com&q=Explain%20how%20photosynthesis%20converts%20light%20energy%20into%20chemical%20energy%20in%20plants&enhancedAio=1' \
--header 'Authorization: Basic base64(username:password)'
```

***

## AI Overview Response Structure

When using `enhancedAio=1`, the response will include an `aiOverview` object.

Additionally, the same status will also be returned in the response headers under:

```
aio-status: success | not_found | failed
```

This allows quick validation of AI Overview availability without parsing the response body.

***

#### `aiOverview` Fields

| Field        | Type   | Description                                                           |
| ------------ | ------ | --------------------------------------------------------------------- |
| aio\_status  | string | Status of AI Overview extraction: `success`, `not_found`, or `failed` |
| text\_blocks | array  | Structured text content (paragraphs, lists, etc.)                     |
| videos       | array  | Video elements extracted from AI Overview (if available)              |
| references   | array  | Source references or citations (if available)                         |

***

### AI Overview Status Types

#### 1. Success

Returned when AI Overview is successfully extracted and parsed.

```json
"aiOverview": {
    "aio_status": "success",
    "text_blocks": [
        {
            "type": "paragraph",
            "snippet": "For startups, the best SEO strategy is to focus on low-competition long-tail keywords, build topical authority through targeted content, and ensure technical soundness to rank fast."
        },
        {
            "snippet": "Key SEO Strategies for Startups"
        },
        {
            "type": "list",
            "list": [
                {
                    "snippet": "Target Long-Tail Keywords: Focus on specific, lower competition phrases to gain faster traction."
                },
                {
                    "snippet": "Establish Topical Authority: Create structured content clusters around your niche."
                }
            ]
        }
    ],
    "videos": [],
    "references": []
}
```

Notes:

* `text_blocks` may include:
  * `paragraph`
  * `list`
* Lists are normalized into structured arrays.
* Content is cleaned and formatted for consistency.

***

#### 2. Not Found

Returned when no AI Overview is present on the Google SERP.

```json
"aiOverview": {
    "aio_status": "not_found",
    "text_blocks": [],
    "videos": [],
    "references": []
}
```

Notes:

* This is a valid and expected response.
* Not all queries generate AI Overview on Google.

***

#### 3. Failed

Returned when AI Overview exists but extraction failed.

```json
"aiOverview": {
    "aio_status": "failed",
    "text_blocks": [],
    "videos": [],
    "references": []
}
```

Notes:

* Indicates a temporary issue (parsing, rendering, or blocking).
* Retrying the request is recommended.

***

### Response Header

In addition to the response body, the API returns an `aio-status` header:

| Header     | Values                        | Description                     |
| ---------- | ----------------------------- | ------------------------------- |
| aio-status | success / not\_found / failed | Mirrors `aiOverview.aio_status` |

Example:

```
aio-status: success
```

#### Things to Consider

* `enhancedAio=1` enables AI Overview extraction for Google searches.
* This feature is designed specifically for retrieving Google’s AI-generated summaries.
* It is recommended when AI Overview data is required as part of your SERP results.
* This feature currently supports **Google SERPs only**.


---

# 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://help.netnut.io/netnut-documentation/netnut-scraper-apis/serp-api/google-scraper/google-search/enhanced-aio-ai-overview.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.
