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

Citation pills

A flattened view of the inline source chips ChatGPT attaches to its answer, where every cited page is delivered as its own ready-to-read record.

Overview

Citation pills are not fetched separately. They ride along inside the ChatGPT extraction response under result.citationPills, so a single call to the ChatGPT endpoint returns both the answer and its supporting citations.

Each element of the array is a single pill-to-source pairing. A pill chip shown in the ChatGPT UI may reference several pages at once; cloro expands that into one entry per source. Entries that originated from the same chip share the same citationPillId, so you can regroup them by that value to rebuild the original chip layout.

The companion result.markdown field embeds the same citations as inline [label](url) links, while result.text holds the answer with the links stripped out. Use citationPills when you need the structured metadata rather than the rendered links. When an answer carries no citations, the citationPills key is left out of result entirely.

Example request

{
  "prompt": "What is the best AI software?",
  "model": "CHATGPT",
  "country": "US"
}

Citation pill fields

FieldTypeDescription
labelstringThe title of the individual source. Always included, but can be an empty string when the citation event carries no title — fall back to domain or url to identify the source in that case.
citationPillIdintegerGroups every entry that came from the same chip. ChatGPT numbers these starting at 0, which differs from the 1-based ids used by the other providers.
urlstringFull address of the cited page.
domainstringHost portion of the source URL, for example example.com.
descriptionstring, optionalShort snippet describing the source. Present only when ChatGPT supplies one; omitted otherwise (see type).
positioninteger1-based rank of this source within the sibling result.sources array.
typestringChatGPT-only discriminator, either searchResult or groupedWebpage, indicating whether a snippet is available.
datePublishedstring, optionalChatGPT-only ISO 8601 publish date of the source. Omitted when the citation event supplies none; never returned as null.

Type values

The type field mirrors how the underlying citation was structured inside ChatGPT's response:

If the same URL surfaces both as a search hit and within a grouped card, cloro keeps the search-result form so the description is retained.

Response example

{
  "success": true,
  "result": {
    "text": "**ChatGPT** — Most versatile for writing, reasoning, and general problem-solving.\n**Claude** — Strong focus on safety and ethical reasoning.",
    "markdown": "**ChatGPT** — Most versatile for writing, reasoning, and general problem-solving. [Top 10 Best AI Apps in 2025](https://www.top10.com/best-lists/best-ai-apps)\n**Claude** — Strong focus on safety and ethical reasoning. [Best AI Platforms Compared](https://www.godofprompt.ai/blog/best-ai)",
    "citationPills": [
      {
        "label": "Top 10 Best AI Apps in 2025",
        "citationPillId": 0,
        "url": "https://www.top10.com/best-lists/best-ai-apps",
        "domain": "top10.com",
        "description": "A roundup of AI applications available today",
        "position": 1,
        "type": "searchResult",
        "datePublished": "2025-01-15"
      },
      {
        "label": "Artificial intelligence — Wikipedia",
        "citationPillId": 1,
        "url": "https://en.wikipedia.org/wiki/Artificial_intelligence",
        "domain": "en.wikipedia.org",
        "position": 2,
        "type": "groupedWebpage"
      }
    ]
  }
}

Notes

To reconstruct a chip that cites multiple pages, collect all entries that share a citationPillId; each will carry its own label, url, and domain. For questions about the response shape, reach out at [email protected].