HomeBlog

API Guide

How to Integrate Logistics Data APIs Into Your Platform

March 11, 2024 · 10 min read

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?

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

There is no /shipping-times route. Transit days come on FTL quotes when Warp prices the lane.

Best Practices

Start Building Today

Get your free API key and 100 requests/month.

Create Free Account →