Extract Customs Declaration Extractor Data — Automate Operations

Supply chain operations process thousands of shipping documents daily. Manual data entry causes delays and inventory errors.

156
Fields Extracted
360s
Max Processing

What This Template Does

AI-powered extraction using gemini-2.5-flash. Part of 113 production-ready templates.

Capabilities

  • Logistics Extraction
  • Customs Declaration Processing
  • Duty Calculation
  • Customs
  • Declaration

Output Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Customs Declaration Extraction Schema",
  "description": "JSON Schema for Customs Declaration document extraction output supporting US CBP, EU SAD, and other national customs formats",
  "type": "object",
  "required": [
    "document_type",
    "declaration_number"
  ],
  "properties": {
    "document_type": {
      "type": "string",
      "const": "customs_declaration",
      "description": "Document type identifier"
    },

...

Quick Start

$ pip install doclayer
$ doclayer process document.pdf --agent logistics.customs-declaration

See It In Action

Real extraction example showing input document and structured output.

Input Document
U.S. CUSTOMS AND BORDER PROTECTION
ENTRY SUMMARY - CBP FORM 7501

Entry Number: 123-4567890-1
Entry Filer Code: ABC
Entry Type: 03 - Consumption Entry
Entry Date: September 15, 2024
Entry Summary Date: September 18, 2024

Port of Entry: 2704 - Los Angeles/Long Beach
District/Port: Los Angeles, CA

IMPORTER OF RECORD
Advanced Tech Imports LLC
8500 Wilshire Boulevard, Suite 300
Beverly Hills, CA 90211
EIN: 95-4567890
Importer Number: 95-4567890
Bond Number: STB-9876543
Bond Type: Continuous

CONSI
Extracted Data
{
  "document_type": "customs_declaration",
  "declaration_type": "import",
  "form_type": "CBP 7501",
  "declaration_number": "123-4567890-1",
  "declaration_date": "2024-09-18",
  "customs_office": {
    "entry_port": "2704 - Los Angeles/Long Beach",
    "customs_office_code": "2704",
    "district_port": "Los Angeles, CA",
    "country": "United States"
  },
  "importer_exporter": {
    "name": "Advanced Tech Imports LLC",
    "address": "8500 Wilshire Boulevard, Suite 300, Beverly Hills, CA 90211",
    "country": "United States",
    "importer_number": "95-4567890",
    "eori_number": null,
    "ein_ssn": "95-4567890",
    "bond_number": "STB-9876543",
    "bond_type": "Continuous"
  },
  "consignee": {
    "name": "Advanced Tech Imports LLC",
    "address": "8500 Wilshire Boulevard, Suite 300, Beverly Hills, CA 90211",
    "id_number": "95-4567890"
  },
  "exporter_manufacturer": {
    "name": "Shenzhen Electronics Manufacturing Co., Ltd",
    "address": "Building 12, Nanshan Technology Park, Shenzhen, Guangdong 518057",
    "country": "China",
    "mid": "CNSZEMFG12345"
  },
  "broker_agent": {
    "name": "Pacific Gateway Customs Brokers Inc.",
    "license_number": "12345",
    "address": "2100 E. Wardlow Road, Long Beach, CA 90807",
    "phone": "(562) 555-8900",
    "reference": "PGCB-2024-09-7821"
  },
  "transport_info": {
    "mode_of_transport": "Sea",
    "carrier_code": "MSCU",
    "vessel_aircraft": "MSC AURORA",
    "voyage_flight": "AR428W",
    "bill_of_lading": "MSCU2409LA456789",
    "master_bill": "MSCU2409LA456789",
    "house_bill": null,
    "export_date": "2024-09-01",
    "import_date": "2024-09-12",
    "arrival_date": "2024-09-12"
  },
  "countries": {
    "country_of_origin": "China",
    "country_of_export": "China",
    "country_of_destination": "United States"
  },
  "line_items": [
    {
      "line_number": "001",
      "description": "LAPTOP COMPUTERS, PORTABLE",
      "hs_code": "8471.30.0100",
      "tariff_description": "Laptop computers, portable",
      "country_of_origin": "CN",
      "quantity_1": 2000,
      "uom_1": "PCS",
      "quantity_2": 1500,
      "uom_2": "KG",
      "gross_weight": 1650,
      "net_weight": 1500,
      "entered_value": 1200000,
      "currency": "USD",
      "duty_rate": "0.0%",
      "duty_amount": 0,
      "preference_code": null,
      "preference_claimed": "MFN",
      "anti_dumping": false,
      "ad_rate": null,
      "countervailing": false,
      "cvd_rate": null,
      "quota_category": null
    },
    {
      "line_number": "002",
      "description": "TABLETS, PORTABLE DIGITAL",
      "hs_code": "8471.30.0100",
      "tariff_description": "Tablets, portable digital",
      "country_of_origin": "CN",
      "quantity_1": 3000,
      "uom_1": "PCS",
      "quantity_2": 900,
      "uom_2": "KG",
      "gross_weight": 1020,
      "net_weight": 900,
      "entered_value": 600000,
      "currency": "USD",
      "duty_rate": "0.0%",
      "duty_amount": 0,
      "preference_code": null,
      "preference_claimed": "MFN",
      "anti_dumping": false,
      "ad_rate": null,
      "countervailing": false,
      "cvd_rate": null,
      "quota_category": null
    },
    {
      "line_number": "003",
      "description": "LITHIUM-ION BATTERY PACKS FOR LAPTOPS",
      "hs_code": "8507.60.0020",
      "tariff_description": "Lithium-ion battery packs",
      "country_of_origin": "CN",
      "quantity_1": 5000,
      "uom_1": "PCS",
      "quantity_2": 250,
      "uom_2": "KG",
      "gross_weight": 300,
      "net_weight": 250,
      "entered_value": 125000,
      "currency": "USD",
      "duty_rate": "3.4%",
      "duty_amount": 4250,
      "preference_code": null,
      "preference_claimed": "MFN",
      "anti_dumping": false,
      "ad_rate": null,
      "countervailing": false,
      "cvd_rate": null,
      "quota_category": null
    }
  ],
  "value_info": {
    "transaction_value": 1925000,
    "currency": "USD",
    "exchange_rate": 1,
    "additions": {
      "packing_costs": 0,
      "selling_commission": 0,
      "assists": 0,
      "royalties": 0,
      "proceeds": null
    },
    "deductions": {
      "freight_after_import": 0,
      "insurance_after_import": null,
      "duties_taxes": null
    },
    "total_customs_value": 1925000
  },
  "duties_taxes": {
    "total_duty": 4250,
    "total_mpf": 575.35,
    "total_hmf": 2406.25,
    "total_taxes": 0,
    "total_ad_cvd": 0,
    "total_other_fees": 0,
    "grand_total": 7231.6
  },
  "eu_sad_specific": null,
  "us_cbp_specific": {
    "entry_type": "03",
    "entry_type_description": "Consumption Entry",
    "entry_number": "123-4567890-1",
    "entry_filer_code": "ABC",
    "entry_summary_date": "2024-09-18",
    "surety_code": null,
    "missing_documents": null,
    "team_number": null,
    "live_entry_date": "2024-09-15",
    "pga_flags": null,
    "abi_transmitted": true
  },
  "licenses_permits": {
    "import_license": null,
    "export_license": null,
    "license_type": null,
    "fda_registration": null,
    "usda_permit": null,
    "epa_certification": null,
    "fcc_certification": null,
    "other_permits": []
  },
  "container_info": [
    {
      "container_number": "MSCU4521987",
      "seal_number": "SZ2024-7891",
      "size_type": null
    },
    {
      "container_number": "MSCU4521988",
      "seal_number": "SZ2024-7892",
      "size_type": null
    }
  ],
  "payment_info": {
    "payment_method": "Periodic Monthly Statement (PMS)",
    "payment_date": null,
    "payment_reference": null,
    "payer_id": "95-4567890"
  },
  "declarations_certifications": {
    "nafta_usmca_certificate": false,
    "certificate_origin": false,
    "origin_declaration_text": "MFN - Most Favored Nation",
    "signature": "Robert Chen",
    "date_signed": "2024-09-18"
  },
  "status": {
    "declaration_status": "Released",
    "release_date": "2024-09-16",
    "liquidation_date": null,
    "exam_required": false,
    "hold_reason": null
  },
  "validation": {
    "all_fields_complete": true,
    "hs_codes_valid": true,
    "values_consistent": true,
    "duties_calculated": true
  }
}

CBP Form 7501 Entry Summary for electronics import into Los Angeles port. Documents importer of record, bond type, commodity classifications, duties calculated, and compliance with customs regulations for entry consumption.

Frequently Asked Questions

What documents can Customs Declaration Extractor process?

The Customs Declaration Extractor template processes logistics documents including various formats and layouts. See the instructions for specific document types supported.

How accurate is the Customs Declaration Extractor extraction?

The Customs Declaration Extractor template uses Gemini 2.5 Flash for high-accuracy extraction. Results include confidence scores for each field.

Can I customize the Customs Declaration Extractor template?

Yes, you can modify the extraction schema, add custom fields, or adjust the instructions to match your specific requirements.

Start Extracting Data Today

Process your first document in under 5 minutes. No credit card required.