# Bill Of Lading Scraper (`codingfrontend/bill-of-lading-scraper`) Actor

Public-page metadata extraction Actor for the inventory entry Bill Of Lading Scraper.

- **URL**: https://apify.com/codingfrontend/bill-of-lading-scraper.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 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.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does the Bill of Lading Scraper do?

This Actor reads public ImportYeti company or shipment pages and extracts explicitly published bill-of-lading records. It can normalize BOL number, bill type, master BOL number, arrival and departure dates, importer/company, supplier, notify party, origin and destination ports, public geocodes, commodity description, and container IDs/descriptions when those values are present in public page data.

The Actor uses bounded public HTTPS requests and may use an optional standard Apify Proxy route. It does not call a paid ImportYeti API, require login, infer shipment values, solve CAPTCHAs, or bypass authentication, paywalls, robots restrictions, or anti-bot challenges. If the source presents a challenge or does not publish explicit BOL data, the run emits a typed diagnostic row and records the result in `OUTPUT_SUMMARY`.

### Why use the Bill of Lading Scraper?

ImportYeti’s public site provides company search and public customs-shipment context. A normalized BOL row keeps the public supply-chain fields together while retaining the source page for review. The parser accepts public JSON-LD, embedded JSON, Next data, and visible BOL-number text, removes duplicates, and never fabricates a shipment.

### How to use the Bill of Lading Scraper

Provide `startUrls` with public ImportYeti company or shipment pages, or provide `companyNames` to build public company paths. `maxPages` bounds pages and `maxItems` bounds records. `timeoutSecs`, `requestDelayMillis`, and `maxRetries` bound direct request work.

For deterministic local validation, set `fixturePath` to the supplied HTML fixture. Fixture mode uses the same parser, normalization, validation, and output path without contacting ImportYeti. The run summary also records request, retry, page, filtering, and data-availability counters.

### Input

```json
{
  "startUrls": [{"url": "https://www.importyeti.com/company/example"}],
  "maxPages": 1,
  "maxItems": 2,
  "timeoutSecs": 45,
  "requestDelayMillis": 500,
  "maxRetries": 1
}
```

Only public HTTPS `importyeti.com` URLs are accepted. `maxPages` is a total page budget across the supplied start URLs and explicit `rel="next"` links; `maxItems` is a global record cap. Fixture paths must be repository-relative HTML or JSON files and cannot escape the Actor directory. `proxyConfiguration` selects only the standard Apify Proxy route; proxy use remains transparent and fail-closed.

### Output

Normal rows contain public BOL fields plus `sourceUrl`, `sourceDomain`, `searchUrl`, `pageNum`, and `scrapedAt`. Diagnostics contain `recordType: "diagnostic"`, `diagnosticType`, source URL/domain, `error`, `errorCode`, and `scrapedAt`; inventory metadata, evidence dumps, transport labels, and debug payloads are not emitted in dataset rows.

Example:

```json
{
  "bolNumber": "MAEU123456789",
  "companyName": "Example Importer",
  "supplierName": "Example Supplier",
  "arrivalDate": "2026-08-15",
  "destinationPort": "Los Angeles",
  "commodityDescription": "Vehicle parts",
  "sourceUrl": "https://www.importyeti.com/company/example",
  "sourceDomain": "www.importyeti.com",
  "scrapedAt": "2026-09-10T00:00:00.000Z"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Data table

| Field | Meaning |
| --- | --- |
| `bolNumber`, `masterBolNumber`, `billType` | Public shipment identity. |
| `companyName`, `supplierName`, `notifyPartyName` | Public shipment parties. |
| `arrivalDate`, `departureDate`, `originPort`, `destinationPort` | Public movement context. |
| `commodityDescription`, `containerCount`, `containerIds` | Public cargo/container fields. |
| `sourceUrl`, `sourceDomain`, `searchUrl`, `pageNum`, `scrapedAt` | Public source provenance and observation time. |
| `url`, `error`, `errorCode`, `diagnosticType` | Typed diagnostic fields when unavailable. |

### How much does it cost to scrape ImportYeti?

Local fixture validation uses local compute only. A deployed run’s cost depends on direct request time, page count, and dataset size under the selected Apify plan. Keep limits, delays, timeouts, and retries bounded for predictable work.

### Tips or Advanced options

Start with one public company page and a small `maxItems`. Use a modest delay for multiple pages. `SOURCE_CHALLENGE` is an honest source result; increasing retries does not bypass a challenge.

### FAQ, disclaimers, and support

Public customs data can change, be delayed, or disappear. The Actor reports only fields present in the public response and does not guarantee completeness, legal provenance, ownership, or accuracy. Check ImportYeti terms and robots guidance and follow applicable privacy, compliance, and data-use laws. Use the project Issues tab for feedback or authorized integration requests.

### Local validation

```bash
npm install
node --test test/public-contract.test.js
apify validate-schema
apify run --purge --input-file test/inputs/fixture.json
node validate-datasets.js
```

# Actor input Schema

## `startUrls` (type: `array`):

Optional public HTTPS ImportYeti company or shipment pages to inspect.

## `companyNames` (type: `array`):

Public company names used to build ImportYeti company pages, for example walmart.

## `maxPages` (type: `integer`):

Maximum public company or shipment pages to inspect.

## `maxItems` (type: `integer`):

Maximum structured public BOL records to emit.

## `timeoutSecs` (type: `integer`):

Maximum time allowed for each direct public request.

## `requestDelayMillis` (type: `integer`):

Delay between direct public requests.

## `maxRetries` (type: `integer`):

Attempts for transient failures; source challenges are not bypassed.

## `fixturePath` (type: `string`):

Optional repository-relative HTML or JSON fixture for deterministic checks.

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

Optional Apify Proxy configuration for the public ImportYeti route. It remains transparent and fail-closed; no CAPTCHA or access-control bypass is attempted.

## Actor input object example

```json
{
  "maxPages": 5,
  "maxItems": 50,
  "timeoutSecs": 45,
  "requestDelayMillis": 500,
  "maxRetries": 1,
  "fixturePath": "",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

## `runHealth` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/bill-of-lading-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/bill-of-lading-scraper").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 '{}' |
apify call codingfrontend/bill-of-lading-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codingfrontend/bill-of-lading-scraper"
        }
    }
}
```

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/gLCHVFAoL4zhZVM0c/builds/M0FACKeBULciX2pvW/openapi.json
