{"uid":"cap_MR1DnW-Sx3YkEo3LXEF2R","slug":"brainiac-freight-customs-shipping-document-extractor-b7ea9454","name":"BRAINIAC Freight Customs Shipping Document Extractor","description":"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.","url":"https://www.brainiac.software/api/v1/freight-customs/shipping-document-extract?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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","consignee","shipper","notify"],"type":"string"},"address":{"type":"string","maxLength":400,"minLength":1}},"additionalProperties":false},"maxItems":12},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","maxLength":80,"minLength":3},"reference":{"type":"string","maxLength":80,"minLength":1},"namedPlace":{"type":"string","maxLength":160,"minLength":1},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"totalAmount":{"type":"number","maximum":1000000000000,"minimum":0},"invoiceNumber":{"type":"string","maxLength":80,"minLength":1},"originCountry":{"type":"string","maxLength":80,"minLength":2},"portOfLoading":{"type":"string","maxLength":120,"minLength":1},"totalPackages":{"type":"integer","maximum":1000000,"minimum":0},"totalVolumeM3":{"type":"number","maximum":1000000,"minimum":0},"containerNumber":{"type":"string","maxLength":20,"minLength":1},"portOfDischarge":{"type":"string","maxLength":120,"minLength":1},"totalNetWeightKg":{"type":"number","maximum":1000000000,"minimum":0},"billOfLadingNumber":{"type":"string","maxLength":80,"minLength":1},"destinationCountry":{"type":"string","maxLength":80,"minLength":2},"totalGrossWeightKg":{"type":"number","maximum":1000000000,"minimum":0}},"additionalProperties":false}}},"responseSchema":{"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}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_AG65q0ObyFlk9C3zZ8juF","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts and validates structured trade data (parties, line items, HS codes, Incoterms, etc.) from shipping documents such as commercial invoices and bills of lading.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Customs pre-clearance data extraction","prompt":"I have a PDF commercial invoice for a shipment of cotton t-shirts — can you pull out all the line items with their HS codes, quantities, unit prices, net and gross weights, the seller and buyer names and addresses, the Incoterm, and the invoice number so I can prepare the customs declaration?"},{"title":"Freight document cross-check","prompt":"Here's the text of our bill of lading and the shipment details I have on file — seller is Harbor Ink LLC, buyer is Northwind Paper Ltd, 100 pcs of cotton t-shirts at GBP 12 each, FOB Felixstowe. Can you extract what the document actually says and flag any discrepancies?"},{"title":"Invoice data ingestion for TMS","prompt":"I need to ingest this commercial invoice into our transport management system — can you parse the PDF and give me structured JSON with the document type, invoice number, all cargo lines with HS codes and weights, all parties with their roles, currency, and total amount?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-17T00:37:08.360Z","isFirstParty":false,"canonicalSlug":"brainiac-freight-customs-shipping-document-extractor-b7ea9454"}