Comprehensive guide to using our APIs.
This documentation should help you get started with our City API. We showed how to make a request, showed sample responses for good and bad. Example codes also provided for your favourite languages. You can copy and get started with this sample code.
city
(mandatory): city you want fuel price for.
state
(mandatory): state of the city.
{
"city": "Madurai",
"state_code": "TN",
"state_name": "Tamil Nadu",
"current_date": "2025-01-08",
"rates": [
{
"fuel": "Diesel",
"price": 93.01
},
{
"fuel": "LPG",
"price": 844.0
},
{
"fuel": "Petrol",
"price": 101.38
}
]
}
{
"error": "Valid City is required.",
"details": {
"state": "TN",
"available_cities": [
"Ariyalur",
"Chengalpattu",
"Chennai",
"Coimbatore",
"Cuddalore",
"Dharmapuri",
"Dindigul",
"Erode",
"Kallakurichi",
"Kanchipuram",
"Kanyakumari",
"Karur",
"Krishnagiri",
"Madurai",
"Nagapattinam",
"Namakkal",
"Nilgiris",
"Perambalur",
"Pudukkottai",
"Ramanathapuram",
"Ranipet",
"Salem",
"Sivaganga",
"Tenkasi",
"Thanjavur",
"Theni",
"Thoothukudi (Tuticorin)",
"Tiruchirappalli",
"Tirunelveli",
"Tirupathur",
"Tiruppur",
"Tiruvallur",
"Tiruvannamalai",
"Tiruvarur",
"Vellore",
"Viluppuram",
"Virudhunagar",
"Kanniyakumari",
"Teni",
"Thiruvarur",
"Tiruchchirappalli",
"Tirupur",
"Virudunagar",
"Ooty",
"Nagercoil",
"Thiruvallur",
"Thoothukudi"
]
}
}
{
"detail": "Invalid token."
}
Code | Message |
---|---|
400 | Bad Request |
403 | Forbidden |
curl -X GET "https://purepriceio.com/api/v1/fuel/city?city=Ramanathapuram&state=TN" \
-H "Authorization: Bearer YOUR_API_KEY"
This documentation should help you get started with our State API. We showed how to make a request, showed sample responses for good and bad. Example codes also provided for your favourite languages. You can copy and get started with this sample code.
state
(mandatory): state you want fuel price for.
fuel
(mandatory): type of the fuel you want price for.
{
"name": "Tamil Nadu",
"code": "TN",
"country": "India",
"current_date": "2025-01-09",
"cities": [
{
"name": "Ariyalur",
"rates": [
{
"fuel": "Petrol",
"price": "102.05"
}
]
},
{
"name": "Chengalpattu",
"rates": [
{
"fuel": "Petrol",
"price": "101.31"
}
]
},
{
"name": "Madurai",
"rates": [
{
"fuel": "Petrol",
"price": "101.74"
}
]
},
{
"name": "Nagapattinam",
"rates": [
{
"fuel": "Petrol",
"price": "102.25"
}
]
},
{
"name": "Namakkal",
"rates": [
{
"fuel": "Petrol",
"price": "101.55"
}
]
},
{
"name": "Nilgiris",
"rates": [
{
"fuel": "Petrol",
"price": "102.78"
}
]
},
{
"name": "Perambalur",
"rates": [
{
"fuel": "Petrol",
"price": "101.71"
}
]
},
{
"name": "Pudukkottai",
"rates": [
{
"fuel": "Petrol",
"price": "101.66"
}
]
},
{
"name": "Ramanathapuram",
"rates": [
{
"fuel": "Petrol",
"price": "102.30"
}
]
},
{
"name": "Salem",
"rates": [
{
"fuel": "Petrol",
"price": "101.47"
}
]
},
{
"name": "Tiruvarur",
"rates": [
{
"fuel": "Petrol",
"price": "101.96"
}
]
},
.
.
.
{
"name": "Thoothukudi",
"rates": [
{
"fuel": "Petrol",
"price": "101.13"
}
]
}
]
}
{
"error": "Invalid Fuel passed.",
"valid_fuels": [
"PETROL",
"DIESEL",
"LPG"
]
}
{
"detail": "Invalid token."
}
Code | Message |
---|---|
400 | Bad Request |
403 | Forbidden |
curl -X GET "https://purepriceio.com/api/v1/fuel/state?state=TN&fuel=petrol"
-H "Authorization: Bearer YOUR_API_KEY"