data_browser
Query any EIA APIv2 data route directly by path, with facet filters and pagination.
Examples
from openbb import obb
# Query any APIv2 route directly - Brent spot price, monthly.
obb.eia.data_browser(provider='eia', route='petroleum/pri/spt', frequency='monthly', facets='product:EPCBRENT', limit=12)
Parameters
- standard
- eia
route: str
The API route to query, e.g. 'petroleum/pri/spt' or 'electricity/rto/region-data'.
frequency: str | None
The data frequency id, e.g. 'monthly'. The default is the route's native frequency.
data_type: str | None
Data column id(s) to return, comma-separated, e.g. 'value' or 'quantity,price'. The default returns every column available for the route.
facets: str | None
Facet filters as 'facetId:value' pairs separated by semicolons, with multiple values comma-separated, e.g. 'duoarea:NUS;product:EPD2D,EPD2DXL0'.
start_date: date | None | str
Start date of the data, in YYYY-MM-DD format.
end_date: date | None | str
End date of the data, in YYYY-MM-DD format.
sort: str | None
Default: asc
Sort the results by date.
limit: int | None
Maximum number of rows to return. The default returns all rows, paginating requests as needed.
Returns
results: EiaDataBrowser
Serializable results.
provider: str | None
Provider name.
warnings: Optional[list[Warning_]]
List of warnings.
chart: Optional[Chart]
Chart object.
extra: dict[str, Any]
Extra info.
Data
- standard
- eia
date: date | datetime | str
Start of the period the record covers. Hourly frequencies return a timestamp.