EIA Energy Data Scraper
parseforge/eia-energy-data-scraper
Developer toolsAutomationOther
Scrapes EIA energy data including gas prices by state, diesel prices by region, and crude oil weekly prices. Returns each record as a flat row with price, date, and region.
- Total users
- 2
- Monthly active
- 0
- Total runs
- 143
- Bookmarked
- 0
- Rating
- Not rated yet
- Last modified
- 12 days ago
Overview
EIA Energy Data Scraper
Scrape EIA energy data for gas prices, diesel prices, and crude oil weekly prices, up to a million records per run. Every record comes with its price, date, and geographic region in a flat, analysis-ready schema. No API key or registration required. Export to CSV, JSON, Excel, or XML.
The U.S. Energy Information Administration publishes critical energy data, but downloading it manually means navigating complex web tools and reformatting spreadsheets. This Actor reads the public data feeds directly, letting you pull gas prices by state, diesel prices by region, or crude oil weekly prices into a single, consistent dataset. It handles pagination and rate limits so you get every record you need without writing a script.
| Who uses it | What they scrape EIA for |
|---|---|
| Energy analysts | Tracking weekly crude oil price movements for market reports. |
| Fleet managers | Monitoring state-level gas and diesel prices to budget fuel costs. |
| Economic researchers | Building historical price series to model inflation or consumer spending. |
| Data journalists | Pulling the latest regional fuel prices for a news story on energy costs. |
What it does
This Actor collects EIA energy data from the selected dataset and returns each record as a flat row with price, date, and geographic region.
- โฝ Gas Prices by State: Weekly retail gasoline prices for every U.S. state, including regular, midgrade, and premium grades.
- ๐ข๏ธ Diesel Prices by Region: Weekly on-highway diesel prices broken out by U.S. region and California sub-regions.
- ๐ Crude Oil Weekly Prices: Weekly spot prices for West Texas Intermediate, Brent, and other key crude benchmarks.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with EIA data
โฝ Monitor retail fuel costs by state.
A fleet operator pulls weekly gas and diesel prices for their operating states to forecast monthly fuel spend and adjust routing budgets.
๐ Build a crude oil price history.
An energy analyst scrapes the full crude oil weekly dataset to backtest trading strategies against WTI and Brent spot prices.
๐ฐ Feed a news dashboard with energy prices.
A data journalist schedules a weekly run of gas prices by state to populate an interactive map showing where prices are rising fastest.
๐งช Enrich economic models with fuel data.
A researcher collects diesel prices by region to correlate transportation costs with consumer price index changes across U.S. regions.
Why choose this scraper
| What you get | |
|---|---|
| No API key | Reads public EIA data feeds directly, no registration or token management. |
| Consistent schema | Every record arrives with the same columns, ready for analysis or a database. |
| Historical depth | Pull years of weekly pricing data in a single run. |
| Flexible export | Save results as CSV, JSON, Excel, or XML for your existing workflow. |
How it compares
No other Store actor targets EIA the same way, so the honest comparison is with the alternatives teams actually weigh.
| EIA Energy Data Scraper | Build it in-house | By hand | |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When EIA changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |
Configure the run
Drive the Actor by selecting one of three EIA datasets, and set a maximum record count to cap the run. The Input tab lists every parameter.
A first run with the defaults:
{
"dataset": "gas-prices-by-state",
"maxItems": 10
}
A larger pull:
{
"dataset": "gas-prices-by-state",
"maxItems": 200
}
Pricing
Pay-per-result: $0.0065 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $0.65 |
| 1,000 results | $6.50 |
| 10,000 results | $65.00 |
New Apify accounts start with $5 in free credit.
Free users
Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.
Run it
- Create a free Apify account with $5 in credit.
- Open the EIA Energy Data Scraper.
- Set your inputs and any filters, then click Start.
- Export the results as CSV, Excel, JSON, or XML from the Dataset tab.
Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.
Use with AI agents (MCP)
Give an AI agent live access to EIA through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/eia-energy-data-scraper"
Then prompt it in plain language to run the scraper and read back the results.
Troubleshooting
Why am I getting no results?
Check that you selected a valid dataset in the input configuration. Also verify that the EIA website is reachable and that your maxItems setting is not set to zero.
The run is taking too long.
Large datasets with many years of history can take time to paginate through. Reduce the maxItems value to collect a smaller sample, or let the run complete for a full historical pull.
Some records have missing price values.
The EIA occasionally publishes records with null or missing values when data is not available for a specific date or region. This is expected and reflects the source data.
I need a dataset that is not listed.
This Actor currently supports three specific EIA datasets. If you need another EIA data product, you can request it as a feature addition or use a generic web scraper to target the page directly.
The export file has duplicate rows.
The Actor does not deduplicate records. If you run it multiple times over overlapping date ranges, you may see duplicates. Deduplicate in your analysis tool using the date and region columns.
FAQ
| Question | Answer |
|---|---|
| Do I need an EIA API key to use this Actor? | No. This Actor reads the public data feeds from the EIA website directly. You do not need to register for an API key or manage any authentication. |
| What EIA datasets can I scrape? | You can choose from three datasets: Gas Prices by State, Diesel Prices by Region, and Crude Oil Weekly Prices. Select the one you need in the input configuration. |
| How far back does the historical data go? | The Actor pulls all available records from the selected dataset, which typically includes several years of weekly pricing history. The exact start date varies by dataset. |
| Can I filter by a specific state or region? | The Actor returns all geographic areas in the selected dataset. You can filter the results after export using your own tools, or set a maximum record count to limit the run. |
| What format does the data come in? | You can export the scraped data to CSV, JSON, Excel, or XML directly from the Apify platform. The schema is flat and consistent across all records. |
| How often is the EIA data updated? | The EIA updates its datasets on a regular schedule, typically weekly. You can schedule this Actor to run on the same cadence to keep your data current. |
| Can I scrape more than one dataset in a single run? | Each run scrapes one dataset at a time. To collect multiple datasets, run the Actor separately for each one and combine the results afterward. |
| Is there a limit to how many records I can collect? | You can set a maximum of up to 1,000,000 records per run. The actual number of records available depends on the dataset and how much history the EIA publishes. |
| Does this Actor handle pagination automatically? | Yes. The Actor follows all pages in the data feed automatically. You do not need to manage offsets or page tokens. |
| Can I run this on a schedule? | Yes. Apify supports scheduled runs. You can set this Actor to run weekly to capture the latest EIA energy data as soon as it is published. |
Related actors
Browse the full ParseForge collection for more scrapers.
๐ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.
โ ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by U.S. Energy Information Administration. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.
Input
| Field | Type | What it does | Default |
|---|---|---|---|
| dataset required | string (3 options) | Select the EIA energy dataset to scrape | gas-prices-by-state |
| maxItems | integer | Maximum number of records to collect per run. | 10 |
Pricing
from $6.00 per 1,000 results
| Charged for | What it is | Price each |
|---|---|---|
| result | Single result in the default dataset. | $0.006 to $0.0065 |
Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.
API
One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.
curl -X POST "https://api.apify.com/v2/acts/parseforge~eia-energy-data-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"helloWorld": 123
}' Examples
Input that runs as-is.
{
"helloWorld": 123
} Reviews
No reviews yet. Be the first.
Issues
We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.
Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.
