API Usage
GET
/api/v1/api-usageRetrieve your current API usage statistics including tier information, limit configuration, daily request consumption, active exports, and platform access. Use this endpoint to monitor consumption and stay within your tier's limits.
bash
curl https://exportcomments.com/api/v1/api-usage \-H "X-AUTH-TOKEN: your-api-key"
Response Examples
Business tier (full access)
200 OK — Business tier200
json
{"has_access": true,"has_token": true,"tier": "business","api_version": "v3","limits": {"daily_requests": "Unlimited","concurrent_requests": 5,"rate_per_minute": 200,"max_comments_per_export": 250000,"webhooks": 10},"usage": {"daily_requests_used": 42,"active_exports": 1},"platforms": {"allowed": ["YouTube", "Instagram", "Facebook", "TikTok", "Twitter", "Reddit", "LinkedIn"],"restricted": [],"all_platforms": true},"upgrade_benefits": null}
Premium tier (upgrade benefits included)
200 OK — Premium tier200
json
{"has_access": true,"has_token": true,"tier": "premium","api_version": "v3","limits": {"daily_requests": 100,"concurrent_requests": 1,"rate_per_minute": 60,"max_comments_per_export": 5000,"webhooks": 1},"usage": {"daily_requests_used": 18,"active_exports": 0},"platforms": {"allowed": ["YouTube", "Instagram", "Facebook", "TikTok", "Twitter", "Reddit", "LinkedIn"],"restricted": [],"all_platforms": false},"upgrade_benefits": {"unlimited_daily_requests": true,"more_concurrent_requests": "10 vs 1","higher_rate_limit": "200/min vs 60/min","more_comments": "250,000 vs 5,000","all_platforms": true,"more_webhooks": "10 vs 1"}}
No API access (subscription required)
200 OK — No access200
json
{"has_access": false,"required_plan": "premium","message": "Upgrade to Premium or Business plan to access the API."}
API token not yet generated
200 OK — Token missing200
json
{"has_access": true,"has_token": false,"tier": "premium","message": "Generate an API token to start using the API."}
Response Fields
Top-level fields
| Field | Type | Description |
|---|---|---|
has_access | boolean | Whether the account has API access via an active subscription |
has_token | boolean | Whether an API token has been generated. Omitted when has_access is false |
tier | string | Active subscription tier: premium or business. Omitted when has_access is false |
api_version | string | API version the token is provisioned for (e.g. v3) |
limits | object | Configured limits for the token. See Limits object |
usage | object | Current consumption counters. See Usage object |
platforms | object | Platform access configuration. See Platforms object |
upgrade_benefits | object|null | Populated for premium tier to describe Business upgrade gains. null for Business tier |
Limits object
| Field | Type | Description |
|---|---|---|
daily_requests | integer|string | Maximum API requests per day. "Unlimited" for Business tier |
concurrent_requests | integer | Maximum simultaneous export jobs |
rate_per_minute | integer | Maximum requests allowed per minute |
max_comments_per_export | integer | Maximum comments retrievable in a single export |
webhooks | integer | Maximum registered webhooks |
Usage object
| Field | Type | Description |
|---|---|---|
daily_requests_used | integer | Number of API requests made today |
active_exports | integer | Number of export jobs currently running |
Platforms object
| Field | Type | Description |
|---|---|---|
allowed | array | Display names of platforms the token can export from |
restricted | array | Display names of platforms blocked for this token. Empty array when unrestricted |
all_platforms | boolean | true if the token has access to all available platforms (Business tier) |
Upgrade benefits object (Premium tier only)
| Field | Type | Description |
|---|---|---|
unlimited_daily_requests | boolean | Business tier removes the daily request cap |
more_concurrent_requests | string | Concurrent export comparison (e.g. "10 vs 1") |
higher_rate_limit | string | Rate limit comparison (e.g. "200/min vs 60/min") |
more_comments | string | Max comments comparison (e.g. "250,000 vs 5,000") |
all_platforms | boolean | Business tier grants access to all 30+ platforms |
more_webhooks | string | Webhook limit comparison (e.g. "10 vs 1") |
Unlimited daily requests
On Business tier, limits.daily_requests returns the string "Unlimited" rather than an integer. Check for this string before performing numeric comparisons in your code.
Tier Comparison
| Metric | Premium | Business |
|---|---|---|
| Daily requests | 100 | Unlimited |
| Rate limit | 60/min | 200/min |
| Concurrent exports | 1 | 5 |
| Max comments | 5,000 | 250,000 |
| Webhooks | 1 | 10 |
| All platforms | No | Yes |
See Tiers for the full feature comparison across plans.
