# Etherscan — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access data from etherscan.io.

**Category:** Web3 & Onchain | **Website:** [etherscan.io/](https://etherscan.io/) | **Docs:** [parse.bot/marketplace/823989b9-6285-4602-b724-570152bd17a3/etherscan-io-api](https://parse.bot/marketplace/823989b9-6285-4602-b724-570152bd17a3/etherscan-io-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/etherscan/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get address erc20 token transfers

Returns paginated list of ERC-20 token transfer events for an address. Each transfer includes tx hash, method, block, from/to, amount, and token name.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `address` | string | Yes | Ethereum address (0x-prefixed, 42 characters) |
| `page` | integer | No | Page number |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/etherscan/get-address-erc20-token-transfers \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"address":"<string>","page":"<integer>"}'
```

### Get address internal transactions

Returns paginated list of internal transactions for an address. Each record includes block, parent tx hash, type, method, from/to addresses, and value.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `address` | string | Yes | Ethereum address (0x-prefixed, 42 characters) |
| `page` | integer | No | Page number |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/etherscan/get-address-internal-transactions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"address":"<string>","page":"<integer>"}'
```

### Get address nft transfers

Returns paginated list of NFT (ERC-721/ERC-1155) transfer events for an address via Etherscan's internal API. Includes structured data with tx hash, method, from/to, token details, and timestamps.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `address` | string | Yes | Ethereum address (0x-prefixed, 42 characters) |
| `page` | integer | No | Page number |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/etherscan/get-address-nft-transfers \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"address":"<string>","page":"<integer>"}'
```

### Get address overview

Returns summary info for an Ethereum address: ETH balance, ETH value in USD, token holdings, labels, and ENS name. The address must be a valid 0x-prefixed Ethereum address or ENS-resolved address.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `address` | string | Yes | Ethereum address (0x-prefixed, 42 characters) |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/etherscan/get-address-overview \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"address":"<string>"}'
```

### Get address token holdings

Returns the list of token holdings for an Ethereum address, including ERC-20 tokens with balances and USD values, and ERC-721/ERC-1155 NFTs. Data is extracted from the address overview page's token dropdown, which lists the first 200 ERC-20 tokens and all NFT holdings. Each token entry includes the contract address, name, balance, USD value, and token standard type.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `address` | string | Yes | Ethereum address (0x-prefixed, 42 characters) |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/etherscan/get-address-token-holdings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"address":"<string>"}'
```

### Get address transactions

Returns paginated list of normal transactions for an address. Each transaction includes hash, method, block, timestamps, from/to addresses, value, and fees. Results are ordered by most recent first.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `address` | string | Yes | Ethereum address (0x-prefixed, 42 characters) |
| `page` | integer | No | Page number |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/etherscan/get-address-transactions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"address":"<string>","page":"<integer>"}'
```

### Get block details

Returns details for a block by block number including timestamp, gas usage, fees, reward, and validator info. Fields are extracted from the block detail page with their Etherscan labels as keys.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `block_number` | string | Yes | Block number as a numeric string |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/etherscan/get-block-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"block_number":"<string>"}'
```

### Get eth price and stats

Returns current ETH price in USD and median gas price from the Etherscan homepage. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/etherscan/get-eth-price-and-stats \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get gas tracker

Returns current Ethereum gas prices (low, average, high) in gwei with base fee and priority fee details. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/etherscan/get-gas-tracker \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get transaction details

Returns full details of a transaction by hash including status, block, timestamp, from/to, value, gas fees, and input data. Fields are extracted from the transaction detail page with their Etherscan labels as keys.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `tx_hash` | string | Yes | Transaction hash (0x-prefixed, 66 characters) |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/etherscan/get-transaction-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"tx_hash":"<string>"}'
```

### Search

Searches Etherscan for a query (address, transaction hash, block number, ENS name) and returns the resolved result. For addresses and ENS names, returns the resolved address. For transactions and blocks, returns the identifier and type.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query - Ethereum address, transaction hash, block number, or ENS name |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/etherscan/search \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.