Usage

GET/tw-v2/account/usage

Description

Check the API units left on the calling API key. Returns the free or subscription allowance, the spendable PAYG balance, and the effective rate limit. This request costs no units; it counts against the per-minute rate limit only.

Usage notes

availableUnits is the plan's remaining units plus spendable PAYG units. plan is null for a PAYG-only account, and payg is null until a PAYG wallet is funded. Expired PAYG units count as 0. A 503 with Retry-After means the allowance state is temporarily unavailable; wait and retry.

Parameters

This endpoint takes no parameters.

Code Examples

const response = await fetch('https://api.tweetapi.com/tw-v2/account/usage', {
  method: 'GET',
  headers: {
    'X-API-Key': 'YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);

Response

Success Response (200 OK)

200
{
  "data": {
    "availableUnits": 108766,
    "plan": {
      "active": true,
      "requestLimit": 100000,
      "usedUnits": 1234,
      "remainingUnits": 98766,
      "periodEnd": "2026-11-20T10:00:00.000Z"
    },
    "payg": {
      "availableUnits": 10000,
      "expiresAt": "2027-10-21T10:00:00.000Z"
    },
    "rateLimit": {
      "requestsPerMinute": 60
    }
  }
}

Response Fields

FieldDescription
availableUnitsUnits you can spend now: the plan's remaining units plus spendable PAYG units.
plan.activeWhether the free or subscription allowance can be used right now.
plan.requestLimitUnits included in the current period.
plan.usedUnits / plan.remainingUnitsUnits used and left in the current period.
plan.periodEndWhen the current paid period ends. Null for the free one-time allowance.
payg.availableUnitsSpendable PAYG units. TweetAPI uses them automatically after the plan allowance.
payg.expiresAtWhen the PAYG balance expires.
rateLimit.requestsPerMinuteThe effective per-minute rate limit for this key.