Loading...

by Saint Sita Ram Innovation Lab Pvt Ltd

Latency --
Success Rate --
Last Updated --

Description

πŸ›£οΈ Fuel Price Direction En route API

This document serves as a guide for utilizing the Fuel Price Direction En route API, which provides comprehensive information on:

πŸ—ΊοΈ Fuel prices of states en route

πŸ”„ Comparison of fuel prices

πŸ“ Route details (distance & time) between a starting point and destination

By integrating fuel price data into route planning, users can efficiently plan refueling stops, enhancing convenience and cost-effectiveness.

✨ Features & Capabilities

🧭 Route Planning – Input starting location & destination β†’ get route details (distance, duration, bounds).
🚫 Avoidance Options – Option to avoid tolls or highways for customized routes.
πŸ”€ Alternative Routes – Provides alternate route suggestions if requested.
β›½ Fuel Price Info – Returns petrol, diesel, CNG, and electricity prices (if available) for states along the route.
πŸ“ Distance & Time – Includes total distance and estimated travel time.
πŸ›‘ Convenience – Identifies optimal refueling stops to save time and money.
πŸ’° Cost-effectiveness – Helps users pick cheaper fuel options along the way.
🌍 Geographic Coordinates – Latitude & longitude for states (currently India, expandable globally).
🧩 Polyline Representation – Encoded polyline format for efficient route geometry storage.
⚑ Scalability – Designed to support large volumes of route & fuel price requests.

πŸ“₯ Required Parameters

🏁 start_location (string) β†’ Starting location of the journey.

🏁 destination (string) β†’ Destination of the journey.

πŸ› οΈ Optional Parameters

πŸ”€ alternatives (boolean) β†’ Whether alternative routes should be considered (true/false).

🚫 avoid_tolls (boolean) β†’ Whether toll roads should be avoided (true/false).

πŸš— avoid_highways (boolean) β†’ Whether highways should be avoided (true/false).

πŸ“€ Response Format (JSON)

The API response includes:

πŸ“ start_location (string) – The starting location provided.
πŸ“ destination (string) – The destination provided.

πŸ›£οΈ routes (array) – Each route object contains:

πŸ†” route (string) – Identifier for the route.

πŸ“ distance (string) – Route distance in km.

⏱️ duration (string) – Route duration in hours/minutes.

πŸ“ distance_value (integer) – Distance in meters.

⏱️ duration_value (integer) – Duration in seconds.

πŸ—ΊοΈ bounds (object) – Geographic bounds (northeast & southwest corners).

πŸ›‘ waypoints (array, optional) – Each waypoint may contain:

🏁 waypoint_start_location (object)

🏁 waypoint_end_location (object)

πŸ“ waypoint_distance (object)

⏱️ waypoint_duration (object)

🧩 waypoint_polyline (object) – Encoded polyline for the waypoint.

🧭 maneuver (string, optional) – Specific maneuver instructions.

πŸ“– html_instructions (string, optional) – Step instructions (HTML formatted).

🧩 polylinePoints (string) – Encoded polyline representing the route. To decode, refer to the Google Polyline Utility documentation by below link:

β›½ fuel_prices (array) – Fuel prices along the route. Each entry includes:

🏷️ state (string) – Name of the state (en route).

🌐 lat (float) – Latitude.

🌐 long (float) – Longitude.

β›½ fuel_prices (object) – Petrol, Diesel, CNG, and Electricity (if available).

πŸ“‰ lowest_fueldata (object) – Lowest petrol, diesel, CNG prices on the route.
πŸ“ˆ highest_fueldata (object) – Highest petrol, diesel, CNG prices on the route.

API Details

API Version

1.0.0

This is the current version of the API available for use.

ssrapi/api/fuel-prices-enroute

GET ssrapi/fuel-prices-enroute

No description provided.

Parameters

ParameterTypeDescriptionExample
end_location* Text (String) required Jaipur
start_location* Text (String) required Delhi

Example Request

{
"start_location": "Delhi",
"end_location": "Jaipur"
}

Example Response

