# Etherscan — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-etherscan-io-api-823989b9/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-etherscan-io-api-823989b9/get_address_erc20_token_transfers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-etherscan-io-api-823989b9/get_address_internal_transactions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-etherscan-io-api-823989b9/get_address_nft_transfers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-etherscan-io-api-823989b9/get_address_overview \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-etherscan-io-api-823989b9/get_address_token_holdings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-etherscan-io-api-823989b9/get_address_transactions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-etherscan-io-api-823989b9/get_block_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-etherscan-io-api-823989b9/get_eth_price_and_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-etherscan-io-api-823989b9/get_gas_tracker \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-etherscan-io-api-823989b9/get_transaction_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-etherscan-io-api-823989b9/search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
