AgentisProAGENTISPRO RAG ENGINE

Cost Estimation

Pre-execution cost calculation

Cost Estimation

POST /v1/estimate

Calculate the estimated cost of an operation before executing it. No crawling or extraction is performed.

Request

curl -X POST "https://scraperone.agentispro.com/v1/estimate" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operation": "company_crawl",
    "depth": "standard",
    "url": "chiesi.com"
  }'

Request Parameters

ParameterTypeRequiredDefaultDescription
operationstringYesOperation type (see below)
depthstringNo"standard"Operation depth: quick, standard, deep
urlstringNonullURL to check cache availability

Operation Types

OperationDescriptionBase Credits
scrapeSingle URL scrape1.0
company_crawlCompany intelligence5.0
person_crawlPerson intelligence3.0
contact_crawlContact extraction2.0
news_monitorNews monitoring1.5
researchDeep research8.5

Response

{
  "operation": "company_crawl",
  "estimated_credits": 5.0,
  "estimated_cost_usd": 0.020,
  "cache_available": true,
  "breakdown": [
    {"step": "Homepage crawl", "credits": 1.0},
    {"step": "About page crawl", "credits": 1.0},
    {"step": "Team page crawl", "credits": 1.0},
    {"step": "LLM extraction", "credits": 2.0}
  ]
}

Response Fields

FieldTypeDescription
operationstringRequested operation
estimated_creditsfloatEstimated credit cost
estimated_cost_usdfloatEstimated USD cost
cache_availablebooleanWhether cached data exists
breakdownCostBreakdown[]Per-step cost breakdown

Cache Checking

When url is provided, the estimate checks if cached data is available:

Cache Hit

{
  "operation": "company_crawl",
  "estimated_credits": 0.0,
  "estimated_cost_usd": 0.0,
  "cache_available": true,
  "breakdown": [
    {"step": "Cache lookup", "credits": 0.0}
  ]
}

Cache Miss

{
  "operation": "company_crawl",
  "estimated_credits": 5.0,
  "estimated_cost_usd": 0.020,
  "cache_available": false,
  "breakdown": [...]
}

Credit Pricing

CreditsUSD
1.0$0.004
5.0$0.020
10.0$0.040

Depth Multipliers

DepthMultiplier
quick0.5x
standard1.0x
deep2.0x

Example: Deep Company Crawl

curl -X POST "https://scraperone.agentispro.com/v1/estimate" \
  -d '{"operation": "company_crawl", "depth": "deep"}'
{
  "operation": "company_crawl",
  "estimated_credits": 10.0,
  "estimated_cost_usd": 0.040,
  "cache_available": false,
  "breakdown": [
    {"step": "Homepage crawl", "credits": 1.0},
    {"step": "About page crawl", "credits": 1.0},
    {"step": "Team page crawl", "credits": 1.0},
    {"step": "Products page crawl", "credits": 1.0},
    {"step": "News page crawl", "credits": 1.0},
    {"step": "Additional subpages", "credits": 2.0},
    {"step": "LLM extraction (deep)", "credits": 3.0}
  ]
}

Use Cases

Pre-flight Check

Before executing an expensive operation, check the cost:

const estimate = await fetch('/v1/estimate', {
  method: 'POST',
  body: JSON.stringify({
    operation: 'research',
    depth: 'deep',
    url: 'large-company.com'
  })
});
 
if (estimate.estimated_credits > userCredits) {
  alert('Insufficient credits');
} else {
  // Proceed with research
}

Credit Management

Use estimates to build credit budgets and usage forecasts.

Estimates are approximate. Actual costs may vary slightly based on page complexity and LLM token usage.

Error Handling

Invalid Operation

{
  "error": "Validation error",
  "detail": "Invalid operation. Must be one of: scrape, company_crawl, person_crawl, contact_crawl, news_monitor, research",
  "status_code": 400
}

On this page