Daily Petrol, Diesel, LPG & CNG Fuel Prices in India

FREEMIUM
By mi8y | Updated 19 days ago | Energy
Popularity

9.5 / 10

Latency

520ms

Service Level

100%

Health Check

N/A

Back to All Discussions

Token counting logic for state and city fuel prices API

Rapid account: Yogeshs 4223
yogeshs4223
a year ago

Hi,

Please let us know how tokens are counted for fuel API calling where state/city wise fuel prices are required.
this will help to decide which subcription to be taken.

Regards,
Yogesh S

Rapid account: Admin Bx Tds O Qll
admin-BxTdsOQll Commented a year ago

Hello @yogeshs4223,

Each API call is counted and you get quota against for each of the API endpoints for different plans.

For example: If you’d like to get fuel price for ‘Mumbai’.
Step 1: Find the State ID for ‘Maharashtra’ - ListStates

GET https://daily-petrol-diesel-lpg-cng-fuel-prices-in-india.p.rapidapi.com/v1/list/india/states

Step 2: Find the City ID for ‘Mumbai’ in ‘Maharashtra’ - ListCities

GET https://daily-petrol-diesel-lpg-cng-fuel-prices-in-india.p.rapidapi.com/v1/list/india/maharashtra/cities

Step 3: Get the fuel price in ‘Mumbai’ today - CityFuelPriceToday

GET https://daily-petrol-diesel-lpg-cng-fuel-prices-in-india.p.rapidapi.com/v1/fuel-prices/today/india/maharashtra/mumbai

Now, the quota used is

  • List of States or Cities in India - 1 + 1 used for the month
  • Fuel Price in a State or a City Today - 1 used for the month

Now, depending on the plan, the quota varies. Let me know if this helps

Regards

Join in the discussion - add comment below:

Login / Signup to post new comments