{
    "start_location": "Delhi ",
    "destination": "Jaipur",
    "routes": [
        {
            "route": "R1",
            "distance": "315 km",
            "duration": "5 hours 6 mins",
            "distance_value": 314912,
            "duration_value": 18383,
            "bounds": {
                "northeast": {
                    "lat": 28.7040873,
                    "lng": 77.15188409999999
                },
                "southwest": {
                    "lat": 26.8549099,
                    "lng": 75.7511454
                }
            },
            "waypoints": [
                {
                    "waypoint_start_location": {
                        "lat": 28.7040873,
                        "lng": 77.1024072
                    },
                    "waypoint_end_location": {
                        "lat": 28.70391189999999,
                        "lng": 77.1022401
                    },
                    "waypoint_distance": {
                        "text": "25 m",
                        "value": 25
                    },
                    "waypoint_duration": {
                        "text": "1 min",
                        "value": 6
                    },
                    "waypoint_polyline": {
                        "points": "qgenDaaruMb@`@"
                    },
                    "maneuver": null,
                    "html_instructions": "Head southwest
Restricted usage road
"
                },
                {
                    "waypoint_start_location": {
                        "lat": 28.70391189999999,
                        "lng": 77.1022401
                    },
                    "waypoint_end_location": {
                        "lat": 28.7037663,
                        "lng": 77.1021109
                    },
                    "waypoint_distance": {
                        "text": "35 m",
                        "value": 35
                    },
                    "waypoint_duration": {
                        "text": "1 min",
                        "value": 12
                    },
                    "waypoint_polyline": {
                        "points": "mfenD_`ruMEF?BA@?@?B@@JHDB@?@?@?HI"
                    },
                    "maneuver": "turn-right",
                    "html_instructions": "Turn right
Restricted usage road
"
                },
                {
                    "waypoint_start_location": {
                        "lat": 28.7037663,
                        "lng": 77.1021109
                    },
                    "waypoint_end_location": {
                        "lat": 28.7035249,
                        "lng": 77.1019008
                    },
                    "waypoint_distance": {
                        "text": "34 m",
                        "value": 34
                    },
                    "waypoint_duration": {
                        "text": "1 min",
                        "value": 12
                    },
                    "waypoint_polyline": {
                        "points": "qeenDe_ruMp@h@"
                    },
                    "maneuver": "turn-right",
                    "html_instructions": "Turn right
Restricted usage road
"
                }
            ],
            "fuel_prices": [
                {
                    "state": "Rajasthan",
                    "lat": 26.911909,
                    "long": 76.4290235,
                    "fuel_prices": {
                        "petrol_price": 105.32,
                        "diesel_price": 90.73,
                        "cng_price": 89.42
                    }
                },
                {
                    "state": "Delhi",
                    "lat": 28.7040873,
                    "long": 77.1024072,
                    "fuel_prices": {
                        "petrol_price": 94.74,
                        "diesel_price": 87.64,
                        "cng_price": 76.61
                    }
                },
                {
                    "state": "Haryana",
                    "lat": 27.7872526,
                    "long": 77.0068131,
                    "fuel_prices": {
                        "petrol_price": 95.38,
                        "diesel_price": 88.21,
                        "cng_price": 82.66
                    }
                }
            ]
        }
    ],
    "lowest_fueldata": {
        "petrol": {
            "state": "Delhi",
            "lat": 28.7040873,
            "long": 77.1024072,
            "fuel_prices": {
                "petrol_price": 94.74,
                "diesel_price": 87.64,
                "cng_price": 76.61
            }
        },
        "diesel": {
            "state": "Delhi",
            "lat": 28.7040873,
            "long": 77.1024072,
            "fuel_prices": {
                "petrol_price": 94.74,
                "diesel_price": 87.64,
                "cng_price": 76.61
            }
        },
        "cng": {
            "state": "Delhi",
            "lat": 28.7040873,
            "long": 77.1024072,
            "fuel_prices": {
                "petrol_price": 94.74,
                "diesel_price": 87.64,
                "cng_price": 76.61
            }
        }
    },
    "highest_fueldata": {
        "petrol": {
            "state": "Rajasthan",
            "lat": 26.911909,
            "long": 76.4290235,
            "fuel_prices": {
                "petrol_price": 105.32,
                "diesel_price": 90.73,
                "cng_price": 89.42
            }
        },
        "diesel": {
            "state": "Rajasthan",
            "lat": 26.911909,
            "long": 76.4290235,
            "fuel_prices": {
                "petrol_price": 105.32,
                "diesel_price": 90.73,
                "cng_price": 89.42
            }
        },
        "cng": {
            "state": "Rajasthan",
            "lat": 26.911909,
            "long": 76.4290235,
            "fuel_prices": {
                "petrol_price": 105.32,
                "diesel_price": 90.73,
                "cng_price": 89.42
            }
        }
    }
}

Support

For any questions or issues, please contact our support team at info@ssrinnovationlab.com