Overview
The NSW Government collects and publishes the standard retail prices of all prescribed fuels sold at over 2,500 service stations in NSW. The Fuel API has been developed as a means of accessing live fuel pricing across NSW service stations. V1 endpoints can be used for fetching NSW fuel price, V2 endpoints can be used for fetching NSW & Tasmania fuel prices combined.
API overview
Get Reference Data (v1)
keyboard_arrow_down
HTTP Verb - GET
Returns lists of reference data to be used in subsequent requests. Since the response for this request is very long, it is advised that you download the postman collection, and make a request to this endpoint from the collection. This v1 endpoint returns data for NSW.
Get Reference Data (v2)
keyboard_arrow_down
HTTP Verb - GET
Returns lists of reference data to be used in subsequent requests. Since the response for this request is very long, it is advised that you download the postman collection, and make a request to this endpoint from the collection. This v2 endpoint currently supports NSW and TAS.
Get All Prices (v1)
keyboard_arrow_down
HTTP Verb - GET
Returns all current fuel prices for all service stations. There may be restrictions on how often this API request can be made. Since the response for this request is very long, it is advised that you download the postman collection, and make a request to this endpoint from the collection. This API returns data for NSW.
Get All New Prices (v1)
keyboard_arrow_down
HTTP Verb - GET
Returns all new current prices that have been submitted since the last "/fuelpricecheck/v1/fuel/prices" or "/fuelpricecheck/v1/fuel/prices/new" request using the apikey on the current day. This API returns data for NSW.
Get Prices Near By (v1)
keyboard_arrow_down
HTTP Verb - POST
Returns current fuel prices for a single fuel type within a specified radius from a reference point. This API returns data for NSW.
Get Prices For Location (v1)
keyboard_arrow_down
HTTP Verb - POST
Returns current fuel prices for a single fuel type and a named location (ie Suburb or postcode). This API returns data for NSW.
Get Prices For Station (v1)
keyboard_arrow_down
HTTP Verb - GET
Returns current fuel prices for a single fuel type and a named location (ie Suburb or postcode). This API returns data for NSW.
Get All Prices (v2)
keyboard_arrow_down
HTTP Verb - GET
Returns all current fuel prices for all service stations. There may be restrictions on how often this API request can be made. Since the response for this request is very long, it is advised that you download the postman collection, and make a request to this endpoint from the collection. This v2 endpoint currently supports NSW and TAS.
Get All New Prices (v2)
keyboard_arrow_down
HTTP Verb - GET
Returns all new current prices that have been submitted since the last "/fuelpricecheck/v2/fuel/prices" or "/fuelpricecheck/v2/fuel/prices/new" request using the apikey on the current day. This v2 endpoint currently supports NSW and TAS.
Get Prices Near By (v2)
keyboard_arrow_down
HTTP Verb - POST
Returns current fuel prices for a single fuel type within a specified radius from a reference point. This v2 endpoint currently supports NSW and TAS.
Get Prices For Location (v2)
keyboard_arrow_down
HTTP Verb - POST
Returns current fuel prices for a single fuel type and a named location (ie Suburb or postcode). This v2 endpoint currently supports NSW and TAS.
Get Prices For Station (v2)
keyboard_arrow_down
HTTP Verb - GET
Returns current fuel prices for a single fuel type and a named location (ie Suburb or postcode). This v2 endpoint currently supports NSW and TAS.
Rate limits
The Fuel API has specific endpoint request limitation to authorized users. API.NSW reserve the right to adjust rate limits for any given endpoint in order to improve
quality of service provided to users. Every API consumer will be limited to a number of requests based on their agreement.
Rates for API calls
Account type |
Services |
Action |
Free |
- 2500 calls / month
- standard APIs
|
Subscribe
|
Premium |
- custom calls / month
- standard / custom APIs
- 24/7 email / phone support
- custom service licensing agreement
|
Contact us
|
Release notes
The table below shows date, version number and a detailed description of changes or modifications made to the Fuel API. Expected or scheduled
changes are indicated in a green color while yellow is used to indicated completed upgrades or changes.
Recent API Changes
Date |
Version |
Description |
21-Oct-2016 |
1.0 |
Product portal launched |
Security and authentication
API NSW generates API keys for APIs and enables authentication to your APIs using policies.
Credential pairs consisting of consumer key and secret are provisioned to clients and stored for future validation. These are issued as per agreement
with API NSW.
An OAuth call is required to provide the consumer with an authorisation token that would last approximately 12 hours from the time when request was made.
User would need to send this authorisation token with every subsequent request in order to get appropriate results from the API.
For more information see OAuth 2.0