Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cloro.dev/llms.txt

Use this file to discover all available pages before exploring further.

This section documents the citationPills data returned by the Google AI Mode endpoint. Citation pills are part of the AI Mode response — no separate API call is needed.

Example request

{
  "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. [Reuters +5]) 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 the visible pill text, 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 that share the same label and citationPillId but differ in their per-source fields. Group by citationPillId to recover the pill-level structure. The shape mirrors the ChatGPT endpoint’s citationPills — consumers can iterate citation pills the same way across both surfaces. The field is omitted from result when the answer has no pills.

Citation pill structure

FieldTypeDescription
labelstringVisible pill text as Google renders it (e.g. "Reuters +5"). Repeats across entries from the same chip.
citationPillIdintegerStable identifier shared by all entries from the same visible chip. 1-based ordinal assigned in document order.
urlstringDirect URL of the cited source.
domainstringHost extracted from url, for grouping and display.
descriptionstringSource snippet from the sources rail when Google ships one. Omitted when absent.
positioninteger1-based position of this source in the sibling result.sources array.
label and citationPillId repeat across entries that came from the same chip. To render pill-level UI (one chip per pill), group by citationPillId. To render source-level UI (one link per cited source), iterate directly.
Group by citationPillId, not label — the same label can repeat across different IDs when Google renders the chip at multiple points.
Entries per pill may not match the +N in the label. Google’s +N reflects the chip rail, not the underlying citation payload.

Response example

{
  "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": "Reuters +1",
        "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": "Reuters +1",
        "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
      }
    ]
  }
}