Skip to main content
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. [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

FieldTypeDescription
labelstringPer-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.
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.

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": "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
      }
    ]
  }
}