Docs
登录

概览

Account API 返回您 Crawlbase 产品的月度使用统计数据。可用于监控消耗、构建内部仪表板,或在您接近额度上限时发出警报。

此 API 仍在积极维护中。它在导航中被归入「旧版」一栏,仅仅因为它是较早的端点形式,目前没有替代方案的计划。

端点:https://api.crawlbase.com/account

速率限制:每 5 分钟 1 次请求

此端点在服务器端聚合了大量数据。请缓存响应,无需更频繁地调用。

快速开始

curl 'https://api.crawlbase.com/account?token=YOUR_TOKEN&product=crawling-api'

参数

token
string必填
您的 Crawlbase token。
product
string必填
要获取使用情况的产品。可选值之一:crawling-apicrawlersmartproxyscraper-apileads-apiscreenshot-api
previous_month
booleanfalse
当为 true 时,会在当月数据之外同时返回上月统计数据,便于趋势对比。

响应字段

totalSuccess
本月成功请求总数。
totalFailed
本月失败请求总数。
totalDue
本月成功请求的应付金额总计(美元)。
remainingCredits
本月剩余可用额度。仅针对订阅类产品返回。
domainStats
按域名分组的明细数组:domaintotalRequestssuccessfailuresuccessRate

按产品示例

# Crawling API
curl "https://api.crawlbase.com/account?token=YOUR_TOKEN&product=crawling-api"

# Enterprise Crawler
curl "https://api.crawlbase.com/account?token=YOUR_TOKEN&product=crawler"

# Smart AI Proxy
curl "https://api.crawlbase.com/account?token=YOUR_TOKEN&product=smartproxy"

# Scraper API (legacy)
curl "https://api.crawlbase.com/account?token=YOUR_TOKEN&product=scraper-api"

# Leads API (legacy)
curl "https://api.crawlbase.com/account?token=YOUR_TOKEN&product=leads-api"

# Screenshots API (legacy)
curl "https://api.crawlbase.com/account?token=YOUR_TOKEN&product=screenshot-api"

# With previous month for trend comparison
curl "https://api.crawlbase.com/account?token=YOUR_TOKEN&product=crawling-api&previous_month=true"