Import the Latest Fuel Prices in India to Google Sheets

Import the latest fuel prices in India to Google sheets
Reading Time: 5 minutes

In this article, we’ll learn how to import the latest fuel prices in India to Google Sheets using fuel price API.

Shown below is a snippet of the latest fuel prices in India imported into Google Sheets.

Latest fuel prices in India

Fuels such as petrol and diesel are indispensable commodities. They move the economy; and their scarcity can be a huge drag on the economy. And they move us–literally. They are, in short, the blood that keeps economies alive and life running.

Which is why it’s important to keep watch over these volatile commodities. The prices fluctuate daily and also vary significantly enough across states and cities to leave a noticeable dent in one’s budget. So, it’s essential to stay up-to-date with the fuel prices and the variation of prices across regions.

We can import fuel prices in India for all states and also compare fuel prices across cities in Google Sheets using Amigo, a data integration and automation tool. Amigo is an essential fuel for all businesses looking to turbocharge their growth.

Steps to import the latest fuel prices in India to Google Sheets:

  1. Install the Amigo add-on in Google Sheets
  2. Get the API endpoint URL
  3. Launch Amigo and import the data

How to import the latest fuel prices in India to Google Sheets

Follow these steps to get fuel prices in India in Google Sheets using fuel price API.

Step 1: Install the Amigo add-on

Get the Amigo Data add-on from Google Workspace Marketplace to import the latest fuel prices in India to Google Sheets.

Click here to install.

Install Amigo to import fuel prices in India to Google Sheets

Step 2: Get the API endpoint URL

We’ll use a fuel price API called “Daily Petrol, Diesel, LPG & CNG Fuel Prices in India” from RapidAPI, an API marketplace, to retrieve fuel price data. Log in (or sign up if you don’t have an account yet).

Search for the fuel price API in the RapidAPI Hub and click the first relevant result. Or go directly to the fuel API documentation page.

Fuel price API to import latest fuel prices in India to Google Sheets

Click on the Subscribe to Test button and subscribe to a plan of your choice, post which we’ll be able to make calls to the API and import the latest fuel prices in India to Google Sheets.

Subscribe to the API to imoprt latest fuel prices in India to Google Sheets

Click Endpoints to go back to the API Playground. On the left of the fuel price API documentation page are the available endpoints.

List of fuel prices data available for import

Expand any of the categories and click on an endpoint within the category. For example, to get the current fuel prices in all the states, click the AllStatesFuelPricesToday endpoint in Today’s Fuel Prices.

Latest fuel prices endpoints in the fuel price API
The fuel price API endpoint URL and headers

Step 3: Import the latest fuel prices in India to Google Sheets

Open Google Sheets and launch Amigo to import the fuel prices data to Google Sheets. To connect to Amigo, click Extensions→Amigo: Data Exports and Reports→Connect.

Launch Amigo to import latest fuel prices in India to Google Sheets

We’ll be presented with a list of sources to connect and import data from on the sidebar. Select Custom API.

Select Custom API as the source to connect

Enter the fuel price API endpoint URL (without the apostrophes) in the API URL field.

Enter the fuel price API endpoint URL

Then expand the Details tab and enter the headers. The headers can be found in the Code Snippets. The characters to the left of the colon are the header names/keys and those to the right are the header values. Enter these as separate headers. Do not include the apostrophes.

Name: X-RapidAPI-Key, Value: YOUR_API_KEY

Name: X-RapidAPI-Host, Value: daily-petrol-diesel-lpg-cng-fuel-prices-in-india.p.rapidapi.com

Entering the fuel price API headers in Amigo
Preview of the latest fuel prices data to import to Google Sheets

The latest fuel prices data will be imported into Google Sheets in a moment. The data include prices of petrol, diesel, LPG and CNG for all the states in India and price change information. Below is a snippet of the data.

State-wise latest fuel prices in India imported to Google Sheets

We can likewise import fuel prices for a particular state or a specific city, city with the highest and lowest prices, and historical price data among others.

Once the data have been imported, you need only set a refresh schedule and the data will be updated automatically at regular intervals. And not only that, you can receive the updated data in your inbox and Slack so that the data follow you.

Know more about setting up alerts and automatic refresh schedule in Amigo.


Some related questions

To get historical prices of fuels like petrol, diesel and CNG, use the “Fuel prices on a past date” API. From there select the endpoint–whether you want to fetch the historical fuel price data for all states, for a state, or a city or all cities. Then copy the API endpoint URL and the headers and import the data to Google Sheets using Amigo Data.

This fuel price API does not have historical data dating that long back. It does have the historical data for the last 30 days for all states and most major cities of India and the current fuel prices.

Yes, you can get the fuel price data for a specific day if the date is no older than 30 days. Expand the “Fuel Prices on a past date” API and specify the date and the state for which you want to get the fuel prices.

Some recommended articles:

Import NSE Data To Google Sheets

Import Gasoline Price Data To Google Sheets in 4 Easy Steps

Import Live Metal Prices To Google Sheets

Leave a Reply