Take a live AI-guided product tour with Lando.Launch AI demo
Document type

Extracting data from stock purchase agreements

Each law firm drafts its stock purchase agreements with its own section numbering and defined terms. Lenders, insurers and regulators review the executed copy, often a scanned PDF from the closing set or a filing exhibit. A corporate archive holds one for every acquisition closed.

Reviewers extract the seller, the buyer, the target company, the shares sold, the purchase price and the closing terms. A contract management system stores them as the deal record, and the termination fee and outside date set the deadlines tracked after signing.

Page 32 of a sample Stock Purchase Agreement, with extracted values outlined
191,372Markdown characters
486parse blocks
39fields extracted
The problem

What makes stock purchase agreements hard

Values defined mid-sentence

Each party and figure is introduced inside a sentence with a defined term, such as (the "Purchase Price"), and later sections use only that term.

Terms spread across articles

Price adjustments, indemnity caps and termination rights sit in separate articles dozens of pages apart, each pointing back to the definitions article.

Agreements arrive inside filings

A purchase agreement often travels as an exhibit to an SEC report or regulatory application, whose cover pages restate the price in different words.

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 stock purchase agreement, end to end

About this document: An executed stock purchase agreement under which a holding company buys every share of the parent of a water and wastewater utility group. It was filed as an exhibit to a joint application with the Kentucky Public Service Commission. The 78-page filing is a raster scan, with the agreement on pages 31 to 75. Page 32, its first page of terms, is featured.

Processing objective: The objective is to capture the whole transaction from the agreement's first page of terms, where the recitals and Section 1.02 set it out. Each value grounds to its printed line on the scan, within the contract itself.

Demonstration fields: Seller, Buyer, Company whose stock is sold, Shares sold, Purchase price

The document

4 of 78 pages
  • Page 31 of the sample Stock Purchase AgreementPage 31
  • Page 32 of the sample Stock Purchase AgreementPage 32shown below
  • Page 33 of the sample Stock Purchase AgreementPage 33
  • Page 63 of the sample Stock Purchase AgreementPage 63

Where each value came from

Page 32 of the sample Stock Purchase Agreement, with every featured field outlined
Sellerseller.name
Nuon Global Solutions USA B.V.
The region of the sample Stock Purchase Agreement containing Seller, with the extracted value outlined
extraction_metadata["seller.name"]
{
  "value": "Nuon Global Solutions USA B.V.",
  "page": 32,
  "range": {
    "end": 40915,
    "start": 40823
  },
  "box": {
    "xmin": 0.1399,
    "ymin": 0.16186,
    "xmax": 0.86526,
    "ymax": 0.18004
  }
}
Buyerbuyer.name
Hydro Star, LLC
The region of the sample Stock Purchase Agreement containing Buyer, with the extracted value outlined
extraction_metadata["buyer.name"]
{
  "value": "Hydro Star, LLC",
  "page": 32,
  "range": {
    "end": 41009,
    "start": 40916
  },
  "box": {
    "xmin": 0.14106,
    "ymin": 0.17841,
    "xmax": 0.86507,
    "ymax": 0.19709
  }
}
Company whose stock is soldcompany.name
Nuon Global Solutions USA Inc.
The region of the sample Stock Purchase Agreement containing Company whose stock is sold, with the extracted value outlined
extraction_metadata["company.name"]
{
  "value": "Nuon Global Solutions USA Inc.",
  "page": 32,
  "range": {
    "end": 41240,
    "start": 41149
  },
  "box": {
    "xmin": 0.14191,
    "ymin": 0.27692,
    "xmax": 0.86596,
    "ymax": 0.29503
  }
}
Shares soldstock.number_of_shares
1,000
The region of the sample Stock Purchase Agreement containing Shares sold, with the extracted value outlined
extraction_metadata["stock.number_of_shares"]
{
  "value": 1000,
  "page": 32,
  "range": {
    "end": 41148,
    "start": 41070
  },
  "box": {
    "xmin": 0.1975,
    "ymin": 0.25951,
    "xmax": 0.86644,
    "ymax": 0.2779
  }
}
Purchase pricepurchase_price
192,500,000
The region of the sample Stock Purchase Agreement containing Purchase price, with the extracted value outlined
extraction_metadata["purchase_price"]
{
  "value": 192500000,
  "page": 32,
  "range": {
    "end": 42654,
    "start": 42560
  },
  "box": {
    "xmin": 0.14649,
    "ymin": 0.70523,
    "xmax": 0.87003,
    "ymax": 0.72522
  }
}

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

Stock Purchase Agreement processing highlights

Parties and target company
Shares, class and par value
Purchase price and payment
Defined terms resolved
Closing time and location
Parent guarantors
Termination fee and outside date
Governing law
Signature blocks
Fully scanned agreements
Agreements inside larger filings
Line-level visual grounding
FAQs

Questions, answered

Yes. Describe each party and figure in the schema. Extraction returns the value the definition names, such as the company behind "Seller", and grounds it to the sentence where the term is introduced.

Yes. DPT-3 Pro is the default parse model. It handles scanned documents and grounds text down to the visual line. A signed agreement scanned as images reads like a digital PDF. Each value points to the printed line that holds it.

Describe each field as the agreement's own term, and extraction takes it from the contract's text. A value restated elsewhere in the filing carries a range for each place it appears, so a reviewer sees both.

Parse Jobs on the standard tier accept PDFs of up to 6,000 pages. The Extract API accepts input of any size. A full agreement with its schedules and exhibits goes through as one job.

Every value quoted from the agreement carries the character ranges it came from in the parsed Markdown. The Ground API maps those ranges to page numbers and bounding boxes, so a reviewer sees each value on its page.

Start extracting stock purchase agreement data

Reliable, structured outputs with full traceability in minutes