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

# アカウント情報

> 現資格のアカウントと累計データ支出。

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

認証：APIキー必須（`Authorization: Bearer <API Key>`）。

現在の資格情報の背後にあるアカウントの識別情報と累計データ支出。時間軸なし。期間・次元別は <a href="/docs/jp/datahub/api/reference/account/get-billing">請求集計</a>.

`total_spent` はデータ料金のみ — App 料金表に基づき実行出力へ請求された額。ウォレット残高、チャージ、請求書は Data Hub API 外。Octoparse アカウントセンターで確認。同一アカウントの API キーは同じ累計を見る。

## リクエスト

### リクエスト例

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

## レスポンス

### 200 成功

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

ペイロードは `data` に包まれます。フィールド:

<ResponseField name="user_id" type="string" required>
  安定アカウント id。
</ResponseField>

<ResponseField name="username" type="string">
  現在のユーザー名。公開 App の第 1 セグメント `<username>/<app_name>` にもなる。未設定は `null`。
</ResponseField>

<ResponseField name="total_spent" type="number" required>
  累計データ支出。
</ResponseField>

<ResponseField name="currency" type="string">
  通貨。
</ResponseField>

### エラー

| HTTP | `code`         | `category`  | Description    |
| ---- | -------------- | ----------- | -------------- |
| 401  | `unauthorized` | `forbidden` | API キー欠落または無効。 |

エラー応答は `{"error": {code, category, message, retryable}}` です。<a href="/docs/jp/datahub/api/reference/introduction#errors">エラー</a> を参照。

## クライアントライブラリ

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