EIA Energy Data Scraper - US Energy Prices & Stats avatar

EIA Energy Data Scraper - US Energy Prices & Stats

Pricing

from $2.00 / 1,000 results

Go to Apify Store
EIA Energy Data Scraper - US Energy Prices & Stats

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

Professional Edge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

10 days ago

Last modified

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

FeatureDescription
14 Data CategoriesPetroleum, natural gas, coal, electricity, nuclear outages, SEDS, STEO, international, crude oil imports, total energy, CO2 emissions, and more
Route DiscoveryLeave sub-route empty to browse available data endpoints for any category
Full PaginationAutomatically pages through large result sets (up to 100,000 records)
Facet FilteringFilter by state, product type, area, process, series, and category-specific facets
Date Range QueriesSpecify start/end dates in YYYY, YYYY-MM, or YYYY-MM-DD format
Rate Limit HandlingAutomatic retry with exponential backoff on 429 responses
Normalized OutputAll field names converted to camelCase; numeric values parsed automatically
Free API AccessWorks with DEMO_KEY for testing; free API keys available at eia.gov

How to Scrape EIA Energy Data

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 Production
  • stoc — Stocks
  • cons — 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

ParameterTypeRequiredDefaultDescription
apiKeystringNoDEMO_KEYYour EIA API key (free at eia.gov). Secret field.
routestringYespetroleumEnergy data category
subRoutestringNo(empty)Sub-route path (e.g., pri/gnd). Leave empty to discover routes.
frequencystringNomonthlyData frequency: weekly, monthly, quarterly, annual
dataColumnsarrayNo["value"]Data columns to return
facetsobjectNo{}Filter facets as key-value pairs
startDatestringNo(any)Start date (YYYY, YYYY-MM, or YYYY-MM-DD)
endDatestringNo(any)End date
maxResultsintegerNo1000Maximum 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

RouteSub-RouteDescription
petroleumpri/gndWeekly retail gasoline and diesel prices
petroleumpri/sptCrude oil and product spot prices
petroleumsum/sndSupply and disposition summary
natural-gaspri/sumNatural gas prices summary
electricityretail-salesElectricity retail sales
coalshipments/by-mine-by-plantCoal 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.

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.