How to Integrate Logistics Data APIs Into Your Platform
Modern logistics operations run on data. Whether you're building a TMS, a shipping calculator, or a supply chain dashboard, integrating real-time logistics data via API can transform your application's capabilities.
Why Use a Logistics API?
- Real-time data — Always current rates, not stale spreadsheets
- Automation — No manual data entry or research
- Scalability — Handle thousands of queries efficiently
- Competitive edge — Better data = better decisions
Getting Started with FreightPulse API
Step 1: Get Your API Key
Register at freightpulsehq.com/register. Free tier: 100 requests/month. Auth header is X-API-Key. Always send Accept: application/json.
Step 2: Make Your First Request
Test with EIA weekly fuel prices:
curl "https://freightpulsehq.com/api/v1/fuel-prices" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Accept: application/json"
Step 3: Parse the Response
Success envelope is { "success": true, "data": ... }:
{
"success": true,
"data": {
"timestamp": "2026-08-20T12:00:00+00:00",
"source": "EIA (U.S. Energy Information Administration)",
"currency": "USD",
"unit": "gallon",
"data": {
"diesel": {
"national_average": 5.454,
"change_week": 0.012,
"updated_at": "2026-08-17"
},
"gasoline": {
"national_average": 4.049,
"regular": 4.049,
"updated_at": "2026-08-17"
},
"bunker_fuel": {
"available": false,
"note": "No known free source — requires a paid provider."
}
}
}
}
Integration Examples
JavaScript/Node.js
const params = new URLSearchParams({
mode: 'trucking',
origin_zip: '10001',
destination_zip: '90210',
});
const response = await fetch(
`https://freightpulsehq.com/api/v1/freight-rates?${params}`,
{
headers: {
'X-API-Key': process.env.FP_API_KEY,
'Accept': 'application/json',
},
}
);
const body = await response.json();
if (body.data?.available === false) {
console.log(body.data.note);
} else {
console.log(body.data.price_usd, body.data.transit_days);
}
Python
import requests
response = requests.get(
'https://freightpulsehq.com/api/v1/port-congestion',
params={'port': 'USLAX'},
headers={'X-API-Key': API_KEY, 'Accept': 'application/json'},
)
body = response.json()
for row in body['data'].get('results', []):
print(f"{row['locode']}: {row['congestion']} ({row['metrics']['ratio_vs_baseline']})")
Available Endpoints
/api/v1/fuel-prices— EIA weekly US diesel and gasoline (not intra-day)/api/v1/freight-rates— US FTL via Warp (origin_zip+destination_zip); ocean/air limited/api/v1/port-congestion— IMF PortWatch activity vs baseline; requiresport,country, orregion/api/v1/carriers— FMCSA SAFER lookup (type=trucking, requiresq) or FMC ocean NVOCC/OTI directory (type=ocean). Airavailable: false/api/v1/historical— national fuel series, plus daily port-congestion series for ~20 curated ports (metric+period)/api/v1/disruptions— live natural-hazard events (GDACS, USGS, NOAA/NWS); no geopolitical/strike/port-closure coverage/api/v1/export— stub (data: [])
There is no /shipping-times route. Transit days come on FTL quotes when Warp prices the lane.
Best Practices
- Cache — EIA is weekly; PortWatch lags ~6–7 days; Warp quotes are cached ~30 minutes server-side
- Branch on
available— 200 does not always mean a price - Secure your key — environment variables, never committed
- Watch quota — free tier is 100 calls/month across all endpoints