> ## 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

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

<Steps>
  <Step title="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. <span style={{ color: "#0784C3" }}>1</span> (Ethereum).
    * `module` and `action`: choose the endpoint. E.g. <span style={{ color: "#0784C3" }}>account</span> and <span style={{ color: "#0784C3" }}>balance</span>.
    * `address`: the account you are querying. E.g. <span style={{ color: "#0784C3" }}>0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045</span>.
    * `tag`: the block to read the balance at. E.g. <span style={{ color: "#0784C3" }}>latest</span>.
    * `apikey`: your API key. Replace <span style={{ color: "#0784C3" }}>YourApiKey</span> with your API key.

    Alternatively, you can open the [API playground](/api-reference/endpoint/balance?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](/supported-chains) for the full list.
    </Tip>

    <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.
    </Warning>
  </Step>

  <Step title="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](/common-error-messages).
  </Step>
</Steps>

## 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.
</Warning>

* 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/myapikey), and create a new one there.

<Columns cols={2}>
  <Card title="Rate Limits" icon="gauge-high" href="/rate-limits" horizontal>
    The calls per second and daily limits for each plan.
  </Card>

  <Card title="Common Use Cases" icon="compass" href="/common-use-cases" horizontal>
    Find the right endpoints for what you are building.
  </Card>
</Columns>
