> ## Documentation Index
> Fetch the complete documentation index at: https://cloro.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Citation pills

> Schema for inline citation pills returned by the Google AI Mode endpoint, with each cited source attached to the visible pill chip it appears on.

This section documents the **citationPills** data returned by the [Google AI Mode endpoint](/api-reference/endpoint/monitor-aimode). Citation pills are part of the AI Mode response — no separate API call is needed.

## Example request

```json theme={null}
{
  "prompt": "best laptops for programming",
  "country": "US"
}
```

This produces a response containing the `citationPills` array documented below.

## Overview

Google renders inline pill chips (e.g. `[Reddit +3]`) next to AI Mode text to attribute each claim to one or more sources. The `result.citationPills` array exposes those pills denormalized: each entry is one **(pill, source)** pair carrying a per-source `label` (the source's own page title), a `citationPillId` that groups entries from the same chip, and the per-source `url`/`domain`/`description`/`position`.

When a pill cites N sources, the array contains N entries sharing the same `citationPillId` but carrying different per-source `label`, `url`, and `domain`. Group by `citationPillId` to recover the pill-level structure.

The field is omitted from `result` when the answer has no pills.

## Citation pill structure

| Field            | Type    | Description                                                                                                                                                                                                                         |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `label`          | string  | Per-source title from the sources rail (e.g. `"Best laptops for programmers in 2026"`). Always present; may be an empty string when the rail has no title for this source — read `domain` / `url` for source identity in that case. |
| `citationPillId` | integer | Stable identifier shared by all entries from the same visible chip. 1-based ordinal assigned in document order.                                                                                                                     |
| `url`            | string  | Direct URL of the cited source.                                                                                                                                                                                                     |
| `domain`         | string  | Host extracted from `url`, for grouping and display.                                                                                                                                                                                |
| `description`    | string  | Source snippet from the sources rail when Google ships one. Omitted when absent.                                                                                                                                                    |
| `position`       | integer | 1-based position of this source in the sibling [`result.sources`](/api-reference/endpoint/aimode/sources) array.                                                                                                                    |

## Response example

```json theme={null}
{
  "success": true,
  "result": {
    "text": "Here are several laptops for programming...",
    "sources": [
      {
        "position": 1,
        "url": "https://example.com/best-laptops-2026",
        "label": "Best laptops for programmers in 2026",
        "description": "A guide to the top laptops for software development this year."
      },
      {
        "position": 2,
        "url": "https://example.com/dev-laptops-review",
        "label": "Developer laptop reviews",
        "description": "Reviews of laptops aimed at software developers."
      },
      {
        "position": 3,
        "url": "https://example.com/macbook-pro-review",
        "label": "MacBook Pro for developers",
        "description": "Why the MacBook Pro is a popular pick for developers."
      }
    ],
    "citationPills": [
      {
        "label": "Best laptops for programmers in 2026",
        "citationPillId": 1,
        "url": "https://example.com/best-laptops-2026",
        "domain": "example.com",
        "description": "A guide to the top laptops for software development this year.",
        "position": 1
      },
      {
        "label": "MacBook Pro for developers",
        "citationPillId": 1,
        "url": "https://example.com/macbook-pro-review",
        "domain": "example.com",
        "description": "Why the MacBook Pro is a popular pick for developers.",
        "position": 3
      }
    ]
  }
}
```
