Gas Prices
Weekly retail pump prices in US dollars per gallon, taxes included, from the official US government weekly survey: regular, midgrade and premium gasoline, all grades together, and diesel, for the United States, its fuel regions, 9 states (CA, CO, FL, MA, MN, NY, OH, TX, WA) and 10 cities (Boston, Chicago, Cleveland, Denver, Houston, Los Angeles, Miami, New York City, San Francisco, Seattle).
All filters are optional. The answer is {total, limit, offset, sort, order, unit, as_of, rows, about}; as_of is the newest survey week.
Request
- Base URL: https://api.dataporium.io
- URL: https://api.dataporium.io/gas-prices
- Auth: API key in query parameter apikey
Query parameters
Area code(s) or name(s), comma-separated: US; regions R1 East Coast, R1A New England, R1B Central Atlantic, R1C Lower Atlantic, R2 Midwest, R3 Gulf Coast, R4 Rocky Mountain, R5 West Coast, R5X West Coast except California; a state code; or a city name
country, region, state or city
State of the area (states and cities)
regular, midgrade, premium, all_grades or diesel (comma-separated; default all)
First week: YYYY-MM-DD, YYYY-MM or YYYY
Last week: YYYY-MM-DD, YYYY-MM or YYYY
true = only the newest week, with the changes
week_date (default), price_usd, area_name or area_code; with latest=true also change_1w, change_4w, change_52w, change_52w_pct
asc or desc
Rows per page, 1 to 1000 (default 100)
Rows to skip, for paging
Response
Successful response (JSON).
Changes
No recorded changes to this operation across all 1 revision of this API.