Credit cost for your requests
What is API credit? How to calculate API credit cost?
What is API credit?
API credit is an internal entity used for billing and cost metering. It allows differentiating API requests with different parameters, complexity, and pricing.
API credits amount
Each subscription plan contains a particular amount of API credits that can be used during the subscription period. Unused API credits are not transferred to the next subscription period.
Request cost
Each API request price can be found in the following table:
Request settings | API credits cost |
---|---|
Simple request (no browser usage) + standard (datacenter) proxy | 1 |
Headless browser (no JS rendering, return_page_source parameter is true ) + standard (datacenter) proxy | 2 |
Headless browser (JS rendering) + standard (datacenter) proxy | 10 |
Simple request (no browser usage) + premium (residential) proxy | 25 |
Headless browser (no JS rendering, return_page_source parameter is false ) + standard (datacenter) proxy | 50 |
Headless browser (JS rendering) + premium (residential) proxy | 125 |
Any request to Google domain + standard (datacenter) proxy | 10 |
AI extractor cost
AI extractor cost is calculated based on the number of text characters in the Markdown version of the web page and the number of output characters.
The cost of AI extractor is calculated using the following formula:
api_credit_cost = Math.ceil((merkdown_characters_count + output_text_characters_count) / 30) + web_scraping_api_request_cost
So, each 30 characters of the Markdown and output text cost 1 API credit. Also, the cost of the web scraping API request is added to the final cost (browser, proxy, etc.)
You can calculate input text characters count by using the output from the Markdown endpoint response for the same URL.
Credit Cost Header
Each response from web scraping API contains the Ant-credits-cost
header that shows the amount of credits that were spent for the request.