using Retab;using RetabClient = Retab.Retab;var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;var client = new RetabClient(apiKey);var result = await client.Extractions.Sources.GetAsync("extr_01G34H8J2K");Console.WriteLine(result);
import com.retab.RetabClient;public final class Example { public static void main(String[] args) throws Exception { RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY")); var result = client.extractions().sources().get("extr_abc123"); System.out.println(result); }}
{ "detail": "No extraction found for extraction_id 'extr_01G34H8J2K'"}
{ "detail": "Extraction has no output to source"}
Extractions
Get Sources
Return the extraction result enriched with per-leaf source provenance.
Each extracted leaf value is wrapped as where source
contains citation content, surrounding context, and a format-specific
anchor (bbox for PDFs, cell ref for spreadsheets, text span for plain text, etc.).
GET
/
v1
/
extractions
/
{extraction_id}
/
sources
from retab import Retabclient = Retab()result = client.extractions.sources.get("extr_01G34H8J2K")print(result)
import { Retab } from "@retab/node";const client = new Retab({ apiKey: process.env.RETAB_API_KEY });const result = await client.extractions.sources.get("extr_01G34H8J2K");console.log(result);
using Retab;using RetabClient = Retab.Retab;var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;var client = new RetabClient(apiKey);var result = await client.Extractions.Sources.GetAsync("extr_01G34H8J2K");Console.WriteLine(result);
import com.retab.RetabClient;public final class Example { public static void main(String[] args) throws Exception { RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY")); var result = client.extractions().sources().get("extr_abc123"); System.out.println(result); }}
{ "detail": "No extraction found for extraction_id 'extr_01G34H8J2K'"}
{ "detail": "Extraction has no output to source"}
Call without query parameters to keep the original synchronous response.For durable computation, first create sources,
then poll this endpoint with mode=located or mode=cited. Follow the returned
Location, including job_id, to pin polling to the extraction output and schema.
A changed extraction returns 409 instead of silently switching results. Polling
never starts a new computation or upgrades a located request to paid citations.
A mode that has not been requested returns 404.The progressive response adds job and evidence. Job status describes processing:
pending, running, completed, or error. Completed does not mean every
field has a match. Inspect each field’s evidence status. Available locations remain
usable while the job runs. Located results complete independently of citation work.evidence is keyed by dotted extraction paths, including array indexes (items.0.price).
Each field has a kind (direct, supporting, or unavailable), a status, and a list
of sources. A source has content, file_id, a format-specific anchor, a role
(answer, input, or comparison), and a qualification (direct, partial, or legacy).
Supporting evidence identifies inputs; it does not verify an inferred answer.
Missing, ambiguous, unsupported, and errored matches are distinct field outcomes.job.is_partial and job.error describe incomplete processing. A missing match alone
is not an error. The original sources tree remains available for existing highlight
renderers; evidence can carry multiple locations per field.Progressive reads return an ETag. Send it in If-None-Match to receive 304 when the
snapshot has not changed. Use the same mode and job_id when polling.
from retab import Retabclient = Retab()result = client.extractions.sources.get("extr_01G34H8J2K")print(result)
import { Retab } from "@retab/node";const client = new Retab({ apiKey: process.env.RETAB_API_KEY });const result = await client.extractions.sources.get("extr_01G34H8J2K");console.log(result);
using Retab;using RetabClient = Retab.Retab;var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;var client = new RetabClient(apiKey);var result = await client.Extractions.Sources.GetAsync("extr_01G34H8J2K");Console.WriteLine(result);
import com.retab.RetabClient;public final class Example { public static void main(String[] args) throws Exception { RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY")); var result = client.extractions().sources().get("extr_abc123"); System.out.println(result); }}
Expected job identity returned by POST. A changed extraction returns 409.
Response
Successful Response
An extraction's output annotated with the source that backs each value.
Returned when fetching the sources for an extraction. Carries the source file
and its detected document_type, the original extraction output, and a
parallel sources tree where each leaf is a {value, source} object locating
the value in the document (a page region for PDFs, a cell for spreadsheets, a
text span for plain text, and so on).