{"success":true,"result":[{"currency":"usd","name":"Alaska","gasoline":"3.312","midGrade":"3.549","premium":"3.776","diesel":"3.541"},{"currency":"usd","name":"Alabama","gasoline":"2.804","midGrade":"3.242","premium":"3.640","diesel":"3.471"},{"currency":"usd","name":"Arkansas","gasoline":"2.779","midGrade":"3.192","premium":"3.570","diesel":"3.323"},{"currency":"usd","name":"Arizona","gasoline":"3.155","midGrade":"3.485","premium":"3.803","diesel":"3.643"},{"currency":"usd","name":"California","gasoline":"4.449","midGrade":"4.679","premium":"4.852","diesel":"4.996"},{"currency":"usd","name":"Colorado","gasoline":"2.984","midGrade":"3.367","premium":"3.688","diesel":"3.417"},{"currency":"usd","name":"Connecticut","gasoline":"3.097","midGrade":"3.718","premium":"4.063","diesel":"3.845"},{"currency":"usd","name":"District of Columbia","gasoline":"3.279","midGrade":"3.866","premium":"4.254","diesel":"3.918"},{"currency":"usd","name":"Delaware","gasoline":"3.203","midGrade":"3.718","premium":"4.016","diesel":"3.772"},{"currency":"usd","name":"Florida","gasoline":"3.217","midGrade":"3.655","premium":"3.970","diesel":"3.676"},{"currency":"usd","name":"Georgia","gasoline":"2.966","midGrade":"3.404","premium":"3.801","diesel":"3.663"},{"currency":"usd","name":"Hawaii","gasoline":"4.555","midGrade":"4.794","premium":"5.040","diesel":"5.307"},{"currency":"usd","name":"Iowa","gasoline":"2.911","midGrade":"3.230","premium":"3.667","diesel":"3.434"},{"currency":"usd","name":"Idaho","gasoline":"3.046","midGrade":"3.306","premium":"3.552","diesel":"3.435"},{"currency":"usd","name":"Illinois","gasoline":"3.280","midGrade":"3.837","premium":"4.286","diesel":"3.650"},{"currency":"usd","name":"Indiana","gasoline":"3.029","midGrade":"3.562","premium":"4.053","diesel":"3.687"},{"currency":"usd","name":"Kansas","gasoline":"2.811","midGrade":"3.139","premium":"3.440","diesel":"3.316"},{"currency":"usd","name":"Kentucky","gasoline":"2.770","midGrade":"3.273","premium":"3.696","diesel":"3.350"},{"currency":"usd","name":"Louisiana","gasoline":"2.777","midGrade":"3.187","premium":"3.557","diesel":"3.377"},{"currency":"usd","name":"Massachusetts","gasoline":"3.043","midGrade":"3.637","premium":"4.000","diesel":"3.799"},{"currency":"usd","name":"Maryland","gasoline":"3.310","midGrade":"3.857","premium":"4.148","diesel":"3.851"},{"currency":"usd","name":"Maine","gasoline":"3.082","midGrade":"3.620","premium":"4.063","diesel":"3.939"},{"currency":"usd","name":"Michigan","gasoline":"3.103","midGrade":"3.628","premium":"4.186","diesel":"3.568"},{"currency":"usd","name":"Minnesota","gasoline":"3.004","midGrade":"3.386","premium":"3.791","diesel":"3.483"},{"currency":"usd","name":"Missouri","gasoline":"2.836","midGrade":"3.181","premium":"3.493","diesel":"3.327"},{"currency":"usd","name":"Mississippi","gasoline":"2.686","midGrade":"3.108","premium":"3.481","diesel":"3.321"},{"currency":"usd","name":"Montana","gasoline":"2.948","midGrade":"3.252","premium":"3.557","diesel":"3.308"},{"currency":"usd","name":"North Carolina","gasoline":"2.918","midGrade":"3.354","premium":"3.744","diesel":"3.612"},{"currency":"usd","name":"North Dakota","gasoline":"2.913","midGrade":"3.214","premium":"3.509","diesel":"3.531"},{"currency":"usd","name":"Nebraska","gasoline":"2.919","midGrade":"3.136","premium":"3.574","diesel":"3.378"},{"currency":"usd","name":"New Hampshire","gasoline":"2.980","midGrade":"3.548","premium":"3.949","diesel":"3.795"},{"currency":"usd","name":"New Jersey","gasoline":"3.100","midGrade":"3.664","premium":"3.903","diesel":"3.795"},{"currency":"usd","name":"New Mexico","gasoline":"2.939","midGrade":"3.342","premium":"3.646","diesel":"3.546"},{"currency":"usd","name":"Nevada","gasoline":"3.660","midGrade":"3.975","premium":"4.213","diesel":"3.796"},{"currency":"usd","name":"New York","gasoline":"3.177","midGrade":"3.687","premium":"4.074","diesel":"3.949"},{"currency":"usd","name":"Ohio","gasoline":"2.988","midGrade":"3.522","premium":"4.030","diesel":"3.567"},{"currency":"usd","name":"Oklahoma","gasoline":"2.701","midGrade":"3.073","premium":"3.366","diesel":"3.151"},{"currency":"usd","name":"Oregon","gasoline":"3.544","midGrade":"3.789","premium":"4.027","diesel":"3.838"},{"currency":"usd","name":"Pennsylvania","gasoline":"3.372","midGrade":"3.803","premium":"4.157","diesel":"4.085"},{"currency":"usd","name":"Rhode Island","gasoline":"3.009","midGrade":"3.700","premium":"4.069","diesel":"3.817"},{"currency":"usd","name":"South Carolina","gasoline":"2.870","midGrade":"3.309","premium":"3.682","diesel":"3.544"},{"currency":"usd","name":"South Dakota","gasoline":"2.921","midGrade":"3.114","premium":"3.556","diesel":"3.411"},{"currency":"usd","name":"Tennessee","gasoline":"2.772","midGrade":"3.197","premium":"3.586","diesel":"3.438"},{"currency":"usd","name":"Texas","gasoline":"2.729","midGrade":"3.186","premium":"3.541","diesel":"3.387"},{"currency":"usd","name":"Utah","gasoline":"2.992","midGrade":"3.242","premium":"3.459","diesel":"3.384"},{"currency":"usd","name":"Virginia","gasoline":"3.098","midGrade":"3.572","premium":"3.935","diesel":"3.710"},{"currency":"usd","name":"Vermont","gasoline":"3.149","midGrade":"3.661","premium":"4.075","diesel":"3.757"},{"currency":"usd","name":"Washington","gasoline":"3.943","midGrade":"4.199","premium":"4.429","diesel":"4.376"},{"currency":"usd","name":"Wisconsin","gasoline":"2.982","midGrade":"3.454","premium":"3.967","diesel":"3.428"},{"currency":"usd","name":"West Virginia","gasoline":"2.975","midGrade":"3.385","premium":"3.814","diesel":"3.604"},{"currency":"usd","name":"Wyoming","gasoline":"2.945","midGrade":"3.215","premium":"3.516","diesel":"3.412"}]}
curl --location --request GET 'https://zylalabs.com/api/3927/gasoline+prices+api/4649/prices?zip=90001&type=regular' --header 'Authorization: Bearer YOUR_API_KEY'
{"status":"success","data":{"station_id":"90002","name":"Exxon","address":{"line1":"3399 Branch Ave , Temple Hills, MD, 20746","line2":"","city":"Temple Hills","state":"MD","postal_code":"20746","country":""},"coordinates":{"lat":"38.8473202","lng":"-76.9530353"},"phone":"","open_status":"","opening_hours":"","rating":{"overall":null,"count":null},"currency":"USD","price_unit":"dollars_per_gallon","fuels":[],"brands":[],"amenities":[],"nearby_station_ids":[]}}
curl --location --request GET 'https://zylalabs.com/api/3927/gasoline+prices+api/24541/station+data&station_id=Required' --header 'Authorization: Bearer YOUR_API_KEY'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Gasoline Prices API simply include your bearer token in the Authorization header.
| 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.
(Save 2 months with annual billing 🎉)
Trusted by leading companies
The Gasoline Prices API is presented as a dynamic and resilient platform, providing users with complete and accurate information on fuel expenses in the United States. In a landscape marked by constant fluctuations in fuel prices, this API emerges as an essential resource for applications that strive to deliver accurate and timely data to users.
A notable feature of the API is the provision of location-specific details. By providing accurate gas prices tailored to specific regions, the API enables applications to disseminate highly relevant data. This functionality is valuable for users who are looking for optimal fuel prices nearby or planning profitable refueling stops during their trips.
Designed with seamless integration in mind, the Gasoline Prices API ensures accessibility for users with varying experience levels, making it easy to effortlessly incorporate gasoline price data into your applications.
The versatility of the API makes it suitable for a wide variety of applications in various industries. Whether used for fuel price comparison, route planning, expense monitoring, or environmental impact assessments, the API can be tailored to meet a variety of needs, making it a valuable asset for users looking to enrich your applications with accurate and relevant fuel price data.
As a cornerstone in the fuel price information space, the Gasoline Prices API equips users with a powerful tool to enhance their applications. With its accuracy, location-specific information, historical data analysis capabilities, and easy-to-use integration, the API enables a broad spectrum of applications to provide users with timely and relevant information, ultimately fostering more informed decision making. in the midst of the complex panorama of fuel prices.
To use this API just run your single endpoint and you will get gas prices from different states.
Gasoline Prices API is a robust and dynamic tool that provides users with access to complete and accurate information on fuel prices throughout the United States.
Zyla provides a wide range of integration methods for almost all programming languages. You can use these codes to integrate with your project as you need.
There are different plans suits everyone including a free trial for small amount of requests, but it’s rate is limit to prevent abuse of the service.
The GET Fuel Costs endpoint returns current gasoline prices for each state in the U.S., including regular, mid-grade, premium gasoline, and diesel prices.
The response data includes fields such as "currency," "name" (state), "gasoline," "midGrade," "premium," and "diesel," providing a comprehensive view of fuel prices by state.
The response data is structured as a JSON object with a "success" boolean and a "result" array containing individual state objects, each with specific fuel price fields.
The endpoint provides location-specific fuel prices, including regular, mid-grade, premium gasoline, and diesel costs for all U.S. states.
The GET Fuel Costs endpoint does not require any parameters; it retrieves data for all states by default, ensuring comprehensive coverage.
Data accuracy is maintained through regular updates from reliable sources, ensuring that users receive the most current fuel price information available.
Typical use cases include fuel price comparison, route planning based on fuel costs, and expense tracking for personal or fleet management applications.
Users can parse the JSON response to extract specific fuel prices for states, enabling applications to display current prices, perform comparisons, or analyze trends over time.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key 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.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
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. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
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.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund