# BRAINIAC Freight Customs Shipping Document Extractor

> BRAINIAC Freight Customs Shipping Document Extractor is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-17).

Extracts and validates structured trade data (parties, line items, HS codes, Incoterms, etc.) from shipping documents such as commercial invoices and bills of lading.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/freight-customs/shipping-document-extract?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-freight-customs-shipping-document-extractor-b7ea9454
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MR1DnW-Sx3YkEo3LXEF2R

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability brainiac-freight-customs-shipping-document-extractor-b7ea9454 -d '<json body>'
```

Example prompt: Can you extract all the structured trade data from this commercial invoice PDF — I need the line items with HS codes, quantities, unit prices, gross weights, the seller and buyer details, the Incoterm, and the invoice reference number.

## When to prefer this

Choose this endpoint when you need to extract structured trade data from freight documents (commercial invoices, bills of lading, packing lists) in PDF or plain text form, especially when you need HS codes, Incoterm, party roles, and line-item financials in a single structured response. It is well-suited for customs pre-clearance workflows, TMS data ingestion, and document cross-checking. It does not file customs declarations or look up live duty rates — use it for extraction and validation only.

## Known failure modes

- Document is illegible or corrupt — extraction returns empty or partial fields
- File exceeds 12MB base64 limit — request rejected with validation error
- Unsupported media type submitted — only PDF and plain text are accepted
- Document is not a shipping/trade document — fields return empty with findings noting mismatch
- HS codes in document are ambiguous or absent — returned as candidates with limitations disclaimer
- Shipment lines exceed 80 items — additional items truncated
- No file or text provided — request fails schema validation

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

A JSON object containing: document type (e.g. commercial_invoice), invoice number, invoice date, reference, all line items (description, HS code, quantity, unit, unit price, amount, net/gross weight, volume, packages), all parties (name, role, address), Incoterm and year, named place, currency, total amount, total packages/weights/volume, vessel, voyage, container number, bill of lading number, port of loading/discharge, origin/destination country, declaration submitted flag, shipment booked flag, findings list, limitations list, and checkedAt timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "file": {
   "type": "object",
   "required": [
    "mediaType",
    "fileBase64"
   ],
   "properties": {
    "filename": {
     "type": "string",
     "maxLength": 180,
     "minLength": 1
    },
    "mediaType": {
     "enum": [
      "application/pdf",
      "text/plain"
     ],
     "type": "string"
    },
    "fileBase64": {
     "type": "string",
     "maxLength": 12000000,
     "minLength": 1
    }
   },
   "additionalProperties": false
  },
  "text": {
   "type": "string",
   "maxLength": 200000,
   "minLength": 1
  },
  "shipment": {
   "type": "object",
   "properties": {
    "lines": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "description"
      ],
      "properties": {
       "unit": {
        "type": "string",
        "maxLength": 20,
        "minLength": 1
       },
       "amount": {
        "type": "number",
        "maximum": 1000000000000,
        "minimum": 0
       },
       "hsCode": {
        "type": "string",
        "maxLength": 14,
        "minLength": 4
       },
       "packages": {
        "type": "integer",
        "maximum": 1000000,
        "minimum": 0
       },
       "quantity": {
        "type": "number",
        "maximum": 1000000000,
        "exclusiveMinimum": 0
       },
       "volumeM3": {
        "type": "number",
        "maximum": 1000000,
        "minimum": 0
       },
       "unitPrice": {
        "type": "number",
        "maximum": 1000000000000,
        "minimum": 0
       },
       "description": {
        "type": "string",
        "maxLength": 300,
        "minLength": 1
       },
       "netWeightKg": {
        "type": "number",
        "maximum": 1000000000,
        "minimum": 0
       },
       "grossWeightKg": {
        "type": "number",
        "maximum": 1000000000,
        "minimum": 0
       }
      },
      "additionalProperties": false
     },
     "maxItems": 80
    },
    "vessel": {
     "type": "string",
     "maxLength": 120,
     "minLength": 1
    },
    "voyage": {
     "type": "string",
     "maxLength": 40,
     "minLength": 1
    },
    "parties": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "role",
       "name"
      ],
      "properties": {
       "name": {
        "type": "string",
        "maxLength": 200,
        "minLength": 1
       },
       "role": {
        "enum": [
         "seller",
         "exporter",
         "buyer",
         "importer
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "lines": [
   {
    "unit": "pcs",
    "amount": 1200,
    "hsCode": "6109100010",
    "packages": null,
    "quantity": 100,
    "volumeM3": null,
    "unitPrice": 12,
    "description": "Cotton t-shirts",
    "netWeightKg": 40,
    "grossWeightKg": 46
   }
  ],
  "vessel": "",
  "voyage": "",
  "parties": [
   {
    "name": "Harbor Ink LLC",
    "role": "seller",
    "address": "12 Dock Street, Felixstowe"
   },
   {
    "name": "Northwind Paper Ltd",
    "role": "buyer",
    "address": ""
   }
  ],
  "currency": "GBP",
  "findings": [],
  "incoterm": "FOB",
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "reference": "SHP-1001",
  "namedPlace": "Felixstowe",
  "invoiceDate": "",
  "limitations": [
   "No customs declaration was submitted and no shipment was booked.",
   "Duty rates, restrictions, sanctions status, and country-specific requirements are not invented.",
   "An HS code candidate is not a customs classification.",
   "Only the documents and shipment fields in this request are compared."
  ],
  "totalAmount": 1200,
  "documentType": "commercial_invoice",
  "incotermYear": "",
  "invoiceNumber": "CI-1001",
  "originCountry": "",
  "portOfLoading": "",
  "totalPackages": null,
  "totalVolumeM3": null,
  "shipmentBooked": false,
  "containerNumber": "",
  "portOfDischarge": "",
  "totalNetWeightKg": null,
  "billOfLadingNumber": "",
  "destinationCountry": "",
  "totalGrossWeightKg": null,
  "declarationSubmitted": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-freight-customs-shipping-document-extractor-b7ea9454/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
