Input
- Document citations
- Documents you send with
citations.enabled=true - Web search citations
- Results the web search tool retrieves
How Claude citations work in the API: document citations, web search citations, the fields returned, token costs and limits. Plus what they mean for publishers.
Claude produces citations in two documented ways. With the Citations feature, you pass documents with citations enabled and Claude returns the supporting passages, with page, character or block locations. With the web search tool, citations are always enabled and point to source URLs. Neither is a ranking system: they show where a claim came from.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
citations.enabled=truechar_location, page_location, content_block_locationweb_search_result_locationHow Claude's own search products handle sources is covered on Claude SEO and the access checks on how to get cited by Claude.
document block with "citations": {"enabled": true} and ask a question. The response then contains several text blocks, each with a claim and the citations that support it.Use plain text, PDF or custom content documents. Citations must be enabled on all or none of the documents in a request. Only text citations are supported; image citations are not.
Plain text and PDFs are chunked into sentences, which sets the smallest citable unit. Custom content documents are used as given, with no further chunking.
PDF citations carry a 1-indexed page range, plain text carries a 0-indexed character range, and custom content carries a 0-indexed block range. Document indices are 0-indexed across all document blocks in the request.
{
"type": "document",
"source": {
"type": "text",
"media_type": "text/plain",
"data": "The grass is green. The sky is blue."
},
"title": "My Document",
"context": "This is a trustworthy document.",
"citations": {"enabled": true}
}The optional title and context fields are passed to the model but not used toward cited content.
web_search_result_location includes a url, title, encrypted_index and cited_text, the last of which holds up to 150 characters of the cited content. The cited_text, title and url fields do not count toward input or output tokens.Web search is billed at $10 USD per 1,000 searches, plus standard token costs. Developers can limit searches with max_uses, and restrict sources with allowed_domains or blocked_domains, but not both in one request.
Enabling citations on a document or search_result block and also setting output_config.format returns a 400 error.
Citations must be enabled on every document in a request or on none.
PDFs that are scans without extractable text cannot be cited, because image citations are not supported.
Citation blocks in responses cannot be cached directly, but the source documents can be.
Enabling citations slightly increases input tokens because of system prompt additions and chunking.
Document citations only cite what a developer supplies, so they say nothing about your public pages. Web search citations point to URLs the tool retrieved. A citation shows where text came from, not that a page "won" a ranking.
The useful check is practical: run the question you want to be cited for in Claude with web search on, save the cited URLs, and compare with your own page. Pair it with the bot access checks in Claude-SearchBot.
4 questions people ask next, answered from the sources on this page.
Citations are references Claude attaches to claims. With the Citations feature they point to passages in documents you provide; with web search they point to source URLs.
Anthropic's web search tool docs say citations are always enabled for web search, and each citation carries a URL, title and up to 150 characters of cited text.
No. Anthropic says enabling citations on a document or search result block with output_config.format returns a 400 error.
Anthropic says the cited_text field in the Citations feature does not count toward output tokens.
Run the free audit, then approve the fixes. Every change can be undone.