In short. Grok's all-citations list can include URLs encountered during search that have no inline reference in the final answer.
Definition: Yes. In xAI's agent tools API, the
citationslist records URLs encountered during the search process, while inline citations are links inserted into the response text. xAI says that a URL can remain in the list after Grok decides that the source is not relevant enough to reference in the final answer.
Key facts
- xAI separates All Citations, a complete list of sources encountered, from Inline Citations, markdown links embedded in response text, in its Citations documentation.
- The
citationsattribute is returned by default when the agentic request completes, according to the same documentation. - xAI's Web Search documentation says the tool searches the web in real time, browses pages and extracts relevant information for answers.
- Inline links use the
[[N]](url)form, with sequential display numbers that begin at 1 and are reused when the same source appears again.
What does the citations list contain?
xAI's agent tools API defines the list as a record of URLs for all sources encountered during the agent's search process. The documentation says the list is comprehensive, is returned by default, and is collected from successful tool executions. The response exposes it through the citations attribute after the request completes.
That makes the list a research trace. It can include a page that Grok examined while answering a question even when the final prose contains no inline link to that page. xAI gives the reason directly: the agent can examine a source, decide that it is insufficiently relevant, and still leave its URL in the list for transparency.
The Web Search tool supplies the research step. xAI describes it as a tool that lets Grok search the web in real time, browse web pages and extract relevant information. Its documentation lists web_search for both the xAI SDK and the OpenAI Responses API, and points readers to the Citations page for retrieving source links.
How are inline references different?
Inline citations are markdown-style links inserted into the response text where the model references a source. xAI also exposes structured metadata with positional information, so an application can associate a citation with the part of the answer where the link appears.
The Responses API enables inline citations by default. The xAI Python SDK has a separate setting: the caller passes include=["inline_citations"] to enable them. Passing include=["no_inline_citations"] to the Responses API removes citation markdown from the response text. xAI states that annotation data may still list sources encountered during search in that mode, without positions in the response text.
const { text, sources } = await generateText({
model: xai.responses('grok-4.7'),
prompt: 'What is xAI?',
tools: {
web_search: xai.tools.webSearch(), // inline citations are enabled by default
},
});
// Text includes inline citation markdown
console.log(text);
// Sources contain all citation URLs
console.log('Sources:', sources);
How should a website owner read the two outputs?
Treat the outputs as two related observations. The all-citations list answers which URLs the agent encountered during its tool work. The response text and its inline citation metadata answer which URLs received visible reference positions in the answer.
The two outputs can therefore differ in membership. A URL present in citations but absent from the inline references is documented as an encountered source without a final-answer reference. A URL reused later in the response keeps its original citation number, and xAI documents the source URL as the value attached to each citation.
This distinction applies to the documented agent tools API. The xAI pages describe API responses and SDK behavior; they do not specify whether every Grok consumer interface exposes the same all-citations list.
Related terms
FAQ
Is every URL in citations visible in the answer?
No. xAI explicitly says that some URLs can remain in the list after the agent decides that a source is not sufficiently relevant for the final answer.
Can inline citations be disabled?
Yes. The Responses API accepts include=["no_inline_citations"]; the response text then has no [[N]](url) markdown links, while source annotations may still be present.
Does the list contain only pages that support a final claim?
The documented list covers sources encountered during search. xAI's example and explanation leave room for encountered URLs that receive no positional reference in the final response.
Sources
- xAI, "Citations", 25 August 2026
- xAI, "Web Search", 10 October 2026
- xAI, "Streaming & Synchronous Requests", 10 October 2026
Check how a page reads to answer engines. Open the GEO score analyzer