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

Citation pills

The citationPills array flattens Perplexity's inline bracketed citations into one row per cited source, so you can read every reference without parsing the answer text yourself.

Overview

Perplexity sprinkles bracketed markers such as [1][2][3] through its answer to point at the sources it relied on. Cloro surfaces those markers as result.citationPills, a denormalized list where each element describes a single (pill, source) pairing. There is no dedicated request for this data — it travels inside the standard Perplexity extraction response, so once you have called the Perplexity endpoint the pills are already present.

Every entry carries the source's own page label, a citationPillId that ties together all rows belonging to the same bracket, plus the per-source url, domain, description, and position. When one bracket cites several sources, you will see several entries sharing the same citationPillId but differing in their source-level fields. Group the array by citationPillId to rebuild the original citation grouping. If the answer contains no pills, the field is left out of result entirely.

Fields

FieldTypeDescription
labelstringTitle of the cited page as shown in the sources rail (for example "Best Programming Laptops 2026 — TechCrunch"). Always included, but can be an empty string when the rail supplies no title; fall back to domain or url to identify the source in that case.
citationPillIdinteger1-based ordinal shared by every entry that originated from the same bracketed marker.
urlstringCanonical link to the cited source.
domainstringHostname parsed out of url, handy for grouping and compact display.
descriptionstringSnippet Perplexity attaches to the source in its rail. Absent when no snippet is provided.
positioninteger1-based index of this source within the sibling result.sources array.

Response example

{
  "success": true,
  "result": {
    "text": "Here are several laptops well suited to 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
      }
    ]
  }
}

Notes

Because entries are denormalized, always reconcile a pill against result.sources using position when you need the full source record. Rows sharing a citationPillId represent one visible chip that fans out to multiple sources — treat that id, not array order, as the citation boundary. Questions about the schema can go to [email protected].