Etherscan Gas Tracker Scraper avatar

Etherscan Gas Tracker Scraper

Pricing

from $0.24 / 1,000 gas tracker samples

Go to Apify Store
Etherscan Gas Tracker Scraper

Etherscan Gas Tracker Scraper

⛽ Monitor Ethereum gas prices from Etherscan. Export safe, proposed, fast, base-fee, latest-block, and gas-used-ratio snapshots.

Pricing

from $0.24 / 1,000 gas tracker samples

Rating

5.0

(1)

Developer

Automation Lab

Automation Lab

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

9 days ago

Last modified

Share

Monitor Ethereum gas prices with timestamped snapshots from Etherscan's public gas oracle API.

This Apify Actor collects safe, proposed, fast, base-fee, latest-block, and gas-used-ratio data in a clean dataset that is ready for dashboards, alerts, spreadsheets, and scheduled fee monitoring workflows.

What does Etherscan Gas Tracker Scraper do?

Etherscan Gas Tracker Scraper calls the Etherscan V2 gas oracle endpoint and saves one dataset row per gas-price snapshot.

It is designed for scheduled monitoring rather than one-off page scraping.

You can run it once for the current gas state, or collect multiple samples with a fixed interval.

The actor works without an Etherscan API key.

If you add your own Etherscan API key, you can use lower intervals according to your Etherscan plan.

Who is it for?

Crypto traders use it to monitor cheaper transaction windows.

Wallet developers use it to compare gas fee suggestions for UX decisions.

DeFi teams use it for operational dashboards and cost alerts.

Data analysts use it to collect historical gas snapshots on a schedule.

Automation builders use it as a lightweight Ethereum gas monitor in larger workflows.

Why use this gas tracker?

It uses the official Etherscan V2 gas oracle JSON endpoint.

It does not rely on Cloudflare-challenged HTML pages.

It exports normalized numeric fields.

It supports repeated samples in one run.

It protects no-key users by enforcing Etherscan's public rate limit.

It can include the raw Etherscan response for audits when needed.

Data you can extract

FieldDescription
timestampISO time when the request completed (success or failure)
chainIdEtherscan V2 chain ID queried
sampleIndex1-based sample number
lastBlockLast block from the gas oracle
safeGasPriceGweiSafe gas price in Gwei
proposeGasPriceGweiProposed gas price in Gwei
fastGasPriceGweiFast gas price in Gwei
suggestedBaseFeeGweiSuggested base fee in Gwei
gasUsedRatioParsed gas-used ratios as numbers
gasUsedRatioRawOriginal comma-separated gas-used-ratio value
sourceUrlEtherscan API URL without your API key
statusok or error
errorError details when a sample fails

How much does it cost to monitor Etherscan gas prices?

This actor uses pay-per-event pricing.

You pay a small start fee per run and a gas-sample fee only for each validated successful snapshot. Failed attempts remain visible as error rows but do not incur a per-sample fee.

For most users, scheduled one-sample runs are inexpensive because the actor performs one HTTP API request and exits quickly.

Longer monitoring runs cost more because they collect more timestamped samples.

Quick start

  1. Open the actor on Apify.

  2. Keep chainId set to 1 for Ethereum mainnet.

  3. Set samples to 1 for a current gas snapshot.

  4. Set samples higher if you want a short monitoring session.

  5. Leave apiKey empty unless you have an Etherscan key.

  6. Click Start.

  7. Export the dataset as JSON, CSV, Excel, or via API.

Input configuration

chainId selects the Etherscan V2 chain.

1 is Ethereum mainnet.

samples controls how many snapshots are saved.

intervalSeconds controls the delay between snapshots.

apiKey is optional and secret.

includeRawResponse adds the original Etherscan result object.

maxRetries controls retries for transient errors and rate limits.

One current snapshot

{
"chainId": 1,
"samples": 1,
"intervalSeconds": 5
}

Short scheduled monitor

{
"chainId": 1,
"samples": 20,
"intervalSeconds": 6
}

With an Etherscan API key

{
"chainId": 1,
"samples": 20,
"intervalSeconds": 1,
"apiKey": "YOUR_ETHERSCAN_API_KEY"
}

Output example

{
"timestamp": "2026-07-04T02:30:00.000Z",
"chainId": 1,
"sampleIndex": 1,
"source": "etherscan-gas-oracle-v2",
"status": "ok",
"lastBlock": 25456622,
"safeGasPriceGwei": 0.070173264,
"proposeGasPriceGwei": 0.070304905,
"fastGasPriceGwei": 0.071173264,
"suggestedBaseFeeGwei": 0.070173264,
"gasUsedRatioRaw": "0.4214426,0.852954983333333,0.407436"
}

Scheduling ideas

Run every five minutes for a live gas dashboard.

Run every hour for daily fee trend analysis.

Run before high-volume wallet or contract operations.

Run alongside transaction simulation or swap routing jobs.

Run with webhooks to notify a team when gas drops below your own threshold.

Integrations

Send dataset rows to Google Sheets for a fee history sheet.

Use Apify webhooks to trigger Slack, Discord, or email alerts.

Pull results into a BI dashboard.

Store snapshots in a database for long-term Ethereum gas analytics.

Combine with wallet, DeFi, or NFT automation actors from https://apify.com/automation-lab/.

API usage with Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/etherscan-gas-tracker-scraper').call({
chainId: 1,
samples: 1,
intervalSeconds: 5
});
console.log(run.defaultDatasetId);

