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

Every paid route grants 25 free requests per month per IP — no signup, no API key. Public demo endpoints stay fully open for lightweight exploration.

  • 25 free API requests per month per IP
  • No registration or API key on public routes
  • Past the quota, calls receive an x402 payment challenge

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
  • Use X-Require-Payment: x402 or Prefer: x402 when a client needs an immediate 402 challenge instead of free-tier access

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

# Free demo route — no auth needed
curl "https://api.shippingrates.org/api/demo/dd-compare?country=IN&direction=import&days=14&container_type=40GP"

# Paid routes: 25 free requests/month per IP, then x402 payment (USDC).
# There is no API-key signup for public routes — agents pay per call via
# the 402 challenge; see /.well-known/x402 for the payment flow.
curl "https://api.shippingrates.org/api/local-charges?country=IN&port=INNSA"