# US Customs Bill-of-Lading & Import Intelligence (ImportYeti) (`xtracto/us-customs-bol`) Actor

Extract US maritime import intelligence per company — supplier relationships, shipment volume, HS codes, TEU, and contacts — from ImportYeti. Underlying data is US CBP vessel-manifest public record.

- **URL**: https://apify.com/xtracto/us-customs-bol.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Lead generation, Other
- **Stats:** 11 total users, 2 monthly users, 88.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## US Customs Bill-of-Lading & Import Intelligence (ImportYeti)

Extract **US maritime import intelligence** for any company — its overseas **supplier relationships**, **shipment volume**, **HS codes**, **TEU**, multi-location addresses, and **direct contacts** — sourced from ImportYeti. The underlying data class is **US CBP vessel-manifest (bill-of-lading) public record**.

Built for equity/credit analysts (import volume as a COGS/revenue signal), B2B sales teams hunting a competitor's real suppliers, and supply-chain risk desks.

***

### Why use this actor

- **No account, no API key.** Reads the public company page.
- **Rich aggregate per company** — not just a name: total shipments, 12-month shipments, average TEU/month, total shipping cost, top supplier, country mix, HS codes, time-series, phone, website, and up to five geocoded addresses.
- **Stable extraction** — pulls the structured company object directly from the page's embedded data (Next.js RSC flight), not brittle HTML scraping.

### Input

| Field | Description |
| --- | --- |
| `companies` | ImportYeti company slug (`apple`) or a full `/company/<slug>` URL. |
| `maxConcurrency` | Companies in parallel (default 3). |
| `proxyConfiguration` | Cloudflare-fronted; residential recommended at scale. |

### Output — `COMPANY_PROFILE`

Dataset envelope (`_input`, `_source`, `_scrapedAt`) + `recordType: "COMPANY_PROFILE"`, then the ImportYeti company aggregate **with upstream field names preserved**:

```json
{
  "_input": "apple",
  "_source": "S2-nextflight",
  "_scrapedAt": "2026-06-03T10:00:00Z",
  "recordType": "COMPANY_PROFILE",
  "company_slug": "apple",
  "profile_url": "https://www.importyeti.com/company/apple",
  "ld_name": "Apple - ... - company Report - Import Yeti",
  "ld_description": "Apple's top supplier is Hon Hai Precision Industrial ... with 2449 shipments",
  "company_name": "...",
  "company_address_country_name": "...",
  "total_shipments": 0,
  "shipments_12m": 0,
  "avg_teu_per_month": 0,
  "total_shipping_cost": 0,
  "company_website": "...",
  "company_phone_number": "...",
  "company_hs_codes": [],
  "company_time_series": [],
  "company_address_loc1": "...", "company_address_loc1_lat": 0, "company_address_loc1_long": 0
  // ... ~90 upstream fields total, verbatim
}
```

`_source` is `S2-nextflight` when the embedded aggregate is found, or `S1-ldjson` (summary only) as a degraded fallback. If neither layer yields data the record is an `_error: "no_data_extracted"` — **never a silent empty object**.

**`PRODUCT_BREAKDOWN`** (one per top HTS-code group embedded in the page — raw upstream fields):

```json
{
  "_input": "apple",
  "_source": "S2-nextflight",
  "_scrapedAt": "2026-06-03T10:00:00Z",
  "recordType": "PRODUCT_BREAKDOWN",
  "company_slug": "apple",
  "hts_code": "8504.40.9999",
  "description": "Static converters",
  "shipments": 128,
  "most_recent_shipment": "26/07/2019",
  "bol_number": "FTNVHKOAHS001319",
  "product_description": "2100Pcs Of Power Adapter ... From China To United States Via Hong Kong By Truck"
}
```

### How it works

1. Fetch `GET /company/<slug>` with a `curl_cffi` (`chrome131`) TLS profile (passes Cloudflare).
2. Parse the `application/ld+json` WebPage block for the summary.
3. Decode the `self.__next_f` RSC flight fragments and lift the company aggregate object with a balanced-brace walker anchored on `avg_teu_per_month` (with fallback anchors).
4. Emit one `COMPANY_PROFILE` per company.

### Known limits & roadmap

- **WAF:** Cloudflare. Plain requests pass in testing; `curl_cffi chrome131` used for safety, residential proxy at scale.
- **Full per-shipment BoL rows are NOT available anonymously.** Recon (2026-06-03) found the backend API `https://data.importyeti.com/v1.0/company/<slug>` returns **HTTP 401** without a token — the SSR page is rendered server-side with that data, and the embedded JSON only exposes the company aggregate + the **top-10 HTS product groups** (each with a shipment count and one sample BoL number), which this actor extracts. A complete BoL feed would require ImportYeti's authenticated/paid API or a primary CBP/FOIA data source.
- **RSC format drift:** the flight chunk shape can change on a Next.js upgrade. The walker tries multiple anchor keys and **fails loud** (`no_data_extracted`) rather than emitting partial garbage — monitor the error rate.
- **ToS / provenance:** this reads ImportYeti's aggregation; the underlying CBP manifest is public record. For durable, high-volume use, evaluate a primary CBP/FOIA bulk feed.
- **Verified live 2026-06-03:** `/company/apple` → 200, 771KB, 90-field aggregate extracted cleanly.

# Actor input Schema

## `companies` (type: `array`):

ImportYeti company slug (e.g. 'apple') or a full /company/<slug> URL.

## `maxConcurrency` (type: `integer`):

Max concurrent companies

## `proxyConfiguration` (type: `object`):

Recommended at scale. Residential proxy keeps success high for large jobs.

## Actor input object example

```json
{
  "companies": [
    "apple",
    "https://www.importyeti.com/company/tesla"
  ],
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "companies": [
        "apple",
        "https://www.importyeti.com/company/tesla"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/us-customs-bol").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "companies": [
        "apple",
        "https://www.importyeti.com/company/tesla",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("xtracto/us-customs-bol").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "companies": [
    "apple",
    "https://www.importyeti.com/company/tesla"
  ]
}' |
apify call xtracto/us-customs-bol --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xtracto/us-customs-bol"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/GkDZ8DihpdbVsvC8Y/builds/PgeSx6IikUb36HKJn/openapi.json
