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

# Account info

> Read the account identity for the current credential and lifetime data spend since signup.

**`GET`** `https://api-datahub.octoparse.com/v1/account`

Authentication: API key required (`Authorization: Bearer <API Key>`).

Identity and lifetime data spend for the account behind the current credential. This endpoint has no time dimension. For spend by period and dimension use <a href="/docs/en/datahub/api/reference/account/get-billing">Billing aggregation</a>.

`total_spent` is data fees only—the amount billed from app price tables against run output. Wallet balance, top-ups, and invoices are outside the Data Hub API; check the Octoparse account center. Every API key on the same account sees the same lifetime total.

## Request

### Example request

```bash theme={null}
curl   -H "Authorization: Bearer $OCTOPARSE_API_KEY"   "https://api-datahub.octoparse.com/v1/account"
```

## Response

### 200 success

```json theme={null}
{
  "data": {
    "user_id": "user-carol",
    "username": "carol",
    "total_spent": 0.06,
    "currency": "USD"
  }
}
```

The payload is wrapped in `data`. Fields:

<ResponseField name="user_id" type="string" required>
  Stable account id.
</ResponseField>

<ResponseField name="username" type="string">
  Current username, also the first segment of apps you publish as `<username>/<app_name>`. `null` when unset.
</ResponseField>

<ResponseField name="total_spent" type="number" required>
  Lifetime data spend.
</ResponseField>

<ResponseField name="currency" type="string">
  Currency.
</ResponseField>

### Errors

| HTTP | `code`         | `category`  | Description                 |
| ---- | -------------- | ----------- | --------------------------- |
| 401  | `unauthorized` | `forbidden` | Missing or invalid API key. |

Error responses use `{"error": {code, category, message, retryable}}`. See <a href="/docs/en/datahub/api/reference/introduction#errors">Errors</a>.

## Client libraries

<CodeGroup>
  ```python Python theme={null}
  info = client.account()
  print(info["username"], info["total_spent"], info["currency"])
  ```

  ```js JavaScript theme={null}
  const info = await client.account();
  console.log(info.username, info.total_spent, info.currency);
  ```
</CodeGroup>
