About the API:
This API provides the latest prices of fuel and diesel in every Indian city. With daily updates, you will always be receiving the newest prices.
This API receives the City ID of your choice and it will deliver the latest rates for Fuel, Diesel, and CNG. Also, if the price has suffered any changes, you will be provided with the difference as well.
Costs calculations: This API is ideal for those courier companies that want to have the fuel information of every city that they cover. This could help them to estimate how much they would spend in fuel in every city.
Prices comparisons: Build your product and compare different prices for different states, and recommend to your users the best fuel prices for them.
Besides the number of API calls per month, there are no other limitations.
Get a list of all the cities in India that are available.
This endpoint does not require any input parameters.
Test Endpoint
{"data":[{"id":"10002","identifier":"5f06883d132f54ecf0b998ba","name":"Abohar","stateId":"127","stateName":"Punjab","disabled":false,"type":"ROI"},{"id":"10435","identifier":"5eb29a20132f54ecf00133a7","name":"Adilabad","stateId":"131","stateName":"Telangana","oldId":"1391","disabled":false,"type":"ROI"},{"id":"10443","identifier":"5eb29a20132f54ecf00133af","name":"Agartala","stateId":"132","stateName":"Tripura","oldId":"1399","disabled":false,"type":"ROI"},{"id":"10444","identifier":"5eb29a20132f54ecf00133b0","name":"Agra","stateId":"133","stateName":"Uttar Pradesh","oldId":"1415","disabled":false,"type":"ROI"},{"id":"10097","identifier":"5eb29a1e132f54ecf001324b","name":"Ahmedabad","stateId":"111","stateName":"Gujarat","oldId":"1078","disabled":false,"type":"ROI"},{"id":"10285","identifier":"5eb29a1f132f54ecf0013310","name":"Ahmednagar","stateId":"119","stateName":"Maharashtra","oldId":"1255","disabled":false,"type":"ROI"},{"id":"8113","identifier":"61a9fd108c55ab70bf1c6601","name":"Aizawl","stateId":"122","stateName":"Mizoram","disabled":false,"type":"ROI"},{"id":"10324","identifier":"5eb29a1f132f54ecf0013337","name":"Aizwal","stateId":"122","stateName":"Mizoram","oldId":"10056","disabled":false,"type":"ROI"},{"id":"10371","identifier":"5eb29a20132f54ecf0013366","name":"Ajmer","stateId":"128","stateName":"Rajasthan","oldId":"1336","disabled":false,"type":"ROI"},{"id":"10445","identifier":"5eb29a20132f54ecf00133b1","name":"Akbarpur","stateId":"133","stateName":"Uttar Pradesh","oldId":"1424","disabled":false,"type":"ROI"},{"id":"10286","identifier":"5eb29a1f132f54ecf0013311","name":"Akola","stateId":"119","stateName":"Maharashtra","oldId":"1253","disabled":false,"type":"ROI"},{"id":"10220","identifier":"5eb29a1e132f54ecf00132c9","name":"Alappuzha","stateId":"117","stateName":"Kerala","oldId":"1182","disabled":false,"type":"ROI"},{"id":"10287","identifier":"5eb29a1f132f54ecf0013312","name":"Alibag","stateId":"119","stateName":"Maharashtra","oldId":"1250","disabled":false,"type":"ROI"},{"id":"10446","identifier":"5eb29a20132f54ecf00133b2","name":"Aligarh","stateId":"133","stateName":"Uttar Pradesh","oldId":"1438","disabled":false,"type":"ROI"},{"id":"10518","identifier":"5eb29a20132f54ecf00133fa","name":"Alipore","stateId":"135","stateName":"West Bengal","oldId":"1482","disabled":false,"type":"ROI"},{"id":"10236","identifier":"5eb29a1e132f54ecf00132da","name":"Alirajpur","stateId":"118","stateName":"Madhya Pradesh","oldId":"1238","disabled":false,"type":"ROI"},{"id":"10447","identifier":"5eb29a20132f54ecf00133b3","name":"Allahabad","stateId":"133","stateName":"Uttar Pradesh","oldId":"1439","disabled":false,"type":"ROI"},{"id":"10511","identifier":"5eb29a20132f54ecf00133f3","name":"Almora","stateId":"134","stateName":"Uttarakhand","oldId":"1465","disabled":false,"type":"ROI"},{"id":"10372","identifier":"5eb29a20132f54ecf0013367","name":"Alwar","stateId":"128","stateName":"Rajasthan","oldId":"1345","disabled":false,"type":"ROI"},{"id":"10128","identifier":"5eb29a1e132f54ecf001326a","name":"Ambala","stateId":"112","stateName":"Haryana","oldId":"1098","disabled":false,"type":"ROI"},{"id":"8049","identifier":"61a9fd108c55ab70bf1c65c1","name":"Ambedkar Nagar","stateId":"133","stateName":"Uttar Pradesh","disabled":false,"type":"ROI"},{"id":"10063","identifier":"5eb29a1e132f54ecf0013229","name":"Ambikapur","stateId":"106","stateName":"Chhattisgarh","oldId":"1063","disabled":false,"type":"ROI"},{"id":"10288","identifier":"5eb29a1f132f54ecf0013313","name":"Amravati","stateId":"119","stateName":"Maharashtra","oldId":"1262","disabled":false,"type":"ROI"},{"id":"10098","identifier":"5eb29a1e132f54ecf001324c","name":"Amreli","stateId":"111","stateName":"Gujarat","oldId":"1071","disabled":false,"type":"ROI"},{"id":"10351","identifier":"5eb29a1f132f54ecf0013352","name":"Amritsar","stateId":"127","stateName":"Punjab","oldId":"1320","disabled":false,"type":"ROI"},{"id":"10448","identifier":"5eb29a20132f54ecf00133b4","name":"Amroha","stateId":"133","stateName":"Uttar Pradesh","oldId":"10000","disabled":false,"type":"ROI"},{"id":"10099","identifier":"5eb29a1e132f54ecf001324d","name":"Anand","stateId":"111","stateName":"Gujarat","oldId":"1072","disabled":false,"type":"ROI"},{"id":"10535","identifier":"5eb29a1e132f54ecf00131eb","name":"Anantapur","stateId":"101","stateName":"Andhra Pradesh","oldId":"1003","disabled":false,"type":"ROI"},{"id":"10156","identifier":"5eb29a1e132f54ecf0013287","name":"Anantnag","stateId":"114","stateName":"Jammu and Kashmir","oldId":"1129","disabled":false,"type":"ROI"},{"id":"10327","identifier":"5eb29a1f132f54ecf001333a","name":"Angul","stateId":"124","stateName":"Odisha","oldId":"1298","disabled":false,"type":"ROI"},{"id":"10028","identifier":"5eb29a1e132f54ecf0013206","name":"Araria","stateId":"104","stateName":"Bihar","oldId":"1020","disabled":false,"type":"ROI"},{"id":"10404","identifier":"5eb29a20132f54ecf0013387","name":"Ariyalur","stateId":"130","stateName":"Tamil Nadu","oldId":"1385","disabled":false,"type":"ROI"},{"id":"10029","identifier":"5eb29a1e132f54ecf0013207","name":"Arrah","stateId":"104","stateName":"Bihar","oldId":"1024","disabled":false,"type":"ROI"},{"id":"10237","identifier":"5eb29a1e132f54ecf00132db","name":"Ashoknagar","stateId":"118","stateName":"Madhya Pradesh","disabled":false,"type":"ROI"},{"id":"10449","identifier":"5eb29a20132f54ecf00133b5","name":"Auraiya","stateId":"133","stateName":"Uttar Pradesh","oldId":"1425","disabled":false,"type":"ROI"},{"id":"10030","identifier":"5eb29a1e132f54ecf0013208","name":"Aurangabad","stateId":"104","stateName":"Bihar","oldId":"1246","disabled":false,"type":"ROI"},{"id":"10289","identifier":"5eb29a1f132f54ecf0013314","name":"Aurangabad","stateId":"119","stateName":"Maharashtra","disabled":false,"type":"ROI"},{"id":"10003","identifier":"5f06883d132f54ecf0b998bb","name":"Avadi","stateId":"130","stateName":"Tamil Nadu","disabled":false,"type":"ROI"},{"id":"8079","identifier":"61a9fd108c55ab70bf1c65df","name":"Azadnagar","stateId":"118","stateName":"Madhya Pradesh","disabled":false,"type":"ROI"},{"id":"8014","identifier":"61a9fd108c55ab70bf1c659e","name":"Azamgarh","stateId":"133","stateName":"Uttar Pradesh","disabled":false,"type":"ROI","country":"India"},{"id":"10157","identifier":"5eb29a1e132f54ecf0013288","name":"Badgam","stateId":"114","stateName":"Jammu and Kashmir","oldId":"1124","disabled":false,"type":"ROI"},{"id":"10189","identifier":"5eb29a1e132f54ecf00132aa","name":"Bagalkot","stateId":"116","stateName":"Karnataka","oldId":"1170","disabled":false,"type":"ROI"},{"id":"8157","identifier":"61a9fd108c55ab70bf1c662d","name":"Bageshwar","stateId":"134","stateName":"Uttarakhand","disabled":false,"type":"ROI"},{"id":"8015","identifier":"61a9fd108c55ab70bf1c659f","name":"Baghpat","stateId":"133","stateName":"Uttar Pradesh","disabled":false,"type":"ROI"},{"id":"10450","identifier":"5eb29a20132f54ecf00133b6","name":"Bagpat","stateId":"133","stateName":"Uttar Pradesh","oldId":"1455","disabled":false,"type":"ROI"},{"id":"10519","identifier":"5eb29a20132f54ecf00133fb","name":"Baharampur","stateId":"135","stateName":"West Bengal","oldId":"1480","disabled":false,"type":"ROI"},{"id":"10451","identifier":"5eb29a20132f54ecf00133b7","name":"Bahraich","stateId":"133","stateName":"Uttar Pradesh","oldId":"1416","disabled":false,"type":"ROI"},{"id":"10238","identifier":"5eb29a1e132f54ecf00132dc","name":"Balaghat","stateId":"118","stateName":"Madhya Pradesh","oldId":"1225","disabled":false,"type":"ROI"},{"id":"10328","identifier":"5eb29a1f132f54ecf001333b","name":"Balangir","stateId":"124","stateName":"Odisha","oldId":"1286","disabled":false,"type":"ROI"},{"id":"10329","identifier":"5eb29a1f132f54ecf001333c","name":"Balasore","stateId":"124","stateName":"Odisha","oldId":"1295","disabled":false,"type":"ROI"},{"id":"10190","identifier":"5eb29a1e132f54ecf00132ab","name":"Ballari","stateId":"116","stateName":"Karnataka","oldId":"10035","disabled":false,"type":"ROI"},{"id":"10452","identifier":"5eb29a20132f54ecf00133b8","name":"Ballia","stateId":"133","stateName":"Uttar Pradesh","oldId":"1426","disabled":false,"type":"ROI"},{"id":"10453","identifier":"5eb29a20132f54ecf00133b9","name":"Balrampur","stateId":"133","stateName":"Uttar Pradesh","oldId":"10001","disabled":false,"type":"ROI"},{"id":"8010","identifier":"61a9fd108c55ab70bf1c659a","name":"Banas Kantha","stateId":"111","stateName":"Gujarat","disabled":false,"type":"ROI"},{"id":"10454","identifier":"5eb29a20132f54ecf00133ba","name":"Banda","stateId":"133","stateName":"Uttar Pradesh","oldId":"1408","disabled":false,"type":"ROI"},{"id":"10031","identifier":"5eb29a1e132f54ecf0013209","name":"Banka","stateId":"104","stateName":"Bihar","oldId":"10009","disabled":false,"type":"ROI"},{"id":"10520","identifier":"5eb29a20132f54ecf00133fc","name":"Bankura","stateId":"135","stateName":"West Bengal","oldId":"1472","disabled":false,"type":"ROI"},{"id":"10373","identifier":"5eb29a20132f54ecf0013368","name":"Banswara","stateId":"128","stateName":"Rajasthan","oldId":"1352","disabled":false,"type":"ROI"},{"id":"10455","identifier":"5eb29a20132f54ecf00133bb","name":"Barabanki","stateId":"133","stateName":"Uttar Pradesh","oldId":"1401","disabled":false,"type":"ROI"},{"id":"10374","identifier":"5eb29a20132f54ecf0013369","name":"Baran","stateId":"128","stateName":"Rajasthan","oldId":"1337","disabled":false,"type":"ROI"},{"id":"10521","identifier":"5eb29a20132f54ecf00133fd","name":"Barasat","stateId":"135","stateName":"West Bengal","oldId":"1475","disabled":false,"type":"ROI"},{"id":"10522","identifier":"5eb29a20132f54ecf00133fe","name":"Bardhaman","stateId":"135","stateName":"West Bengal","oldId":"1476","disabled":false,"type":"ROI"},{"id":"10456","identifier":"5eb29a20132f54ecf00133bc","name":"Bareilly","stateId":"133","stateName":"Uttar Pradesh","oldId":"1456","disabled":false,"type":"ROI","country":"India"},{"id":"10330","identifier":"5eb29a1f132f54ecf001333d","name":"Bargarh","stateId":"124","stateName":"Odisha"}],"_note":"Response truncated for documentation purposes"}
curl --location --request GET 'https://zylalabs.com/api/324/fuel+prices+in+india+api/23297/cities+available' --header 'Authorization: Bearer YOUR_API_KEY'
Enter a city ID, and you will receive the ID of the “Cities Available” endpoint.
Fuel Price - Endpoint Features
| Object | Description |
|---|---|
cityId |
[Required] Enter a city ID |
{"data":{"fuelPrice":{"id":"2024-05-16_10084","cityId":"10084","petrol":"94.76","diesel":"87.66","currency":"INR","date":"2024-05-16","createdAt":1715842216470,"changeText":"Petrol: ₹94.76 , Diesel: ₹87.66 ","petrolDiff":"0.00","dieselDiff":"0.00","cngDiff":"0.00","cngPrice":"76.59"},"homeCity":{"id":"10084","identifier":"5eb29a1e132f54ecf001323e","name":"Delhi","stateId":"109","stateName":"Delhi","oldId":"1276","disabled":false,"type":"GROW","imageUrl":"https://d289c58yi26upx.cloudfront.net/May30th2023/logo_delhi.png"}}}
curl --location --request GET 'https://zylalabs.com/api/324/fuel+prices+in+india+api/23298/fuel+price?cityId=10084' --header 'Authorization: Bearer YOUR_API_KEY'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
Each endpoint returns JSON data. The "GET All States" endpoint provides a list of states in India. The "GET Cities by State" endpoint returns cities within a specified state. The "GET Fuel Prices by State and City" endpoint delivers the latest fuel prices, including petrol, diesel, CNG, and LPG, along with price changes.
Key fields include "stateId," "stateName," "cityId," "cityName," and fuel pricing details such as "retailPrice," "retailPriceChange," and "currency." These fields help identify locations and current fuel prices.
The "GET Cities by State" endpoint requires a state name as a parameter. The "GET Fuel Prices by State and City" endpoint requires both a state name and a city name, formatted in lowercase and hyphenated for compound names (e.g., "uttar-pradesh").
The response data is structured in a hierarchical JSON format. For example, the fuel prices response includes nested objects for each fuel type, detailing prices and changes, making it easy to access specific information.
The data is sourced from official fuel pricing authorities in India, ensuring accuracy. Regular updates are made to reflect the latest prices, maintaining data quality and reliability.
Common use cases include fuel cost calculations for logistics companies, price comparisons for consumers, and integration into mobile apps for real-time fuel price updates across different cities.
Users can parse the JSON response to extract relevant fields, such as current fuel prices and changes. This data can be used for analytics, reporting, or displaying on user interfaces to inform decision-making.
If a request returns empty results, users should check the parameters for accuracy. Implementing error handling in the application can help manage such scenarios, ensuring a smooth user experience even when data is unavailable.
To obtain your API key, you first need to sign in to your account and subscribe to the API you want to use. Once subscribed, go to your Profile, open the Subscription section, and select the specific API. Your API key will be available there and can be used to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
If you don’t cancel before the 7th day, your free trial will end automatically and your subscription will switch to a paid plan under the same plan you originally subscribed to, meaning you will be charged and gain access to the API calls included in that plan.
The free trial ends when you reach 50 API requests or after 7 days, whichever comes first.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost, so you can test our APIs without any commitment.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
Service Level:
100%
Response Time:
835ms
Service Level:
100%
Response Time:
986ms
Service Level:
100%
Response Time:
2,351ms
Service Level:
100%
Response Time:
1,076ms
Service Level:
100%
Response Time:
3,050ms
Service Level:
50%
Response Time:
5,061ms
Service Level:
67%
Response Time:
1,982ms
Service Level:
100%
Response Time:
780ms
Service Level:
100%
Response Time:
2,635ms
Service Level:
100%
Response Time:
1,000ms