ShippingRates API Docs

Build freight quote tools, D&D calculators, local-charge lookups, and logistics-agent workflows on carrier-backed shipping intelligence.

Core API Surfaces

GET /api/rates

Freight Rates

Retrieve route and carrier rate context for quote workflows.

GET /api/demo/dd-compare

D&D Compare

Compare demurrage and detention examples by country, direction, days, and container type.

GET /api/total-cost

Total Cost

Combine freight, D&D exposure, and related cost assumptions.

GET /api/port

Port Intelligence

Resolve port context and location intelligence for carrier workflows.

GET /api/transit

Transit Schedules

Use transit and schedule context in planning and exception handling.

GET /api/congestion

Congestion

Pair rate decisions with port congestion and operational risk signals.

Related Tools and Guides

Authentication, Free Tier, and x402

Free Tier

Public demo endpoints remain available for lightweight exploration. Production use should create an account and move to authenticated API calls.

  • 25 free API requests per month for starter usage
  • Use X-API-Key on authenticated requests
  • Register before wiring customer-facing quote flows

x402 Pay-Per-Call

Paid routes support x402 payment flows so agents and applications can settle specific freight intelligence calls with USDC where enabled.

  • REST and MCP workflows share the same canonical data surface
  • Payment discovery is exposed through well-known metadata
  • Free-tier middleware runs before paid route settlement

MCP and Agent Access

Direct MCP

Use https://mcp.shippingrates.org/mcp when a logistics agent needs structured freight intelligence without scraping public pages.

  • D&D comparison and cost context
  • Port, route, transit, and congestion intelligence
  • x402 payment proofs can be forwarded by tool clients

Source Provenance and Limits

ShippingRates publishes carrier-backed freight intelligence only after source-backed rows pass deterministic validation. Unsupported tariff shapes, missing source provenance, and ambiguous port scopes stay out of public API and SEO pages until they can be represented safely.

Read the ShippingRates methodology for the data integrity rules behind calculators, API responses, MCP tools, and data-backed content pages such as India container local charges and Singapore demurrage and detention charges.

Example Request

curl "https://shippingrates.org/api/demo/dd-compare?country=IN&direction=import&days=14&container_type=40GP"

curl -H "X-API-Key: $SHIPPINGRATES_API_KEY"   "https://shippingrates.org/api/local-charges?country=IN&port=INJNP"