Turn messy shipping documents into clean, structured JSON.
Parses Bills of Lading, freight invoices, and packing lists. Built for freight forwarders, logistics platforms, and supply chain software.
| Endpoint | Input | Output | Price |
|---|---|---|---|
POST /parse-bol |
Bill of Lading text | Shipper, consignee, containers, ports, weights, HS codes | $0.15/doc |
POST /parse-freight-invoice |
Freight invoice text | Charges breakdown, line items, references, totals | $0.15/doc |
POST /parse-packing-list |
Packing list text | Items, quantities, weights, dimensions, HS codes | $0.10/doc |
cd freightparse-api
pip install -r requirements.txt
# Set API key
set ANTHROPIC_API_KEY=sk-ant-xxxxx # Windows
export ANTHROPIC_API_KEY=sk-ant-xxxxx # Linux/Mac
# Run
python main.pyOpen http://localhost:8000/docs for interactive API docs.
python test_api.pycurl -X POST http://localhost:8000/parse-bol \
-H "Content-Type: application/json" \
-H "X-API-Key: test-key" \
-d '{
"text": "BILL OF LADING\nB/L No: MEDU4712839\nSHIPPER: Guangzhou Sunrise...",
"carrier_hint": "MSC"
}'Response:
{
"bol_number": "MEDU4712839",
"shipper": {
"name": "Guangzhou Sunrise Electronics Co., Ltd",
"address": "No. 188 Huangpu East Road, Guangzhou, Guangdong 510700, China"
},
"consignee": {
"name": "Pacific Coast Distributors Inc.",
"address": "2847 Harbor Blvd, Suite 400, Long Beach, CA 90802, USA"
},
"carrier": "Mediterranean Shipping Company (MSC)",
"vessel_name": "MSC ISABELLA",
"port_of_loading": "Nansha, China",
"port_of_discharge": "Long Beach, USA",
"containers": [
{"number": "MSCU7834521", "size": "40HC", "seal_number": "CN2847391", "weight_kg": 18450.0},
{"number": "MSCU9912847", "size": "40HC", "seal_number": "CN2847392", "weight_kg": 21200.0}
],
"gross_weight_kg": 39650.0,
"hs_codes": ["8528.52", "8528.59"],
"freight_terms": "PREPAID",
"confidence": 0.95
}railway login && railway init && railway up
railway variables set ANTHROPIC_API_KEY=sk-ant-xxxxxfly launch
fly secrets set ANTHROPIC_API_KEY=sk-ant-xxxxx
fly deploydocker build -t freightparse-api .
docker run -p 8000:8000 -e ANTHROPIC_API_KEY=sk-ant-xxxxx freightparse-api- Deploy to Railway or Fly.io (get public URL)
- Go to https://rapidapi.com/provider
- Create new API, import
rapidapi_spec.yaml - Set base URL to your deployed app
- Configure
RAPIDAPI_PROXY_SECRETin your deployment environment - Set pricing tiers and publish
| Tier | Requests/mo | Price | Target Customer |
|---|---|---|---|
| Free | 50 | $0 | Evaluation |
| Basic | 2,000 | $29/mo | Small forwarder |
| Pro | 20,000 | $149/mo | Mid-size logistics |
| Enterprise | 100,000 | $499/mo | Platform integration |
- Claude API cost: ~$0.02 per document
- At $0.15/doc with 87% margin: profitable from day one
- Manual processing cost: $3.33/doc — you save customers 95%
- Break even on hosting: ~200 calls/month
Two auth modes:
- RapidAPI: Set
RAPIDAPI_PROXY_SECRETenv var. RapidAPI sends it inX-RapidAPI-Proxy-Secretheader. - Direct: Set
API_KEYSenv var (comma-separated). Callers send key inX-API-Keyheader.
MIT