Skip to content
Documentation/Sources & citations

Show the source of an AI answer with text-fragment links

Turn a cited quote into a link that scrolls the browser to the passage or opens the PDF page, after checking that the quote is really in the source.

Last updated

Markdown

Endpoint and minimal request

POST https://api.webcite.co/api/v1/citations/source-preview takes a quote and either a web url or an uploaded asset_id with a 1-based page. Send the key in the x-api-key header. Each call costs 1 credit. Agents call the same operation as the MCP tool get_source_preview.

bash
curl --fail-with-body -X POST 'https://api.webcite.co/api/v1/citations/source-preview' \
  -H "x-api-key: $WEBCITE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"url": "https://www.census.gov/library/publications/2024/demo/p60-282.html", "quote": "Real median household income was $80,610 in 2023, a 4.0 percent increase from the 2022 estimate of $77,540"}'

Recorded response, 25 November 2026, with account fields removed (full file):

json
{
  "kind": "web",
  "url": "https://www.census.gov/library/publications/2024/demo/p60-282.html",
  "quote": "Real median household income was $80,610 in 2023, a 4.0 percent increase from the 2022 estimate of $77,540",
  "deep_link": "https://www.census.gov/library/publications/2024/demo/p60-282.html#:~:text=Real%20median%20household%20income%20was%20%2480%2C610%20in%202023%2C%20a%204.0%20percent%20increase",
  "binding": {
    "grounded": true,
    "method": "exact",
    "matched_quote": "Real median household income was $80,610 in 2023, a 4.0 percent increase from the 2022 estimate of $77,540",
    "matched_text": "Real median household income was $80,610 in 2023, a 4.0 percent increase from the 2022 estimate of $77,540",
    "score": 1
  }
}

deep_link is the page URL with a text fragment (#:~:text=) built from the quote. In a browser that supports text fragments, opening it scrolls to the passage and highlights it.

Read the binding before you link

binding says whether the quote is in the source. grounded is true only when it was found, and method says how. Four recorded calls against the same Census page show the difference:

Quote sentgroundedmethodscore
The sentence as publishedtrueexact1
Reworded: "real median household income was $80,610 in 2023 - a 4.0% increase from the 2022 estimate"truefuzzy1
One figure transposed: "Real median household income was $86,010 in 2023"falseunbound0.63
Wrong figures: "Real median household income was $82,400 in 2023, a 6.3 percent increase"falseunbound0.5

exact means the quote was found word for word, and normalized means it was found as a substring once both texts were normalized. fuzzy means a close passage was found but the wording differs, so show binding.matched_text, the passage actually found, rather than the quote. A quote binds only when every figure in it matches the source: value, digit order, decimal point, sign, percent versus percentage points, currency, and million versus billion. Formatting differences such as thousands separators, non-breaking spaces, dash styles, a space before a percent sign and line breaks still bind. reflowed used a prepared OCR reading and always needs review. unbound means the source does not contain the quote: the transposed and wrong figures above came back unbound, with the real sentence in matched_text. Recorded files: reworded, transposed, wrong figures.

Link to a page in a PDF

For an uploaded file, send asset_id, page and quote. The response has kind: "page", the page's extracted text, and a deep_link of the form asset_url#page=N. The evidence:// asset URL identifies the stored file and does not open in a browser, so open your own copy of the file at that page: most PDF viewers, including the ones built into browsers, accept #page=N on the file URL.

json
{
  "asset_id": "YOUR_ASSET_ID",
  "page": 1,
  "quote": "Civilian labor force"
}

The recorded response for page 1 of a BLS table returned grounded: true, method: "exact" and the page text. For a spreadsheet, source preview reads the sheet grid and takes a cell anchor: cell: "F8" with page set to the sheet number, or a sheet-qualified cell: "tableA1!F8". The recorded response for cell F8 of the Census table A-1 workbook returned kind: "grid", the cells around F8 with F8 marked as the anchor, and method: "normalized" for the quote 80610. Convert a spreadsheet to Markdown shows the extracted sheet. To draw a box around the passage on the page, keep element positions from extraction, as in RAG citations that open the exact page.

Check many quotes at once

Source preview checks one quote and returns something to display. To check up to 200 quotes against their sources in one call, use batch quote checks (MCP verify_batch), then call source preview for the ones you show. Neither call decides whether the source supports the claim around the quote; verify a claim with the URL in source_urls does.