Gas Prices

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.

get/gas-prices

Request

  • Base URL: https://api.dataporium.io
  • URL: https://api.dataporium.io/gas-prices
  • Auth: API key in query parameter apikey

Query parameters

areastring

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

area_typestring

country, region, state or city

statestring

State of the area (states and cities)

productstring

regular, midgrade, premium, all_grades or diesel (comma-separated; default all)

date_fromstring

First week: YYYY-MM-DD, YYYY-MM or YYYY

date_tostring

Last week: YYYY-MM-DD, YYYY-MM or YYYY

latestboolean

true = only the newest week, with the changes

sortstring

week_date (default), price_usd, area_name or area_code; with latest=true also change_1w, change_4w, change_52w, change_52w_pct

orderstring

asc or desc

limitinteger

Rows per page, 1 to 1000 (default 100)

offsetinteger

Rows to skip, for paging

Response

Successful response (JSON).

object required

Changes

No recorded changes to this operation across all 1 revision of this API.