> ## Documentation Index
> Fetch the complete documentation index at: https://docs.etherscan.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Make Your First Call

> Make your first Etherscan API request with a worked curl example and a parameter breakdown.

You need an API key first. If you do not have one, [set it up here](https://docs.etherscan.io/set-up-your-api-key.md).

**1. Call the API**

This reads the native ETH balance of an address on Ethereum. Replace `YourApiKey` with your key, then run it in your command line:

```bash theme={null}
curl --request GET \
  --url 'https://api.etherscan.io/v2/api?chainid=1&module=account&action=balance&address=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&tag=latest&apikey=YourApiKey'
```

* `chainid`: selects the chain. E.g. 1 (Ethereum).
* `module` and `action`: choose the endpoint. E.g. account and balance.
* `address`: the account you are querying. E.g. 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045.
* `tag`: the block to read the balance at. E.g. latest.
* `apikey`: your API key. Replace YourApiKey with your API key.

Alternatively, you can open the [API playground](https://docs.etherscan.io/api-reference/endpoint/balance.md?playground=open) and paste the example values in blue to call the endpoint.

> [!TIP]
>
> The same key and endpoint work on every chain, just switch the `chainid`. For example, set `chainid=42161` to read the same address on Arbitrum. See [Supported chains](https://docs.etherscan.io/supported-chains.md) for the full list.

> [!WARNING]
>
> Your key counts against your plan rate limits, so treat it like a credential. See [Keep your key secure](#keep-your-key-secure) below.

**2. Read the response**

```json theme={null}
{
  "status": "1",
  "message": "OK",
  "result": "172774397764084972158218"
}
```

* `status`: `1` on success, `0` on error.
* `message`: `OK` on success, `NOTOK` on error.
* `result`: the data. Here, the balance in wei. Divide by 10^18 for ETH. On error, `result` holds the cause. See [Common error messages](https://docs.etherscan.io/common-error-messages.md).

## Keep your key secure

Your key counts against your rate limits, so treat it like a credential.

> [!WARNING]
>
> Never commit keys to public repositories or ship them in client-side code. Route API calls through your own backend instead.

* Store keys in environment variables or a secrets manager, not in source files.
* Rotate a key if it leaks: stop using the exposed key, remove it from your [API dashboard](https://etherscan.io/apidashboard), and create a new one there.

> [card] [Rate Limits](https://docs.etherscan.io/rate-limits.md)
>
> The calls per second and daily limits for each plan.

> [card] [Common Use Cases](https://docs.etherscan.io/common-use-cases)
>
> Find the right endpoints for what you are building.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.