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

Extracting data from bills of lading

Ocean carriers and freight forwarders issue bills of lading on their own forms, each with numbered boxes for parties, vessel, ports and cargo. Importers, customs brokers and forwarders handle them for container shipments, and banks see them in letter of credit transactions. They arrive as scans, emailed PDFs or exports from a carrier's portal.

Operations needs the bill of lading number, the vessel and voyage, the ports of loading and discharge, and each container number. Those values feed a transport management system, which matches the shipment to its invoice and tracks the container to delivery.

Page 1 of a sample Bill of Lading, with extracted values outlined
4,627Markdown characters
92parse blocks
28fields extracted
The problem

What makes bills of lading hard

Captions share the value's cell

Each numbered box prints its caption and its typed value in one cell, so Port of Loading sits directly above the port it names.

A layout for every carrier

Every ocean carrier and forwarder prints its own bill, with the same parties, ports and cargo placed in different boxes.

Cargo runs onto riders

A long cargo description continues on a rider page, which repeats the bill's header and often carries the shipment totals.

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 bill of lading, end to end

About this document: A COSCO Container Lines bill of lading for one 40-foot container shipped from Beihai, China to New York, filed as an exhibit in a US court case. Two portrait pages, scanned on an office copier: the bill's face and a continuation rider that carries the totals. Page 1 is featured. A court reporter's exhibit sticker was erased from an empty box.

Processing objective: The objective is to identify the shipment: which bill, which vessel, from which port to which, and which container. A consignee matches those values against the arrival notice before the cargo is released. Each value grounds to its own numbered box on the face.

Demonstration fields: B/L number, Vessel, Port of loading, Port of discharge, Container number

The document

2 of 2 pages
  • Page 1 of the sample Bill of LadingPage 1shown below
  • Page 2 of the sample Bill of LadingPage 2

Where each value came from

Page 1 of the sample Bill of Lading, with every featured field outlined
B/L numberbill_of_lading_number
COSU6030603280
The region of the sample Bill of Lading containing B/L number, with the extracted value outlined
extraction_metadata["bill_of_lading_number"]
{
  "value": "COSU6030603280",
  "page": 1,
  "range": {
    "end": 263,
    "start": 227
  },
  "box": {
    "xmin": 0.75441,
    "ymin": 0.08072,
    "xmax": 0.93223,
    "ymax": 0.10249
  }
}
Vesselvessel
HUI JIN QIAO 181
The region of the sample Bill of Lading containing Vessel, with the extracted value outlined
extraction_metadata["vessel"]
{
  "value": "HUI JIN QIAO 181",
  "page": 1,
  "range": {
    "end": 1252,
    "start": 1206
  },
  "box": {
    "xmin": 0.10156,
    "ymin": 0.35112,
    "xmax": 0.3624,
    "ymax": 0.37685
  }
}
Port of loadingport_of_loading.city
BEIHAI, CHINA
The region of the sample Bill of Lading containing Port of loading, with the extracted value outlined
extraction_metadata["port_of_loading.city"]
{
  "value": "BEIHAI, CHINA",
  "page": 1,
  "range": {
    "end": 1293,
    "start": 1261
  },
  "box": {
    "xmin": 0.36239,
    "ymin": 0.35135,
    "xmax": 0.56632,
    "ymax": 0.37705
  }
}
Port of dischargeport_of_discharge.city
NEW YORK, NY
The region of the sample Bill of Lading containing Port of discharge, with the extracted value outlined
extraction_metadata["port_of_discharge.city"]
{
  "value": "NEW YORK, NY",
  "page": 1,
  "range": {
    "end": 1406,
    "start": 1373
  },
  "box": {
    "xmin": 0.10163,
    "ymin": 0.37659,
    "xmax": 0.36241,
    "ymax": 0.40445
  }
}
Container numbercontainers[0].container_number
CBHU1842324
The region of the sample Bill of Lading containing Container number, with the extracted value outlined
extraction_metadata["containers[0].container_number"]
{
  "value": "CBHU1842324",
  "page": 1,
  "range": {
    "end": 1780,
    "start": 1761
  },
  "box": {
    "xmin": 0.10003,
    "ymin": 0.42138,
    "xmax": 0.27707,
    "ymax": 0.44481
  }
}

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.

Compare plans
Capabilities

Bill of Lading processing highlights

Bill of lading number
Vessel and voyage
Ports of loading and discharge
Place of receipt and delivery
Shipper, consignee and notify party
Container numbers
Packages, weight and measurement
Cargo description
On-board and issue dates
Continuation rider pages
Scanned copies
Bounding box for every value
FAQs

Questions, answered

Yes. Define the containers as an array in your schema. Each container comes back as its own entry with its number and marks, for as many containers as the bill lists.

Yes. Parsing works from the page image, so a copier scan reads the same way as a digital PDF. Each value is grounded to the numbered box that prints it.

No. A schema names the fields you want and describes them in plain language. Extraction reads the parsed bill for meaning, so one schema covers each carrier's own layout and box numbering.

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 a reviewer sees each value in the box that printed it.

Start extracting bill of lading data

Reliable, structured outputs with full traceability in minutes