Parsel - Logistics PDF Parser avatar

Parsel - Logistics PDF Parser

Pricing

from $10.00 / 1,000 document parseds

Go to Apify Store
Parsel - Logistics PDF Parser

Parsel - Logistics PDF Parser

Submit any logistics PDF, get structured DCSA-aligned JSON back. Parses Bill of Lading, Customs Declaration, and Commercial Invoice into DCSA-aligned JSON via MCP tool interface.

Pricing

from $10.00 / 1,000 document parseds

Rating

0.0

(0)

Developer

Andrew Hutto

Andrew Hutto

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

5 days ago

Last modified

Categories

Share

npm version license CI

Parsel

Submit any logistics PDF, get structured DCSA-aligned JSON back.

An MCP tool that parses logistics PDFs using Gemini vision. Supports Bill of Lading, Customs Declaration, and Commercial Invoice. Returns structured JSON without OCR, templates, or local setup.

Supported Document Types

Document Typedocument_type valueKey Fields Extracted
Bill of Ladingbill_of_ladingShipper, consignee, notify party, vessel, voyage, ports of loading/discharge, containers, weights, HS codes, seal numbers, dates (32+ fields)
Customs Declarationcustoms_declarationDeclarant, customs office, tariff classifications, duties assessment, country of origin
Commercial Invoicecommercial_invoiceSeller, buyer, line items (quantity, unit price, extended value), total value, payment terms, incoterms

Connect

Claude Code

claude mcp add --transport http parsel https://tt6a1STd9c1tiDzXW.apify.actor/mcp \
--header "Authorization: Bearer YOUR_APIFY_TOKEN"

Cursor

Add to .cursor/mcp.json:

{
"mcpServers": {
"parsel": {
"url": "https://tt6a1STd9c1tiDzXW.apify.actor/mcp",
"headers": {
"Authorization": "Bearer YOUR_APIFY_TOKEN"
}
}
}
}

Claude Desktop

Add to claude_desktop_config.json:

{
"mcpServers": {
"parsel": {
"url": "https://tt6a1STd9c1tiDzXW.apify.actor/mcp",
"headers": {
"Authorization": "Bearer YOUR_APIFY_TOKEN"
}
}
}
}

LangChain

pip install langchain-mcp-adapters langgraph langchain-openai
import asyncio
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
async def main():
async with MultiServerMCPClient(
{
"parsel": {
"transport": "http",
"url": "https://tt6a1STd9c1tiDzXW.apify.actor/mcp",
"headers": {
"Authorization": "Bearer YOUR_APIFY_TOKEN"
},
}
}
) as client:
tools = await client.get_tools()
agent = create_react_agent("openai:gpt-4o", tools)
result = await agent.ainvoke(
{"messages": "Parse this bill of lading: <base64>"}
)
asyncio.run(main())

CrewAI

pip install crewai
from crewai import Agent, Task, Crew
agent = Agent(
role="Logistics Analyst",
goal="Extract structured data from shipping documents",
backstory="Expert in maritime logistics and trade documentation.",
mcps=["https://tt6a1STd9c1tiDzXW.apify.actor/mcp?token=YOUR_APIFY_TOKEN"],
)
task = Task(
description="Parse this bill of lading PDF: {document_url}",
expected_output="Structured DCSA-aligned JSON with shipper, consignee, vessel, and container details",
agent=agent,
)
crew = Crew(agents=[agent], tasks=[task])

Google ADK

pip install google-adk
from google.adk.agents import LlmAgent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import SseConnectionParams
root_agent = LlmAgent(
model="gemini-2.0-flash",
name="logistics_agent",
instruction="Use parse_logistics_document to extract data from shipping PDFs.",
tools=[
McpToolset(
connection_params=SseConnectionParams(
url="https://tt6a1STd9c1tiDzXW.apify.actor/mcp",
headers={"Authorization": "Bearer YOUR_APIFY_TOKEN"},
)
)
],
)

All examples require an Apify API token.

Tool Reference

The tool parse_logistics_document accepts:

ParameterTypeRequiredDescription
document_typestring enumYesbill_of_lading, customs_declaration, or commercial_invoice
document_base64stringOne of theseBase64-encoded PDF content
document_urlstring (URL)requiredHTTP/HTTPS URL of the PDF to fetch
request_idstringNoClient-provided idempotency key

Provide exactly one of document_base64 or document_url.

Agent Prompts

Example prompts for any agent connected to Parsel:

Parse the bill of lading at https://example.com/bol.pdf and return the shipper,
consignee, vessel name, port of loading, and port of discharge.
Extract all line items, HS codes, and total invoice value from this commercial invoice:
[attach or paste base64-encoded PDF]
What duties and tariff classifications are declared in this customs declaration?
https://example.com/customs-form.pdf

Sample Response

{
"extraction": {
"documentParties": {
"shipper": { "partyName": "ACME Exports Ltd" },
"consignee": { "partyName": "Global Imports Inc" }
},
"transportPlan": [{
"vessel": { "vesselName": "EVER GIVEN" },
"loadLocation": { "UNLocationCode": "CNSHA" },
"dischargeLocation": { "UNLocationCode": "USLAX" }
}],
"consignmentItems": ["..."]
},
"_metadata": {
"documentType": "bill_of_lading",
"schemaVersion": "1.0.0"
}
}

Pricing

$0.01 per successfully parsed document. Failed or incomplete extractions are not charged. Pay-per-use via Apify billing.