Gas Prices

Daily Local Gas Prices

Daily average retail pump prices in US dollars per gallon for the United States, every state and DC, about 470 metro areas and about 3,100 counties: regular, midgrade, premium and diesel (counties: regular). A separate daily series from the weekly survey of /gas-prices; the two are never combined.

All filters are optional. The answer is {total, limit, offset, sort, order, unit, as_of, rows, about}; as_of is the newest day.

get/gas-prices/local

Request

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

Query parameters

areastring

Area code(s) or exact name(s), comma-separated: US, a state code (AZ), a 5-digit county FIPS code (04013) or a metro area code (a CBSA code such as 38060, or a code like CA_ORANGE_COUNTY)

area_typestring

country, state, metro or county (comma-separated)

statestring

US state: 2-letter code or name

countystring

County name with or without the word County (add state)

county_fipsstring

5-digit county FIPS code(s)

metrostring

Part of a metro area name

productstring

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

date_fromstring

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

date_tostring

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

latestboolean

true = only the newest day, with the changes

sortstring

price_date (default), price_usd, area_name or area_code; with latest=true area_name (default), price_usd, change_1d, change_1w, change_1m, change_1y or change_1y_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.