Skip to main content
This section documents the citationPills data returned by the ChatGPT endpoint. Citation pills are part of the ChatGPT response — no separate API call is needed. For use cases, pricing context, and copy-paste examples, see the ChatGPT sources API page on the product site.

Example request

This produces a response containing the citationPills array documented below.

Overview

ChatGPT cites sources inline as it answers; the result.citationPills array exposes those citations denormalized: each entry is one (pill, source) pair carrying a per-source label (the source’s own page title from the citation event), a citationPillId that groups entries from the same chip, and the per-source url/domain/description/position, plus the ChatGPT-only type and datePublished fields. When a chip 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 markdown field contains these citations as inline [label](url) links; the text field contains plain text without the links. The citationPills array provides structured metadata about all inline citations. The field is omitted from result when the answer has no pills.

Citation pill structure

Each citation pill contains:

type values

type reflects the structure of the underlying citation event in ChatGPT’s response:
  • "searchResult" — a regular web search hit. ChatGPT provides a snippet, so description is populated.
  • "groupedWebpage" — a citation rendered in the ChatGPT UI as a multi-source card (commonly used for community references like Reddit, Wikipedia, and ArXiv). ChatGPT does not provide a per-source snippet for these, so the description key is omitted entirely from the pill object.
When the same source URL appears as both a search result and inside a grouped card, the search-result form (with description) is preferred.

Response example