Account
View your account and usage.
The account endpoint returns information about your current plan, API key, and usage statistics for the current billing period. Use it to monitor consumption, display usage dashboards, or check remaining quota before making API calls.
Get Account
/v1/accountx-api-keyRetrieve your account information including plan details, usage statistics, and rate limits.
Response
emailstringThe email address associated with this API key.
planstringYour current plan. One of: usage, starter, pro.
apiKeystringYour API key (partially masked for security). Format: sk_ks_...last4.
usageobjectUsage statistics for the current billing period. Contains counts for each operation type.
usage.extractsnumberNumber of extract operations performed this billing period.
usage.scrapesnumberNumber of scrape operations performed this billing period.
usage.screenshotsnumberNumber of screenshot operations performed this billing period.
usage.classifiesnumberNumber of classify operations performed this billing period.
usage.sitemapsnumberNumber of sitemap operations performed this billing period.
usage.searchesnumberNumber of search operations performed this billing period.
usage.tokensnumberTotal tokens consumed across all AI operations this billing period.
limitsobjectPlan limits for the current billing period. Contains the maximum allowed count for each operation type.
limits.extractsnumberMaximum extract operations allowed per billing period.
limits.scrapesnumberMaximum scrape operations allowed per billing period.
limits.screenshotsnumberMaximum screenshot operations allowed per billing period.
limits.searchesnumberMaximum search operations allowed per billing period.
limits.tokensnumberMaximum tokens allowed per billing period.
Example
Example Response
{
"email": "developer@example.com",
"plan": "starter",
"apiKey": "sk_ks_...a1b2",
"usage": {
"extracts": 42,
"scrapes": 156,
"screenshots": 18,
"classifies": 42,
"sitemaps": 42,
"searches": 1847,
"tokens": 284500
},
"limits": {
"extracts": 100,
"scrapes": 500,
"screenshots": 200,
"searches": 5000,
"tokens": 1000000
}
}Monitoring Usage Programmatically
const account = await ks.account.get();
const extractsRemaining = account.limits.extracts - account.usage.extracts;
if (extractsRemaining <= 0) {
console.log("Extract limit reached. Upgrade your plan or wait for the next billing period.");
} else {
console.log(`${extractsRemaining} extracts remaining this period.`);
const result = await ks.extract({ url: "https://example.com" });
}Plan Comparison
| Feature | Usage (Pay-as-you-go) | Starter ($29/mo) | Pro ($99/mo) |
|---|---|---|---|
| Extracts | Pay per use | 100/mo | 500/mo |
| Scrapes | Pay per use | 500/mo | 2,500/mo |
| Screenshots | Pay per use | 200/mo | 1,000/mo |
| Searches | Pay per use | 5,000/mo | 25,000/mo |
| Tokens | Pay per use | 1M/mo | 5M/mo |
| Rate limit | 10 req/min | 30 req/min | 60 req/min |
Usage resets at the start of each billing period. If you need higher limits, upgrade your plan at knowledgesdk.com/pricing.
The usage data is cached for up to 5 minutes. If you need real-time usage tracking immediately after an operation, wait a few seconds before querying the account endpoint.