Skip to main content
SA Data Hub

For developers

SA Data Hub API

Read-only JSON for South Africa's official fuel prices and every statistic on this site. No key and no sign-up. Every response says where the numbers come from and on what terms you may reuse them.

Endpoints

The base address is https://sadatahub.tech/api/v1. A series id is the last part of a series page address, for example cpi-headline or fuel-petrol-95-inland.

What every response looks like

Each response has data and meta. The meta block always has: version, generatedAt, source, checkedOn, attribution, terms, estimate, docs.

  • Fuel prices are in cents per litre, exactly as the department printed them. Divide by 100 for rands.
  • null means no document SA Data Hub holds gives that value. It is never filled in by guessing.
  • Diesel and illuminating paraffin prices are official wholesale prices, not what a filling station charges.
  • meta.estimate is true only when a value is an estimate, not an official figure.

Example: /api/v1/fuel/latest, shortened

{
  "data": {
    "month": "2026-11",
    "effectiveFrom": "2026-11-04",
    "unit": "cents_per_litre",
    "products": [
      {
        "id": "petrol95",
        "name": "Petrol 95",
        "officialName": "95 unleaded",
        "priceType": "retail"
      }
    ],
    "zones": [
      {
        "id": "inland",
        "name": "Inland",
        "detail": "Gauteng (zone 9C), the inland reference price"
      },
      {
        "id": "coastal",
        "name": "Coastal",
        "detail": "Zone 1A, the coastal reference price"
      }
    ],
    "prices": [
      {
        "product": "petrol95",
        "zone": "inland",
        "cents": 3024,
        "changeFromPreviousMonth": -1
      },
      {
        "product": "petrol95",
        "zone": "coastal",
        "cents": 2937,
        "changeFromPreviousMonth": -1
      },
      "...": "8 more"
    ]
  },
  "meta": {
    "version": "v1",
    "generatedAt": "2026-11-19T21:33:32.398Z",
    "source": {
      "publisher": "Department of Mineral and Petroleum Resources",
      "document": "Fuel Price Schedule November 2026 (in the November 2026 fuel price pack)",
      "url": "https://bit.ly/4sZwrAY",
      "releasedOn": "2026-11-03"
    },
    "checkedOn": "2026-11-13",
    "attribution": "Source: Department of Mineral and Petroleum Resources (DMPR). Via SA Data Hub, https://sadatahub.tech/fuel",
    "terms": "DMPR material may be reproduced if it is accurate, not used for financial or commercial gain, not misleading, and credited to the DMPR with its website address (https://www.dmpr.gov.za/Terms-Conditions).",
    "estimate": false,
    "docs": "https://sadatahub.tech/api"
  }
}

Terms and credit

  • Fuel prices come from the Department of Mineral and Petroleum Resources. Its terms allow reproduction that is accurate, not for financial or commercial gain, not misleading, and credited to the department. The API cannot give you more rights than that.
  • Other series name their publisher. Credit that publisher, and SA Data Hub as the place you got it.
  • Each response has an attribution line you can copy.

Fair use

The files are built when the site is updated and served from a cache, so they change at most once a day (fuel prices once a month). Please cache what you fetch and ask at most once a minute per endpoint. There is no rate limit today; one may be added if the service is abused.

Versions

This is version 1. Fields may be added to it but will not be renamed or removed. A change that would break a client gets a new address, /api/v2, next to this one.

How the data is collected and checked · Report a problem