*** September 2026 Major Release ***Read and watch
Document type

Extracting data from stool test reports

Specialty labs report stool tests as multi-section panels, and each lab chooses its own marker list and graphics. Gastroenterology and integrative medicine practices receive one for every patient tested, often with a repeat test after treatment, as lab portal downloads or faxed pages.

Practices need the calprotectin, elastase and secretory IgA results, the short-chain fatty acid profile, and the specimen's collection date. An electronic health record charts each marker across repeat tests, so a clinician can see inflammation fall after treatment begins.

Page 1 of a sample Stool Test Report, with extracted values outlined
13,300Markdown characters
33parse blocks
122fields extracted
The problem

What makes stool test reports hard

A graphic in every row

Specialty stool panels draw a colored range bar in each result row, with a marker showing where the result falls against its interval.

Words and numbers in one column

Result columns mix numeric values with qualitative entries such as Negative, None or Soft, all under one Result heading.

One table, many sections

Digestion, inflammation, immunology and fatty acid markers sit in separate sections, each repeating its own Result, Unit and Reference Interval header row.

How it works

Parse, extract, verify

1

Parse

Parse turns the document into reading-order Markdown and a hierarchy of blocks (text, tables, figures), and grounds each block to its exact location on the page.

2

Extract

You define the fields in a JSON schema, and Extract returns their values in a consistent, structured format, each linked back to where it appears in the Markdown.

3

Verify

Each value links back to where it appears, down to the character range in the Markdown, and the page and bounding box in the source document, so every result can be verified.

Worked example

One stool test report, end to end

About this document: A Stool Chemistries report that Mosaic Diagnostics publishes as a sample of its stool chemistry panel, analyzed by Doctor's Data. Three portrait pages: order, patient and collection boxes over 18 markers in six sections, then a guide to each marker and the lab's commentary. Page 1 is featured. Every patient and order detail is the lab's specimen data.

Processing objective: The objective is to identify the specimen behind the results: which panel, which order and when the sample moved through the lab. The specimen dates come back as printed, each grounded to its line in the header box. A clinician lines up repeat tests by collection date.

Demonstration fields: Report, Order number, Collected, Received, Reported

The document

3 of 3 pages
  • Page 1 of the sample Stool Test ReportPage 1shown below
  • Page 2 of the sample Stool Test ReportPage 2
  • Page 3 of the sample Stool Test ReportPage 3

Where each value came from

Page 1 of the sample Stool Test Report, with every featured field outlined
Reportreport_title
Stool Chemistries
The region of the sample Stool Test Report containing Report, with the extracted value outlined
extraction_metadata["report_title"]
{
  "value": "Stool Chemistries",
  "page": 1,
  "range": {
    "end": 17,
    "start": 0
  },
  "box": {
    "xmin": 0.07037,
    "ymin": 0.0591,
    "xmax": 0.24868,
    "ymax": 0.07521
  }
}
Order numberorder.order_number
999999-9999
The region of the sample Stool Test Report containing Order number, with the extracted value outlined
extraction_metadata["order.order_number"]
{
  "value": "999999-9999",
  "page": 1,
  "range": {
    "end": 107,
    "start": 88
  },
  "box": {
    "xmin": 0.0596,
    "ymin": 0.11536,
    "xmax": 0.20522,
    "ymax": 0.12859
  }
}
Collectedspecimen_dates.collected
06/28/2026
The region of the sample Stool Test Report containing Collected, with the extracted value outlined
extraction_metadata["specimen_dates.collected"]
{
  "value": "06/28/2026",
  "page": 1,
  "range": {
    "end": 360,
    "start": 334
  },
  "box": {
    "xmin": 0.68066,
    "ymin": 0.1313,
    "xmax": 0.92871,
    "ymax": 0.14522
  }
}
Receivedspecimen_dates.received
07/01/2026
The region of the sample Stool Test Report containing Received, with the extracted value outlined
extraction_metadata["specimen_dates.received"]
{
  "value": "07/01/2026",
  "page": 1,
  "range": {
    "end": 386,
    "start": 361
  },
  "box": {
    "xmin": 0.67996,
    "ymin": 0.14641,
    "xmax": 0.92928,
    "ymax": 0.1601
  }
}
Reportedspecimen_dates.reported
07/07/2026
The region of the sample Stool Test Report containing Reported, with the extracted value outlined
extraction_metadata["specimen_dates.reported"]
{
  "value": "07/07/2026",
  "page": 1,
  "range": {
    "end": 412,
    "start": 387
  },
  "box": {
    "xmin": 0.68022,
    "ymin": 0.1618,
    "xmax": 0.92929,
    "ymax": 0.17627
  }
}

How to try it yourself

Everything on this page is reproducible. The sample, its schema, and the Parse and Extract API outputs are published. You can repeat the same two calls from whichever surface you already build on.

  • Claude Skilldescribe the job; the agent writes it
  • CLIno code at all
  • MCPexpose ADE docs as an agent tool
  • REST APIany language
  • Pythonlandingai-ade
  • TypeScriptlandingai-ade
Why LandingAI?

Documents into data

Accurate

The best accuracy on the difficult documents other tools get wrong, such as messy scans, complicated tables, checkboxes and handwriting.

Auditable

Every answer cites its sources. Values come back with an audit trail (page, bounding box, character range) so a human can review them.

Agentic

Applies multi-step reasoning, and plans before it acts. Handles documents it has never seen before and adapts to variations.

API-first

Composable APIs that drop into any tech stack and can be called from anywhere. Easy to build on and embed in your pipelines and products.

Affordable

Cost-competitive rates with complete price transparency. Spend controls before you run, and every job reports its exact cost.

Enterprise-grade

Built for production and scale from day one. Fully observable and monitored, running securely in our cloud or yours.

Built for high-volume, high-throughput production

  • Zero data retention
  • Priority rate limits
  • Enhanced support
  • VPC and on-prem deployment

Available on Team and Enterprise plans. VPC and on-prem deployment require an Enterprise plan.

Compare plans
Capabilities

Stool Test Report processing highlights

Markers grouped by section
Result, unit and interval
Qualitative results
Comparator values such as >500
Short-chain fatty acid profiles
Inflammation markers
Range-bar result rows
Footnote markers removed
Order and client numbers
Collected, received and reported dates
Lab name and CLIA ID
Commentary topics
FAQs

Questions, answered

Yes. Describe the result as a string in your schema. Each row's result comes back as printed, whether a number, a comparator value such as >500 or a word such as Negative.

Yes. Add the section as a field on each result row. Every marker comes back with the heading it sits under, such as inflammation or short-chain fatty acids, for as many sections as the panel prints.

Yes, when the schema asks for it. A marker name printed with an asterisk or a dagger comes back as the plain name, ready to match against your own marker list.

Yes. Every extracted value carries the character range it was quoted from in the parsed Markdown. The Ground API maps that range to a page and a bounding box, so each specimen date is shown on its labeled line.

Start extracting stool test report data

Reliable, structured outputs with full traceability in minutes