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

# Usage API

> Check your residential data balance and usage through the API.

Use this endpoint to check how much residential data you have used and how much is left on your plan.

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `https://api.roundproxies.com/traffic/residential` | Your plan status and data usage |

## Authentication

Send your API key in the `x-api-key` header. You can find it in your [dashboard](https://app.roundproxies.com/dashboard/api).

## Get Usage

<Tabs>
  <Tab title="Node.js">
    ```javascript theme={null}
    const res = await fetch("https://api.roundproxies.com/traffic/residential", {
      headers: { "x-api-key": process.env.RP_API_KEY },
    });
    console.log(await res.json());
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import os
    import requests

    res = requests.get(
        "https://api.roundproxies.com/traffic/residential",
        headers={"x-api-key": os.environ["RP_API_KEY"]},
    )
    print(res.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl https://api.roundproxies.com/traffic/residential \
      -H "x-api-key: $RP_API_KEY"
    ```
  </Tab>
</Tabs>

## Response

```json 200 OK theme={null}
{
  "active": true,
  "planData": 10,
  "usage": {
    "used": "1.5 GB",
    "total": "10 GB",
    "rawUsed": 1500000000,
    "rawTotal": 10000000000
  }
}
```

| Field | Type | Description |
| - | - | - |
| `active` | boolean | Whether your plan is active |
| `planData` | number | Your plan's data allowance in GB |
| `usage.used` | string | Data used, in readable form |
| `usage.total` | string | Data allowance, in readable form |
| `usage.rawUsed` | number | Data used in bytes |
| `usage.rawTotal` | number | Data allowance in bytes |

## Related

<CardGroup cols={2}>
  <Card title="Residential Basics" icon="house-signal" href="/residentials/basics">
    Proxy format, ports and authentication.
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/residentials/error-handling">
    What each proxy error means and how to fix it.
  </Card>
</CardGroup>


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