# Etherscan API

> Etherscan returns Ethereum gas prices, wallet balances, and transaction details as a workflow and API.

Etherscan returns current Ethereum gas prices, estimated wait times, and estimated ETH transfer costs without requiring input. Get wallet returns ETH balances, displayed token holdings, and newest confirmed transactions for an Ethereum address or ENS name. Check transaction status returns status, confirmations, value, fees, and token transfers for a transaction hash or Etherscan transaction link.

- Page: https://fous.com/workflows/etherscan
- Handle: `@etherscan`
- Category: [Blockchain](https://fous.com/workflows/category/blockchain)
- Source website: https://etherscan.io
- Last verified: Sep 30, 2026
- Fous is not affiliated with Etherscan.

## Methods

### Check transaction status

Operation `check_transaction_status`, version 1. 1 credit per call.

Check whether an Ethereum transaction succeeded, failed, or is pending, with confirmations, value, fee and token transfers. USD amounts are Etherscan’s displayed estimates; pending transactions have no confirmed fee or block time.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `transaction` | string | yes | `"https://etherscan.io/tx/0x9c62122492b32fe4310dfae33090b57589d92927538fbdb8fe8ea2070c25dd8c"` | Transaction hash or Etherscan transaction link, for example 0x9c62122492b32fe4310dfae33090b57589d92927538fbdb8fe8ea2070c25dd8c. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "transaction"
  ],
  "properties": {
    "transaction": {
      "type": "string",
      "description": "Transaction hash or Etherscan transaction link, for example 0x9c62122492b32fe4310dfae33090b57589d92927538fbdb8fe8ea2070c25dd8c.",
      "examples": [
        "https://etherscan.io/tx/0x9c62122492b32fe4310dfae33090b57589d92927538fbdb8fe8ea2070c25dd8c",
        "0xc77cd6b7002fc74c8b1ed74ac3c4a5e9f2d149afdfb26d6b70ae9002de910842",
        "0x592a876dba598d9f0e1b75e2a233560ea4a97b5bdc5b3d0b7b0a63e40fbf71d7"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "transaction": "https://etherscan.io/tx/0x9c62122492b32fe4310dfae33090b57589d92927538fbdb8fe8ea2070c25dd8c"
    },
    {
      "transaction": "0xc77cd6b7002fc74c8b1ed74ac3c4a5e9f2d149afdfb26d6b70ae9002de910842"
    },
    {
      "transaction": "0x592a876dba598d9f0e1b75e2a233560ea4a97b5bdc5b3d0b7b0a63e40fbf71d7"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `to` | string or null | `"0x6FD7D47a09eFaEa0c1Be5355bee97502Ec06d3D7"` | Recipient or interacted-with contract address. |
| `from` | string or null | `"0x5079D8A1160657cf20290E9A3A3cf0fd30B835a0"` | Sender address. |
| `nonce` | integer or null | `40` | Transaction nonce. |
| `status` | string | `"Failed"` | Success, Failed or Pending. |
| `fee_eth` | number or null | `0.000019810474880518` | Paid transaction fee in ETH, or null while pending. |
| `fee_usd` | number or null | `0.05` | Estimated paid transaction fee in USD, or null while pending. |
| `gas_used` | integer or null | `61747` | Gas units spent. |
| `date_time` | string or null | `"2025-08-23T13:09:59Z"` | Block time in UTC, or null while pending. |
| `value_eth` | number or null | `0` | ETH transferred, in ETH. |
| `value_usd` | number or null | `0` | Estimated value, in USD. |
| `block_number` | integer or null | `23203992` | Included block number. |
| `confirmations` | integer | `2876531` | Confirmed blocks since the transaction was included, or zero when pending. |
| `etherscan_link` | string | `"https://etherscan.io/tx/0x9c62122492b32fe4310dfae33090b57589d92927538fbdb8fe8ea2070c25dd8c"` | Transaction page link. |
| `token_transfers` | array |  | ERC-20 and NFT token transfers shown on the transaction page. |
| `token_transfers[].to` | string | `"0xBde99b39E2B0716f63E10C44625F6366936a4522"` | Receiving address. |
| `token_transfers[].from` | string | `"0xAe38b2153413f1f8438340963F298E39e3b25E04"` | Sending address. |
| `token_transfers[].token` | string | `"Tether USD ( USDT )"` | Token name and symbol, with token ID for NFTs. |
| `token_transfers[].amount` | number or null | `103` | Tokens transferred. |

**Example input**

```json
{
  "transaction": "https://etherscan.io/tx/0x9c62122492b32fe4310dfae33090b57589d92927538fbdb8fe8ea2070c25dd8c"
}
```

**Example output**

```json
{
  "to": "0x6FD7D47a09eFaEa0c1Be5355bee97502Ec06d3D7",
  "from": "0x5079D8A1160657cf20290E9A3A3cf0fd30B835a0",
  "nonce": 40,
  "status": "Failed",
  "fee_eth": 0.000019810474880518,
  "fee_usd": 0.05,
  "gas_used": 61747,
  "date_time": "2025-08-23T13:09:59Z",
  "value_eth": 0,
  "value_usd": 0,
  "block_number": 23203992,
  "confirmations": 2876531,
  "etherscan_link": "https://etherscan.io/tx/0x9c62122492b32fe4310dfae33090b57589d92927538fbdb8fe8ea2070c25dd8c",
  "token_transfers": []
}
```

### Get gas price

Operation `get_gas_price`, version 1. 1 credit per call.

Get current Ethereum gas prices and estimated 21,000-gas ETH transfer costs from Etherscan. Wait times are estimates and may be unavailable.

**Input**

No input.

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `currency` | string | `"USD"` | Currency for transfer costs and ETH price. |
| `page_url` | string | `"https://etherscan.io/gastracker"` | Etherscan gas tracker page. |
| `reading_time` | string | `"2026-09-29T03:31:34+00:00"` | UTC time the live gas data was read. |
| `base_fee_gwei` | number | `1.017` | Current Ethereum base fee in gwei. |
| `eth_price_usd` | number | `2665.77` | ETH price in USD shown by Etherscan. |
| `low_wait_time` | string or null | `"~ 2 mins 0 secs"` | Estimated standard confirmation wait, or null if not shown. |
| `high_wait_time` | string or null | `"~ 30 secs"` | Estimated rapid confirmation wait, or null if not shown. |
| `average_wait_time` | string or null | `"~ 30 secs"` | Estimated fast confirmation wait, or null if not shown. |
| `low_gas_price_gwei` | number | `1.017` | Standard gas price in gwei. |
| `high_gas_price_gwei` | number | `1.217` | Rapid gas price in gwei. |
| `low_transfer_cost_usd` | number | `0.057` | Estimated USD cost of a 21,000-gas ETH transfer at the low price. |
| `average_gas_price_gwei` | number | `1.117` | Fast gas price in gwei. |
| `high_transfer_cost_usd` | number | `0.068` | Estimated USD cost of a 21,000-gas ETH transfer at the high price. |
| `average_transfer_cost_usd` | number | `0.063` | Estimated USD cost of a 21,000-gas ETH transfer at the average price. |

**Example input**

```json
{}
```

**Example output**

```json
{
  "currency": "USD",
  "page_url": "https://etherscan.io/gastracker",
  "reading_time": "2026-09-29T03:31:34+00:00",
  "base_fee_gwei": 1.017,
  "eth_price_usd": 2665.77,
  "low_wait_time": "~ 2 mins 0 secs",
  "high_wait_time": "~ 30 secs",
  "average_wait_time": "~ 30 secs",
  "low_gas_price_gwei": 1.017,
  "high_gas_price_gwei": 1.217,
  "low_transfer_cost_usd": 0.057,
  "average_gas_price_gwei": 1.117,
  "high_transfer_cost_usd": 0.068,
  "average_transfer_cost_usd": 0.063
}
```

### Get wallet

Operation `get_wallet`, version 1. 1 credit per call.

See an Ethereum wallet’s ETH balance, USD value, largest displayed ERC-20 holdings and newest confirmed transactions. Pending transactions are excluded; unpriced holdings have no USD value.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `wallet` | string | yes | `"vitalik.eth"` | Ethereum address or ENS name, for example vitalik.eth. |
| `max_transactions` | integer | no | `10` | Maximum confirmed transactions to return, for example 10. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "wallet"
  ],
  "properties": {
    "wallet": {
      "type": "string",
      "description": "Ethereum address or ENS name, for example vitalik.eth.",
      "examples": [
        "vitalik.eth",
        "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
      ]
    },
    "max_transactions": {
      "type": "integer",
      "default": 10,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum confirmed transactions to return, for example 10.",
      "x-fous-developer": true,
      "examples": [
        10,
        50
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "wallet": "vitalik.eth",
      "max_transactions": 10
    },
    {
      "wallet": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "max_transactions": 50
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `link` | string |  | Etherscan wallet page. |
| `address` | string |  | Ethereum wallet address. |
| `ens_name` | string or null |  | ENS name, if shown. |
| `eth_balance` | number |  | ETH held. |
| `eth_value_usd` | number or null |  | Value in US dollars, or null when not shown. |
| `token_holdings` | array |  | Up to 20 token holdings sorted by displayed USD value. |
| `token_holdings[].link` | string |  | Etherscan page for this holding. |
| `token_holdings[].amount` | number |  | Token units held. |
| `token_holdings[].symbol` | string or null |  | Token ticker symbol. |
| `token_holdings[].value_usd` | number or null |  | Value in US dollars, or null when not shown. |
| `token_holdings[].token_name` | string |  | Name of the token. |
| `recent_transactions` | array |  | Newest confirmed wallet transactions first. |
| `recent_transactions[].to` | string or null |  | Receiving address or label. |
| `recent_transactions[].from` | string or null |  | Sending address or label. |
| `recent_transactions[].link` | string |  | Etherscan transaction page. |
| `recent_transactions[].status` | string |  | Final transaction status. |
| `recent_transactions[].fee_eth` | number |  | Transaction fee in ETH. |
| `recent_transactions[].date_time` | string |  | Confirmed transaction time in UTC, ISO 8601. |
| `recent_transactions[].direction` | string |  | Wallet direction. |
| `recent_transactions[].amount_eth` | number |  | Amount of ETH transferred. |
| `recent_transactions[].block_number` | integer |  | Confirmed block number. |
| `recent_transactions[].transaction_hash` | string |  | Transaction hash. |

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@etherscan",
  "visibility": "public",
  "operation": "check_transaction_status",
  "version": 1,
  "input": {
    "transaction": "https://etherscan.io/tx/0x9c62122492b32fe4310dfae33090b57589d92927538fbdb8fe8ea2070c25dd8c"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@etherscan\",\n  \"visibility\": \"public\",\n  \"operation\": \"check_transaction_status\",\n  \"version\": 1,\n  \"input\": {\n    \"transaction\": \"https://etherscan.io/tx/0x9c62122492b32fe4310dfae33090b57589d92927538fbdb8fe8ea2070c25dd8c\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@etherscan",
  "visibility": "public",
  "operation": "check_transaction_status",
  "version": 1,
  "input": {
    "transaction": "https://etherscan.io/tx/0x9c62122492b32fe4310dfae33090b57589d92927538fbdb8fe8ea2070c25dd8c"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@etherscan","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Compare standard, fast, and rapid Ethereum gas prices.
- Review a wallet’s ETH balance and displayed token holdings.
- Track a wallet’s newest confirmed transactions.
- Check whether an Ethereum transaction succeeded, failed, or is pending.
- Review transaction fees, confirmations, and token transfers.

## FAQ

### Is Fous affiliated with Etherscan?

No. Fous is not affiliated with Etherscan. This workflow reads the public etherscan.io website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Etherscan account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from etherscan.io when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 30, 2026.

### What are current Ethereum gas prices?

Get gas price returns current base fee, standard, fast, and rapid gas prices, and estimated wait times when shown.

### What is an Ethereum wallet’s balance?

Get wallet returns the ETH balance, displayed USD value, token holdings, and newest confirmed transactions for an address or ENS name.

### Did an Ethereum transaction succeed?

Check transaction status returns whether a transaction succeeded, failed, or is pending, along with confirmations and other transaction details.

## Related

- [mempool.space API](https://fous.com/workflows/mempool-space.md): mempool.space provides Bitcoin mempool, transaction fee, block, price, and address activity data, including current fee estimates and up to 50 recent address transactions.
- [GasBuddy API](https://fous.com/workflows/gasbuddy.md): GasBuddy finds stations and community-reported fuel prices in the US and Canada, with nearby prices that may be missing or out of date and regional averages that may lag the day.
- [US Energy Information Administration API](https://fous.com/workflows/us-energy-information-administration.md): US Energy Information Administration provides official energy statistics and analysis, including latest weekly fuel prices and preliminary monthly state electricity prices with historical comparisons.
- [AAA API](https://fous.com/workflows/aaa.md): AAA daily gas price averages for the United States, states and metro areas.
- [Coinbase API](https://fous.com/workflows/coinbase.md): Coinbase provides public cryptocurrency prices and market overviews, including changing spot, buy, and sell quotes and 24-hour statistics; unavailable page facts may be missing.
- [FuelEconomy.gov API](https://fous.com/workflows/fueleconomy-gov.md): FuelEconomy.gov provides official vehicle fuel economy ratings, driving range, emissions, five-year savings, and annual fuel costs based on current fuel prices and EPA’s 15,000-mile annual driving assumption.
- [Stock Analysis API](https://fous.com/workflows/stock-analysis.md): Stock Analysis returns free-period company statements, statistics current as of its displayed date, typically top-25 ETF holdings, and US IPOs since 2019 with potentially missing prices or returns.
- [CoinGecko API](https://fous.com/workflows/coingecko.md): CoinGecko returns cryptocurrency prices and histories, sector rankings and details, and trending coins; non-USD historical values cover 365 days, histories 7–365 days, and today’s prices may change.
- [All Blockchain workflows](https://fous.com/workflows/category/blockchain)
