Oil Price API Documentation - Quick Start in 5 Minutes | REST API
GitHub
GitHub

Maritime Bunker Fuel API

Category: Maritime & Shipping | Industry: Shipping & Logistics

Bunker fuel represents 50-60% of vessel operating costs. OilPriceAPI provides real-time marine fuel prices from major bunkering ports worldwide, enabling shipping companies to optimize bunkering decisions, manage voyage costs, and ensure IMO 2020 compliance.

The Challenge

Maritime shipping operators face complex fuel management challenges across global operations:

  • Volatile bunker prices vary significantly between ports
  • IMO 2020 compliance requires tracking multiple fuel grades (VLSFO, MGO)
  • Voyage planning complexity involves fuel price decisions at multiple ports
  • High fuel costs represent the largest variable expense in shipping
  • Manual price collection from brokers is time-consuming and inconsistent
  • Multi-port operations require coordinated bunkering strategies

Without centralized, real-time bunker price data, shipping companies struggle to minimize fuel costs and optimize voyage economics.

The Solution

OilPriceAPI's Marine Fuel API delivers comprehensive bunker pricing from major ports worldwide, supporting all IMO 2020 compliant fuel grades and enabling data-driven bunkering decisions.

Key Benefits

BenefitImpact
Multi-port pricingCompare bunker costs across 8 major hubs
All fuel gradesMGO, VLSFO, HFO 380, HFO 180 coverage
IMO 2020 complianceTrack compliant fuel options
Real-time updatesCurrent prices for voyage planning
Historical analysisIdentify bunkering patterns and trends

Port Coverage

Our marine fuel data covers major bunkering hubs worldwide:

