Extractor Usage
Monitor your API usage and check remaining extraction capacity. This endpoint helps you track your current usage limits and plan your data extraction workflows accordingly.
GET /extractor-usage
Overview
The Extractor Usage endpoint provides real-time information about your remaining API quota. Use this to monitor consumption, implement usage-based logic in your applications, and ensure smooth operation within your plan limits.
Usage Tracking
Your usage quota is measured in "pages processed" rather than individual API calls. A multi-page document counts as multiple page units.
Request Details
Method: GET Rate Limit: 5 requests per 5 seconds
Headers
Header | Value | Required | Description |
---|---|---|---|
Authorization | Bearer YOUR_API_KEY | ✅ | Your API authentication token |
Examples
- JavaScript
- Python
- cURL
const url = 'https://sheets.lido.app/api/v1/extractor-usage';
const options = {
method: 'GET',
headers: { Authorization: 'Bearer YOUR_API_KEY' }
};
async function checkUsage() {
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(`Pages remaining: ${data.pagesRemaining}`);
// Implement usage-based logic
if (data.pagesRemaining < 10) {
console.warn('Low usage remaining - consider upgrading your plan');
}
return data;
} catch (error) {
console.error('Failed to check usage:', error);
}
}
import requests
url = "https://sheets.lido.app/api/v1/extractor-usage"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
def check_usage():
try:
response = requests.get(url, headers=headers)
data = response.json()
print(f"Pages remaining: {data['pagesRemaining']}")
# Implement usage-based logic
if data['pagesRemaining'] < 10:
print("Warning: Low usage remaining - consider upgrading your plan")
return data
except Exception as error:
print(f"Failed to check usage: {error}")
return None
curl --request GET \
--url 'https://sheets.lido.app/api/v1/extractor-usage' \
--header 'Authorization: Bearer YOUR_API_KEY'
Response
{
"pagesRemaining": 247
}
Response Fields
Field | Type | Description |
---|---|---|
pagesRemaining | number | Number of document pages you can still process with your current plan |
Usage Calculation
How Pages Are Counted
Your API usage is measured in processed pages, not individual API calls:
- Single-page document = 1 page unit
- 5-page PDF = 5 page units
- Image file = 1 page unit
Important notes:
- Failed extractions don't count - If a job fails due to processing errors, no pages are deducted from your quota
- Only pages in range are counted - When using
pageRange
, only the specified pages count toward usage - Pages excluded by @exclude_pages do count - If you use
@exclude_pages
in your instructions to skip certain pages during processing, those pages still count toward your usage quota
Page Range Processing
When you specify a pageRange
parameter:
// This processes only pages 2-4 (3 pages total)
{
pageRange: "2-4",
// ... other parameters
}
// Usage: 3 page units
// This processes the entire 10-page document
{
pageRange: "", // or omit the parameter
// ... other parameters
}
// Usage: 10 page units