EIA Energy Data Scraper - US Energy Prices & Stats
Pricing
from $2.00 / 1,000 results
EIA Energy Data Scraper - US Energy Prices & Stats
Extract energy data from the US EIA API. Access petroleum prices, natural gas, coal, electricity, nuclear outages, and state energy data. 14 data categories with pagination, facet filtering, and date range support.
Pricing
from $2.00 / 1,000 results
Rating
0.0
(0)
Developer
Professional Edge
Actor stats
0
Bookmarked
2
Total users
0
Monthly active users
10 days ago
Last modified
Categories
Share
EIA Energy Data Scraper
Extract structured energy data from the US Energy Information Administration (EIA) API v2. Access petroleum gasoline and diesel prices, natural gas spot prices, coal production, electricity generation and retail rates, nuclear reactor outages, state-level energy statistics, crude oil imports, and short-term energy outlook projections — all from a single Actor.
This Actor wraps the official EIA open data API and provides full support for pagination, facet filtering, date range queries, and route discovery. Output is delivered as clean, camelCase-normalized JSON ready for dashboards, analytics pipelines, and RAG ingestion.
Features
| Feature | Description |
|---|---|
| 14 Data Categories | Petroleum, natural gas, coal, electricity, nuclear outages, SEDS, STEO, international, crude oil imports, total energy, CO2 emissions, and more |
| Route Discovery | Leave sub-route empty to browse available data endpoints for any category |
| Full Pagination | Automatically pages through large result sets (up to 100,000 records) |
| Facet Filtering | Filter by state, product type, area, process, series, and category-specific facets |
| Date Range Queries | Specify start/end dates in YYYY, YYYY-MM, or YYYY-MM-DD format |
| Rate Limit Handling | Automatic retry with exponential backoff on 429 responses |
| Normalized Output | All field names converted to camelCase; numeric values parsed automatically |
| Free API Access | Works with DEMO_KEY for testing; free API keys available at eia.gov |
How to Scrape EIA Energy Data
Step 1: Get an API Key (Recommended)
Register for a free API key at eia.gov/opendata/register.php. The DEMO_KEY works for testing but is rate-limited to 30 requests per hour.
Step 2: Discover Available Data Routes
Set the route to your category of interest (e.g., petroleum) and leave subRoute empty. The Actor will return all available sub-routes with descriptions:
{"route": "petroleum","subRoute": "","maxResults": 100}
This returns items like:
pri— Prices (gasoline, diesel, spot, futures, heating oil)sum— Summary (supply, disposition, production)crd— Crude Reserves and Productionstoc— Stockscons— Consumption/Sales
Step 3: Drill Into a Sub-Route
Set the subRoute to drill deeper. For example, pri under petroleum has further sub-routes:
{"route": "petroleum","subRoute": "pri","maxResults": 100}
Step 4: Fetch Data
Once you reach a data endpoint, provide frequency, data columns, and optional facets:
{"apiKey": "YOUR_EIA_API_KEY","route": "petroleum","subRoute": "pri/gnd","frequency": "weekly","dataColumns": ["value"],"facets": {"product": ["EPM0"],"duoarea": ["NUS"]},"startDate": "2024-01","maxResults": 100}
Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey | string | No | DEMO_KEY | Your EIA API key (free at eia.gov). Secret field. |
route | string | Yes | petroleum | Energy data category |
subRoute | string | No | (empty) | Sub-route path (e.g., pri/gnd). Leave empty to discover routes. |
frequency | string | No | monthly | Data frequency: weekly, monthly, quarterly, annual |
dataColumns | array | No | ["value"] | Data columns to return |
facets | object | No | {} | Filter facets as key-value pairs |
startDate | string | No | (any) | Start date (YYYY, YYYY-MM, or YYYY-MM-DD) |
endDate | string | No | (any) | End date |
maxResults | integer | No | 1000 | Maximum records to return (up to 100,000) |
Output Example
Each data record is output as a normalized JSON object:
{"period": "2026-03-09","duoarea": "NUS","areaName": "U.S.","product": "EPM0","productName": "Total Gasoline","process": "PTE","processName": "Retail Sales","series": "EMM_EPM0_PTE_NUS_DPG","seriesDescription": "U.S. All Grades All Formulations Retail Gasoline Prices (Dollars per Gallon)","value": 3.633,"units": "$/GAL","frequency": "weekly"}
When in browse/discovery mode (no subRoute), the output contains route metadata:
{"type": "route","routeId": "pri","routeName": "Prices","routeDescription": "Petroleum price data...","fullPath": "petroleum/pri","hint": "Set subRoute to \"pri\" to browse deeper."}
Common Data Routes
| Route | Sub-Route | Description |
|---|---|---|
| petroleum | pri/gnd | Weekly retail gasoline and diesel prices |
| petroleum | pri/spt | Crude oil and product spot prices |
| petroleum | sum/snd | Supply and disposition summary |
| natural-gas | pri/sum | Natural gas prices summary |
| electricity | retail-sales | Electricity retail sales |
| coal | shipments/by-mine-by-plant | Coal shipments |
| total-energy | (data endpoint) | Integrated cross-source statistics |
| seds | (data endpoint) | State-level production, consumption, price by state |
Pricing
- Per result: $0.002 per data record
- Actor start: Free (default platform event cost applies)
- Users pay standard Apify compute costs on top of per-result pricing
Typical costs: 1,000 petroleum price records costs approximately $2.00 in Actor fees plus minimal compute (~$0.01).
Use Cases
- Commodity Trading Dashboards: Track weekly gasoline, diesel, and crude oil price movements
- Energy Analytics Pipelines: Ingest petroleum supply/demand data into BI tools
- Utility Planning: Monitor state-level electricity generation and consumption trends
- ESG Reporting: Pull CO2 emissions and renewable energy data by state
- Academic Research: Access decades of historical energy production and pricing data
- RAG/LLM Pipelines: Feed normalized energy data into retrieval-augmented generation systems
Integrations
Connect this Actor with Zapier, Make, Google Sheets, or use the Apify API to schedule runs and retrieve data programmatically.
Legal Disclaimer
This Actor accesses the publicly available EIA Open Data API. The US Energy Information Administration provides this data freely for public use. Users are responsible for complying with the EIA API Terms of Service. Rate limits should be respected — register for a free API key to avoid DEMO_KEY throttling. This Actor does not bypass any authentication or access controls.
Support
For issues or feature requests, contact the developer through the Apify Store or open an issue on the Actor's page.