Before you start
DeepL bills by source-text length in Unicode code points. Characters in thecontext parameter and HTML/XML tags (when tag handling is enabled) do not count. For the full billing rules and per-document character minimums, see Usage and limits.
Estimate website content
You don’t need to crawl your entire site. Pick 5-10 representative pages (a mix of short and long ones), count the characters on each, and use the average to extrapolate across your total page count. The script below strips HTML from a page and returns the character count. Run it against a handful of URLs to get your average.Estimate from a CMS or database
If your content lives in a CMS or a database, query it directly. This is often the most accurate approach because it reflects exactly what you’ll send to the API. Most CMSes (Drupal, WordPress, Contentful, etc.) do not provide a built-in way to see total word or character counts across all published content. You’ll typically need to query the underlying database or use the CMS export/API to pull content and count locally.node_field_data and node__body tables contain page titles and body content. For WordPress, query the wp_posts table filtering on post_status = 'publish'.
Estimate document content
For documents you plan to translate via the Document Translation API, you can extract text locally to get a rough character count.Project monthly usage
Once you know your total source characters, multiply by the number of target languages and your expected update frequency.Validate your estimate
Once you’ve estimated locally, validate with a small sample using theshow_billed_characters parameter. This adds a billed_characters field to the API response so you can compare actual billed characters against your local count.
billed_characters value against your local character count. They should be very close. Differences typically come from HTML tags or whitespace that your local extraction handles differently than the API.
Monitor actual usage
After you start translating, monitor actual usage against your estimates:/v2/usageendpoint - programmatic access to your current billing period consumption- Usage Analytics Dashboard - visualize usage across API keys with the open-source demo dashboard
- API Usage Logger - per-request logging with billed characters, language pairs, and reporting tags
- Cost Control - set a monthly character limit on your Pro API subscription to cap spend