Skip to main content
Every task is routed on its own. The router looks at the captcha type and the site it is for, lists the providers that can take it, ranks them, and tries them in order until one returns a token or the task’s limits are reached.

1. Which providers can take the task

A provider is a candidate when all of these hold:
  • it offers the captcha type;
  • it accepts the task as sent, for example with your own proxy;
  • the API key and the account don’t exclude it;
  • it isn’t paused (see When a provider is unwell).
If the request names providers in routing.providers, only those are candidates, unless routing.fallback is true.

2. Scores, per site

For each candidate the router keeps two measurements: how often its tokens work and how long it takes (the time within which 90% of its solves finish). Both are measured as close to your task as the data allows:
  1. on the same captcha type, site and sitekey;
  2. else on the same captcha type and site;
  3. else on the captcha type anywhere;
  4. else a cautious starting value, for a provider with no history.
A level is used only when it has enough attempts to mean something. The success figure is also a cautious one: ten solves out of ten rank below 950 out of 1,000, so a new provider can’t win on a lucky start. “The site” is the registrable domain of websiteURL: www.example.com and shop.example.com count as example.com.

3. Policies

The policy decides the order. It is a setting of the API key; the default is balanced. With the first three, a provider whose success on the site is poor is ranked after every provider that does well, whatever its price or speed. So cheapest means the cheapest provider that works there.

4. Attempts and fallback

The router tries the first provider. What happens after a failure depends on the failure: Three limits bound a task, all settings of the key: 3 attempts, 2 providers and 120 seconds by default. When they are used up, the task fails with the last error, or TIMEOUT. When no provider can take the task at all, it fails with NO_PROVIDER_AVAILABLE, and the error message says why. All of this happens inside your one request. A failed attempt, a retry and a fallback cost nothing: you pay once, for the provider that returned the token.

When a provider is unwell

A provider that fails several times in a row, or asks to be sent less, is paused for a short time. While paused it gets no tasks. Then it is sent one task as a test: if that works it is back, if not the pause gets longer. A provider’s bad hour therefore costs you a few slow tasks, not an hour of failures.

How the router learns

  • Every attempt counts. Each success, failure and solve time updates that provider’s figures for that site.
  • Your reports count. A provider can return a token the site then refuses. Only you see that. Report it within an hour and it counts as a failure for that provider on that site.
  • A small share of tasks explores. Now and then the router sends a task to the least-measured candidate first, so a provider that got better is noticed. Tasks with the policy pinned, or with providers named in the request, are never used for this.

See the decision

Every answer of the native API is a receipt: provider is who solved it, cost is what you paid, and attempts lists each try in order with its provider, its duration and, for a failed one, the error code.
The figures the router works from are public: success rates, solve times and prices per provider are on Provider statistics and in GET /v1/stats/providers, without a key.