PortCodeRegion
SingaporeSGSINAsia-Pacific (World's largest hub)
RotterdamNLRTMEurope
HoustonUSHOUUS Gulf Coast
FujairahAEFUJMiddle East
Hong KongHKHKGAsia-Pacific
Los AngelesUSLAXUS West Coast
New YorkUSNYCUS East Coast
SantosBRSSZSouth America

Relevant API Endpoints

Get All Marine Fuel Prices

Retrieve current bunker prices across all ports and fuel grades:

# Get all marine fuel prices
curl "https://api.oilpriceapi.com/v1/prices/marine-fuels" \
  -H "Authorization: Token YOUR_API_KEY"

# Get latest marine fuel prices
curl "https://api.oilpriceapi.com/v1/prices/marine-fuels/latest" \
  -H "Authorization: Token YOUR_API_KEY"

Response:

{
  "status": "success",
  "data": {
    "prices": [
      {
        "price": 615.50,
        "formatted": "$615.50",
        "currency": "USD",
        "code": "VLSFO_SGSIN_USD",
        "port": "Singapore",
        "port_code": "SGSIN",
        "fuel_grade": "VLSFO",
        "created_at": "2025-01-15T08:00:00.000Z",
        "type": "spot_price"
      }
    ]
  }
}

Get Port-Specific Pricing

Query specific ports for bunkering decisions:

# Singapore VLSFO
curl "https://api.oilpriceapi.com/v1/prices/latest?by_code=VLSFO_SGSIN_USD" \
  -H "Authorization: Token YOUR_API_KEY"

# Rotterdam MGO
curl "https://api.oilpriceapi.com/v1/prices/latest?by_code=MGO_05S_NLRTM_USD" \
  -H "Authorization: Token YOUR_API_KEY"

# Compare multiple ports
curl "https://api.oilpriceapi.com/v1/prices/latest?by_code=VLSFO_SGSIN_USD,VLSFO_NLRTM_USD,VLSFO_AEFUJ_USD" \
  -H "Authorization: Token YOUR_API_KEY"

List Available Ports

Get information about supported bunkering ports:

curl "https://api.oilpriceapi.com/v1/prices/marine-fuels/ports" \
  -H "Authorization: Token YOUR_API_KEY"

Historical Bunker Prices

Analyze price trends for bunkering timing optimization:

# Past month of Singapore VLSFO with daily averages
curl "https://api.oilpriceapi.com/v1/prices/past_month?by_code=VLSFO_SGSIN_USD&interval=1d" \
  -H "Authorization: Token YOUR_API_KEY"

Integration Examples

Voyage Bunkering Optimizer

Build bunkering optimization into your voyage planning system:

import requests
from dataclasses import dataclass
from typing import List

@dataclass
class Port:
    code: str
    name: str
    eta_days: int

class BunkerOptimizer:
    def __init__(self, api_key):
        self.api_key = api_key
        self.base_url = 'https://api.oilpriceapi.com/v1'
        self.headers = {'Authorization': f'Token {api_key}'}

    def get_port_prices(self, port_codes: List[str], fuel_grade='VLSFO'):
        """Get current bunker prices for specified ports."""
        codes = [f'{fuel_grade}_{code}_USD' for code in port_codes]
        response = requests.get(
            f'{self.base_url}/prices/latest',
            params={'by_code': ','.join(codes)},
            headers=self.headers
        )
        return response.json()

    def compare_bunkering_options(self, voyage_ports: List[Port],
                                   fuel_needed_mt: float,
                                   fuel_grade='VLSFO'):
        """Compare bunkering costs across voyage ports."""
        port_codes = [p.code for p in voyage_ports]
        prices_response = self.get_port_prices(port_codes, fuel_grade)

        options = []
        for port in voyage_ports:
            code = f'{fuel_grade}_{port.code}_USD'
            # Find price for this port
            price_per_mt = self._find_price(prices_response, code)
            if price_per_mt:
                total_cost = price_per_mt * fuel_needed_mt
                options.append({
                    'port': port.name,
                    'port_code': port.code,
                    'eta_days': port.eta_days,
                    'price_per_mt': price_per_mt,
                    'total_cost': round(total_cost, 2),
                    'fuel_grade': fuel_grade
                })

        # Sort by total cost
        options.sort(key=lambda x: x['total_cost'])
        return options

    def _find_price(self, response, commodity_code):
        """Extract price from API response."""
        if response.get('status') == 'success':
            data = response.get('data', {})
            if isinstance(data, dict) and data.get('code') == commodity_code:
                return data.get('price')
        return None

    def calculate_voyage_fuel_cost(self, voyage_legs, vessel_consumption_mt_per_day):
        """Calculate total fuel cost for a voyage with optimized bunkering."""
        total_fuel_needed = sum(
            leg['distance_nm'] / leg['speed_knots'] / 24 * vessel_consumption_mt_per_day
            for leg in voyage_legs
        )

        # Get all port prices
        port_codes = list(set(leg['bunker_port'] for leg in voyage_legs if leg.get('bunker_port')))
        prices = self.get_port_prices(port_codes)

        return {
            'total_fuel_mt': round(total_fuel_needed, 2),
            'bunker_options': self.compare_bunkering_options(
                [Port(code=c, name=c, eta_days=0) for c in port_codes],
                total_fuel_needed
            )
        }

# Usage example
optimizer = BunkerOptimizer('YOUR_API_KEY')

voyage_ports = [
    Port(code='SGSIN', name='Singapore', eta_days=0),
    Port(code='AEFUJ', name='Fujairah', eta_days=5),
    Port(code='NLRTM', name='Rotterdam', eta_days=18)
]

options = optimizer.compare_bunkering_options(voyage_ports, fuel_needed_mt=2500)
print("Bunkering options (sorted by cost):")
for opt in options:
    print(f"  {opt['port']}: ${opt['total_cost']:,.0f} (${opt['price_per_mt']}/MT)")

JavaScript/Node.js Fleet Bunker Management

class BunkerFleetManager {
  constructor(apiKey) {
    this.apiKey = apiKey;
    this.baseUrl = 'https://api.oilpriceapi.com/v1';
  }

  async getAllBunkerPrices() {
    const response = await fetch(
      `${this.baseUrl}/prices/marine-fuels/latest`,
      {
        headers: { 'Authorization': `Token ${this.apiKey}` }
      }
    );
    return response.json();
  }

  async getPortPrices(portCode, fuelGrades = ['VLSFO', 'MGO_05S']) {
    const codes = fuelGrades.map(grade => `${grade}_${portCode}_USD`).join(',');
    const response = await fetch(
      `${this.baseUrl}/prices/latest?by_code=${codes}`,
      {
        headers: { 'Authorization': `Token ${this.apiKey}` }
      }
    );
    return response.json();
  }

  async findCheapestBunkering(portCodes, fuelGrade = 'VLSFO') {
    const codes = portCodes.map(port => `${fuelGrade}_${port}_USD`).join(',');
    const response = await fetch(
      `${this.baseUrl}/prices/latest?by_code=${codes}`,
      {
        headers: { 'Authorization': `Token ${this.apiKey}` }
      }
    );

    const data = await response.json();
    // Process and sort by price
    return data;
  }

  async analyzePriceTrend(portCode, fuelGrade = 'VLSFO', days = 30) {
    const code = `${fuelGrade}_${portCode}_USD`;
    const endpoint = days <= 7 ? 'past_week' : 'past_month';

    const response = await fetch(
      `${this.baseUrl}/prices/${endpoint}?by_code=${code}&interval=1d`,
      {
        headers: { 'Authorization': `Token ${this.apiKey}` }
      }
    );

    const data = await response.json();
    const prices = data.data.prices;

    return {
      port: portCode,
      fuelGrade,
      averagePrice: this.calculateAverage(prices),
      minPrice: Math.min(...prices.map(p => p.price)),
      maxPrice: Math.max(...prices.map(p => p.price)),
      trend: this.determineTrend(prices)
    };
  }

  calculateAverage(prices) {
    const sum = prices.reduce((acc, p) => acc + p.price, 0);
    return Math.round(sum / prices.length * 100) / 100;
  }

  determineTrend(prices) {
    if (prices.length < 2) return 'insufficient_data';
    const recent = prices.slice(0, 3).reduce((a, p) => a + p.price, 0) / 3;
    const older = prices.slice(-3).reduce((a, p) => a + p.price, 0) / 3;
    const change = ((recent - older) / older) * 100;

    if (change > 2) return 'rising';
    if (change < -2) return 'falling';
    return 'stable';
  }
}

// Fleet bunkering analysis
const manager = new BunkerFleetManager(process.env.OILPRICE_API_KEY);

const majorPorts = ['SGSIN', 'NLRTM', 'AEFUJ', 'USHOU'];
const cheapest = await manager.findCheapestBunkering(majorPorts, 'VLSFO');
console.log('Cheapest VLSFO bunkering:', cheapest);

const trend = await manager.analyzePriceTrend('SGSIN', 'VLSFO', 30);
console.log('Singapore VLSFO trend:', trend);

Use Cases

1. Voyage Cost Estimation

Calculate accurate fuel costs for voyage planning by comparing bunker prices at potential bunkering ports along the route.

2. Bunkering Timing Optimization

Use historical price trends to identify optimal timing for fuel purchases, potentially saving thousands per bunkering operation.

3. Multi-Port Price Arbitrage

Identify price differentials between ports to optimize bunkering locations across your fleet's voyages.

4. IMO 2020 Compliance Monitoring

Track prices for compliant fuels (VLSFO, MGO) across ports to manage the transition cost from traditional HFO.

5. Charter Party Fuel Clauses

Provide transparent, verifiable fuel price data for charter party negotiations and cost-sharing arrangements.

6. Fleet Fuel Budget Forecasting

Aggregate bunker price data across your fleet's trading patterns to forecast quarterly and annual fuel budgets.

ROI and Value Proposition

MetricTypical Improvement
Bunkering cost optimization2-5% savings through better port selection
Price transparencyEliminate broker information asymmetry
Planning efficiency70% faster voyage fuel cost estimation
Budget accuracy+20% improvement in fuel cost forecasting

For a vessel consuming 3,000 MT of VLSFO per voyage at $600/MT, a 3% optimization equals $54,000 in savings per voyage.

Customer Success Story

"OilPriceAPI's marine fuel data transformed our bunkering operations. We now compare prices across all ports on our routes in seconds instead of spending hours collecting quotes from brokers. Our average bunkering cost dropped by 4% in the first quarter."

-- [Customer Success Story Placeholder]

Getting Started

  1. Sign up at oilpriceapi.com/signup
  2. Get your API key from the dashboard
  3. Query marine fuel endpoints using the examples above
  4. Integrate with your voyage planning or fleet management system
  5. Start optimizing bunkering decisions across your fleet

Related Resources

  • Marine Fuel API Reference - Complete marine fuel documentation
  • Port Data - Supported port information
  • All Marine Fuels - Full fuel grade coverage
  • API Authentication Guide - Secure API access
  • Historical Prices - Trend analysis
Last Updated: 12/28/25, 12:24 AM