> ## 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 Perplexity endpoint, with each cited source attached to the visible pill chip it appears on in the answer.

This section documents the **citationPills** data returned by the [Perplexity endpoint](/api-reference/endpoint/monitor-perplexity). Citation pills are part of the Perplexity 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

Perplexity renders inline bracketed citation markers (e.g. `[1][2][3]`) next to its answer text. The `result.citationPills` array exposes those bracketed citations 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 bracketed citation, and the per-source `url`/`domain`/`description`/`position`.

When a bracketed citation references 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 citation-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 Programming Laptops 2026 — TechCrunch"`). 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 | 1-based ordinal shared by all entries from the same chip.                                                                                                                                                                                 |
| `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 Perplexity ships one. Omitted when absent.                                                                                                                                                      |
| `position`       | integer | 1-based position of this source in the sibling [`result.sources`](/api-reference/endpoint/perplexity/sources) array.                                                                                                                      |

## Response example

```json theme={null}
{
  "success": true,
  "result": {
    "text": "Here are several laptops for programming...",
    "sources": [
      {
        "position": 1,
        "url": "https://techcrunch.com/laptops",
        "label": "Best Programming Laptops 2026 — TechCrunch",
        "description": "Latest laptop reviews and recommendations"
      },
      {
        "position": 2,
        "url": "https://www.youtube.com/watch?v=example",
        "label": "Best Laptops 2026",
        "description": "Video review of programming laptops"
      },
      {
        "position": 3,
        "url": "https://wired.com/programming-laptops",
        "label": "Wired Laptop Buyer's Guide",
        "description": "Programming laptop buyer's guide"
      }
    ],
    "citationPills": [
      {
        "label": "Best Programming Laptops 2026 — TechCrunch",
        "citationPillId": 1,
        "url": "https://techcrunch.com/laptops",
        "domain": "techcrunch.com",
        "description": "Latest laptop reviews and recommendations",
        "position": 1
      },
      {
        "label": "Wired Laptop Buyer's Guide",
        "citationPillId": 1,
        "url": "https://wired.com/programming-laptops",
        "domain": "wired.com",
        "description": "Programming laptop buyer's guide",
        "position": 3
      }
    ]
  }
}
```
