Logistics data scraping
Logistics data is the schedule, pricing and status data carriers, ports and freight platforms publish on their websites: vessel schedules, freight rates, surcharges and terminal updates. Zenrows fetches those protected carrier and port pages, runs schedule search forms when needed, and returns structured JSON your forwarding or visibility platform can load.
Updated
{
"source": "carrier_schedule",
"carrier": "Example Line",
"origin": { "port": "Shanghai", "unlocode": "CNSHA" },
"destination": { "port": "Rotterdam", "unlocode": "NLRTM" },
"service": "AE7",
"vessel": "EXAMPLE EXPRESS",
"voyage": "442W",
"etd": "2026-10-27T18:00:00+08:00",
"eta": "2026-11-29T06:00:00+01:00",
"transit_days": 33,
"transshipments": [],
"cutoffs": {
"documentation": "2026-10-23T12:00:00+08:00",
"cargo": "2026-10-25T17:00:00+08:00"
},
"fetched_at": "2026-10-17T07:00:00Z"
}
What logistics teams collect from the web
Forwarders, freight marketplaces and visibility platforms need the same facts from dozens of carriers: when it sails, what it costs, what is happening at the terminal.
Most carriers publish these on their site before, or instead of, an API.
| Job | Data you collect | Typical sources |
|---|---|---|
| Ocean schedule tracking | Vessel, voyage, service, ETD, ETA, transit, cutoffs per lane | |
| Port and terminal status | Berthing plans, gate hours, container availability, advisories | APM Terminals and port authority vessel-call pages |
| Air cargo schedules and status | Flights, air waybill status, embargo and capacity notices | AF-KLM Cargo, Lufthansa Cargo, Turkish Cargo, Etihad Cargo |
| Freight rate and surcharge benchmarking | Spot rates, GRI notices, bunker and peak season surcharges | Carrier tariff and advisory pages, freight marketplaces |
| Parcel service and pricing | Service levels, rate tables, fuel and delivery area surcharges | USPS, |
| Warehouse and industrial space | Location, size, asking rent, dock doors, availability | Crexi, broker listings |
Why carrier websites are hard to scrape
Forwarders and platforms query carrier and terminal sites constantly, so carriers protect them.
And the data is rarely in the HTML.
Cloudflare, Akamai or fingerprint checks return 403s and challenges
Zenrows' stealth gets through Cloudflare and Akamai, rendering when needed
Nothing until you enter origin, destination and date
Page actions fill and submit the form first
An empty shell; sailings arrive as background JSON
Zenrows returns the captured XHR calls with the result
Twenty carriers, twenty ways to write port, date and voyage
Extract gives consistent fields to map to UN/LOCODE
Surcharge and GRI notices across paged lists
Crawl the advisory section with an include pattern, as Markdown
Every lane re-read when schedules roll forward
Batch runs the lane list as one job
How to collect logistics data with Zenrows
- List your lanes and sources: the origin-destination pairs you quote and the carriers, terminals and cargo airlines serving them.
- Find where the data lives: in the HTML or a background JSON call.
- Fetch one lane per request, with page actions for forms and XHR capture for internal APIs, both in a full browser render.
- Refresh the whole lane list in Batch, daily for terminals and weekly for sailings, storing each run timestamped.
# pip install requests
import json
import requests
params = {
"apikey": "YOUR_ZENROWS_API_KEY",
"url": "SCHEDULE_SEARCH_URL", # a carrier's point-to-point schedule page
"js_render": "true",
"premium_proxy": "true",
"json_response": "true", # include the background API calls in the result
"js_instructions": json.dumps([
{"fill": ["#origin", "Shanghai"]},
{"fill": ["#destination", "Rotterdam"]},
{"click": "button[type=submit]"},
{"wait_for": ".schedule-results"},
]),
}
response = requests.get("https://api.zenrows.com/v1/", params=params)
print(response.json()) # selectors are illustrative; match them to the carrier// One Batch job for every lane URL you track
const lanes = [
{ url: "LANE_URL_CNSHA_NLRTM", id: "CNSHA-NLRTM" },
{ url: "LANE_URL_SGSIN_USLAX", id: "SGSIN-USLAX" },
];
const res = await fetch("https://async.api.zenrows.com/v1/jobs", {
method: "POST",
headers: { "X-API-Key": "YOUR_ZENROWS_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
type: "regular",
status: "closed",
zenrows_params: { mode: "auto", extract: "auto" },
tasks: lanes.map((lane) => ({ url: lane.url, external_id: lane.id })),
}),
});
const job = await res.json();
console.log("submitted", job.job_id);npx -y @zenrows/cli init
# Read one carrier advisory page as Markdown before you write a parser
zenrows fetch ADVISORY_URL --output markdown
# lanes.jsonl: one {"url": "LANE_URL"} per line
zenrows batch create lanes.jsonl --wait
zenrows batch results <job-id> --out lanes-results.jsonl# Connect once
claude mcp add zenrows -e ZENROWS_API_KEY=YOUR_ZENROWS_API_KEY -- npx -y @zenrows/mcp
# Then ask:
Use Zenrows to open the Maersk point-to-point schedule search, look up sailings from
Shanghai to Rotterdam departing next week, and return each sailing's vessel, voyage,
departure date and arrival date as JSON.Which Zenrows product fits
- Read one schedule, rate or terminal page FetchFills the form, renders, returns HTML or captured API JSON
- Normalize sailings from many carriers ExtractVessel, voyage and dates as fields, any layout
- Collect every surcharge notice a carrier posts CrawlWalks the advisory section, keeps notice pages
- Refresh hundreds of lanes on a schedule BatchOne job per refresh; external_id per lane joins results
- Test a source from the terminal CLIfetch as Markdown shows a page before you build
What success looks like
| Measure | What good looks like | How to check it |
|---|---|---|
| Lane coverage | Current sailings for every lane from every carrier serving it | Lanes with zero sailings, per carrier |
| Schedule freshness | Sailings match the latest published schedule | Record age against your refresh interval |
| ETA change capture | Delays and blank sailings in the next run | Diff ETD and ETA per voyage between runs |
| Port code match rate | Every port maps to a UN/LOCODE | Share of records with both ports resolved |
| Failed lanes per run | Errors and empties a small, stable share | Failed and empty results per Batch job and carrier |
Logistics data FAQ
-
How goods move and what it costs: carrier schedules, transit times, rates and surcharges, port and terminal status, air cargo schedules, parcel service levels. Much is on carrier and port websites, so web data covers carriers with no API or EDI feed.
-
Yes. Large carrier sites often sit behind Cloudflare or Akamai, and Zenrows' stealth gets through. Adaptive Stealth Mode escalates to rendering and stealth only when needed; add page actions in a full browser render when results need a search.
-
Use the carrier's point-to-point search: fill origin, destination and date with page actions, wait for results, read the sailings. If results come from the carrier's API, capture the XHR calls and read that JSON, easier to parse than the table.
-
Yes, for published rates: public spot quotes, tariff tables, and notices for general rate increases, bunker and peak season surcharges. Crawl the advisory section as Markdown for every notice. Contract rates in your carrier account need a logged-in Browser session.
-
Tracking containers and bills of lading is a visibility job with its own volume and timing. See supply chain intelligence, with code for click-through tracking flows.
-
Carriers write one port as "Rotterdam", "NLRTM", "Rotterdam (Maasvlakte)" or a terminal name. Map every spelling to its five-letter UN/LOCODE in a lookup table and resolve each origin and destination before storing. Log unresolved names each run and add them, so the match rate climbs.
-
As often as the source changes: ocean schedules roll weekly, so daily or weekly; terminal and gate notices change intraday, so hourly on a short list; surcharges are announced weeks ahead, so a daily advisory crawl.