Account API
Programmatischer Zugriff auf Ihre monatlichen Nutzungsstatistiken: Erfolge, Fehler, fälliger Betrag, verbleibende Credits und Aufschlüsselungen pro Domain.
Überblick
Die Account API liefert monatliche Nutzungsstatistiken für Ihre Crawlbase-Produkte. Verwenden Sie sie, um den Verbrauch zu überwachen, interne Dashboards zu erstellen oder Alarme auszulösen, wenn Sie sich Ihrem Credit-Limit nähern.
Diese API wird aktiv unterstützt. Sie ist in der Navigation nur unter "Legacy" eingeordnet, weil es sich um eine ältere Endpoint-Form handelt - ein Ersatz ist nicht geplant.
Endpoint:https://api.crawlbase.com/account
Rate-Limit: 1 Request pro 5 Minuten
Dieser Endpoint aggregiert serverseitig eine Menge Daten. Cachen Sie die Response - es besteht kein Grund, ihn häufiger aufzurufen.
Schnellstart
curl 'https://api.crawlbase.com/account?token=YOUR_TOKEN&product=crawling-api'import requests
res = requests.get('https://api.crawlbase.com/account?token=YOUR_TOKEN&product=crawling-api')
print(res.json())const res = await fetch('https://api.crawlbase.com/account?token=YOUR_TOKEN&product=crawling-api');
console.log(await res.json());require 'net/http'
puts Net::HTTP.get(URI('https://api.crawlbase.com/account?token=YOUR_TOKEN&product=crawling-api'))Parameter
Ihr Crawlbase-Token.
Die Nutzung welches Produkts abgerufen werden soll. Einer von:
crawling-api, crawler, smartproxy, scraper-api, leads-api, screenshot-api.Bei
true werden zusätzlich zur Statistik des aktuellen Monats auch die Werte des Vormonats für einen Trendvergleich zurückgegeben.Response-Felder
Gesamtzahl erfolgreicher Requests in diesem Monat.
Gesamtzahl fehlgeschlagener Requests in diesem Monat.
Gesamter fälliger Betrag in USD für erfolgreiche Requests in diesem Monat.
In diesem Monat noch verfügbare Credits. Wird nur für abonnementbasierte Produkte zurückgegeben.
Array mit Aufschlüsselungen pro Domain:
domain, totalRequests, success, failure, successRate.Beispiele pro Produkt
# 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"import requests
products = ['crawling-api', 'crawler', 'smartproxy', 'scraper-api', 'leads-api', 'screenshot-api']
for product in products:
res = requests.get(
'https://api.crawlbase.com/account',
params={'token': 'YOUR_TOKEN', 'product': product},
)
print(product, res.json())
# With previous month for trend comparison
res = requests.get('https://api.crawlbase.com/account?token=YOUR_TOKEN&product=crawling-api&previous_month=true')
print(res.json())const products = ['crawling-api', 'crawler', 'smartproxy', 'scraper-api', 'leads-api', 'screenshot-api'];
for (const product of products) {
const res = await fetch(`https://api.crawlbase.com/account?token=YOUR_TOKEN&product=${product}`);
console.log(product, await res.json());
}
// With previous month for trend comparison
const res = await fetch('https://api.crawlbase.com/account?token=YOUR_TOKEN&product=crawling-api&previous_month=true');
console.log(await res.json());require 'net/http'
%w[crawling-api crawler smartproxy scraper-api leads-api screenshot-api].each do |product|
uri = URI('https://api.crawlbase.com/account')
uri.query = URI.encode_www_form(token: 'YOUR_TOKEN', product: product)
puts product, Net::HTTP.get(uri)
end
# With previous month for trend comparison
puts Net::HTTP.get(URI('https://api.crawlbase.com/account?token=YOUR_TOKEN&product=crawling-api&previous_month=true'))