cloro WebsiteAPI Get an API key
API Reference › Copilot › Citation pills

Citation pills

Describes the citationPills collection that the Microsoft Copilot extraction returns, where every source referenced by an inline chip is flattened into its own row for easy iteration.

Overview

Citation pills travel inside the standard Copilot response, so there is no dedicated request to make — extract a Copilot answer and read the citationPills array from result. During generation, Copilot emits citation events next to the answer text, and adjacent events render as a single chip in the interface. cloro keeps that grouping but presents it in denormalized form: each element of the array is a single pill-and-source pairing.

Every entry carries the source's own label, the URL and host it points to, an optional snippet, and a citationPillId that ties together all sources belonging to the same visible chip. A chip that references several sources therefore appears as several rows sharing one citationPillId but differing in label, url, and domain. To rebuild the original per-chip view, group the rows by citationPillId. When an answer contains no pills, the field is left out of result entirely.

Fields

FieldTypeDescription
labelstringTitle of the individual source as supplied by the citation event, for example "Microsoft 365 Documentation". Always included, though it may be empty when the event carries no title — fall back to domain or url to identify the source in that case.
citationPillIdintegerOne-based sequence number shared by every source that belongs to the same chip.
urlstringCanonical link to the referenced source.
domainstringHost portion parsed from url, handy for grouping and display.
descriptionstringShort excerpt for the source when Copilot provides one; omitted otherwise.
positionintegerOne-based index of this source within the sibling result.sources array.

Response example

{
  "success": true,
  "result": {
    "text": "Here are a few solid laptops for programming...",
    "sources": [
      {
        "position": 1,
        "url": "https://docs.microsoft.com/",
        "label": "Microsoft 365 Documentation",
        "description": "Official development documentation"
      },
      {
        "position": 2,
        "url": "https://github.com/microsoft/vscode",
        "label": "VS Code on GitHub",
        "description": "Visual Studio Code repository"
      }
    ],
    "citationPills": [
      {
        "label": "Microsoft 365 Documentation",
        "citationPillId": 1,
        "url": "https://docs.microsoft.com/",
        "domain": "docs.microsoft.com",
        "description": "Official development documentation",
        "position": 1
      },
      {
        "label": "VS Code on GitHub",
        "citationPillId": 1,
        "url": "https://github.com/microsoft/vscode",
        "domain": "github.com",
        "description": "Visual Studio Code repository",
        "position": 2
      }
    ]
  }
}

Notes

Both example rows carry citationPillId of 1, meaning they render as one chip backed by two sources. Group on that identifier to reconstruct chip-level structure, and cross-reference position against result.sources to reach the full source record. Questions? Reach us at [email protected].