API usage with Python

from apify_client import ApifyClient
import os
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/etherscan-gas-tracker-scraper').call({
'chainId': 1,
'samples': 1,
'intervalSeconds': 5,
})
print(run['defaultDatasetId'])

API usage with cURL

curl -X POST 'https://api.apify.com/v2/acts/automation-lab~etherscan-gas-tracker-scraper/runs?token=YOUR_APIFY_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"chainId":1,"samples":1,"intervalSeconds":5}'

MCP usage

Use Apify MCP with Claude Code or Claude Desktop to run this actor from chat.

MCP endpoint:

https://mcp.apify.com/?tools=automation-lab/etherscan-gas-tracker-scraper

Claude Code setup:

$claude mcp add --transport http apify-etherscan-gas-tracker "https://mcp.apify.com/?tools=automation-lab/etherscan-gas-tracker-scraper"

Claude Desktop JSON config:

{
"mcpServers": {
"apify-etherscan-gas-tracker": {
"url": "https://mcp.apify.com/?tools=automation-lab/etherscan-gas-tracker-scraper"
}
}
}

Cursor setup: Add a remote MCP server named apify-etherscan-gas-tracker with the HTTP endpoint above in Cursor's MCP settings.

VS Code setup: Add an HTTP MCP server with the same endpoint in your VS Code MCP server configuration.

Example prompts:

  • "Run the Etherscan gas tracker scraper and summarize current safe, propose, and fast gas."

  • "Collect 12 Ethereum gas samples and tell me whether fees are trending up."

  • "Export the latest Etherscan gas tracker dataset as CSV."

Tips for no-key mode

No-key Etherscan responses are rate-limited.

Keep intervalSeconds at five or higher.

Use one-sample scheduled runs for recurring monitoring.

Add an API key if you need tighter sampling intervals.

Do not scrape Etherscan HTML pages for this workflow; the API endpoint is more reliable.

Error handling

The actor times out each request after 8 seconds and retries transport failures, HTTP 429/5xx, and explicit temporary API errors up to maxRetries times. It honors bounded Retry-After values (at most 30 seconds). Permanent API errors and malformed successful responses are not retried. API keys, response bodies, and full request URLs are never included in error messages.

If a sample still fails, it saves an error row instead of hiding the problem. The timestamp records the completed attempt; error rows do not incur a gas-sample fee. If every sample fails, the run exits with a failure status so schedules can alert you; the diagnostic error rows remain in the dataset. A run with at least one valid snapshot succeeds and retains any error rows for failed samples.

This makes scheduled runs easier to audit.

Check the status and error fields before using a row in alerts.

Data handling and dependencies

This HTTP-only Actor sends the chain ID and optional user-supplied API key to Etherscan's V2 API. It uses no AI model or other third-party service, does not log the API key, and stores only the optional raw gas oracle result and normalized numeric snapshot or a sanitized error in Apify's per-run dataset. No custom cache or persistent sessions are created. Apify controls dataset and run-log retention and deletion under your account settings; delete runs/datasets in Console when no longer needed. The Actor does not control Etherscan's handling of API requests or keys. It is independently operated, not affiliated with or endorsed by Etherscan or Apify.

Legality and responsible use

This actor uses Etherscan's public gas oracle API.

Respect Etherscan's API terms and rate limits.

If you run high-frequency monitoring, use your own Etherscan API key.

Do not use the actor to overload public endpoints.

FAQ

Does it need an Etherscan API key?

No. It works without a key, but no-key mode is slower.

Why are intervals below five seconds raised?

Etherscan's no-key response states that a 1 request per 5 seconds limit is applied.

Can it monitor chains other than Ethereum mainnet?

The actor accepts any positive Etherscan V2 chainId, but the default and primary workflow is Ethereum mainnet.

Why do I get an error row?

A transient API error, invalid chain ID, or rate limit may have occurred. Review error and retry with a longer interval.

Explore related automation-lab actors at https://apify.com/automation-lab/.

Useful adjacent workflows include wallet monitoring, blockchain explorer extraction, DeFi analytics, and API health checks.

Support

If you need another gas metric or chain-specific output, open an issue on the actor page.

Include your input JSON and the run ID so the problem can be reproduced.

Changelog

See the Actor changelog for the current release history.

Developer notes

The actor is intentionally HTTP-only.

It avoids Playwright because the Etherscan HTML pages may be Cloudflare challenged while the gas oracle JSON endpoint returns the target data directly.

Storage

Results are saved to the default dataset.

You can download data in JSON, CSV, XML, Excel, RSS, or HTML table formats from Apify.

Performance

A single sample usually completes quickly.

The run timeout is 900 seconds. Before starting, the actor checks (samples - 1) × effective intervalSeconds + samples × 8 seconds against an 840-second working budget (60 seconds reserved for startup and dataset/charge operations). Plans over that budget fail explicitly before any per-sample charge; retries may consume additional time, and a run that exhausts its remaining budget fails explicitly instead of silently truncating samples. No-key intervals below five seconds are raised to five. A 20-sample/6-second run has 114 seconds of intervals, plus requests, startup and any retries; it is not guaranteed to finish at an exact wall-clock time. For longer history, schedule smaller runs periodically.

Final reminder

Start small with one sample.

Schedule recurring runs if you need long-term gas history.

Use an API key for higher-frequency monitoring.