Jump to content

KAPOW (bot detection system)

From Wikitech
(Redirected from KAPOW)

KAPOW (Knowledge on Automata Platformized and Operationalized as a Warehouse) is a bot detection system in the Data Platform. This system classifies traffic data to distinguish automated and human traffic, impacting our pageviews data.

What is bot detection and why do we need it?

A large (and increasing) fraction of Wikipedia traffic is automated. A 2025 Diff post describes global trends that account for this, and ways in which the Wikimedia Foundation is responding to them.

Bot detection is the process of classifying traffic to our sites, such that automated traffic is separated from direct human traffic to the best of our ability, and categorized to inform future decisions.

This includes clients that identify themselves as automated, for example via the User-Agent header, and also clients that go through great lengths to appear to be human and avoid detection.

A rich bot detection system provides input to many critical domains, broadly under:

  • Analytics, so we can make better product decisions, plan fundraising campaigns and understand usage of our projects.
  • Infrastructure defense, so we can improve our ability to block excessive traffic that could make our projects less reliable.

What is KAPOW?

KAPOW is the collective name for:

  • A bot detection model incorporating various signals for detecting automated agents such as web scrapers.
  • Automation (data pipelines) that apply this model to incoming traffic, generating tables for further analysis and integration with downstream systems.

We intend to centralize bot detection logic using KAPOW so that it can be used across a variety of use cases, including public pageview counts on Wikistats and for blocking excessive or harmful traffic to our servers.

KAPOW visibility

Given its use in infrastructure protection and adversarial nature of some bots, we consider the details of KAPOW to be private, including its code, detailed documentation and output data.

Phabricator tickets are also restricted, although we strive to keep them public where possible. For example, high level milestones for integrating KAPOW into other systems will generally be public.

How we improve KAPOW

KAPOW is designed to be easy to extend with new signals, and adjust to unexpected sources of automated traffic. We learn a great deal about bots when we don’t detect them automatically, and this leads to improvement to KAPOW.

We have a response protocol for when automated traffic slips by KAPOW, which ends with a report published to Data Platform/Data Lake/Data_Issues including the estimated impact in terms of pageviews, and an annotation to Wikistats.

While the public reports are relatively sparse, each helps us identify and prioritize work in KAPOW to make it more effective next time a similar kind of bot appears.

Launch and backfill timeline

The following are the planned dates for the different stages of the KAPOW launch and backfill:

Date Event Duration Effect
2026-10-26 KAPOW deployment 1 day This is the date of KAPOW's launch. From this date on, KAPOW is the effective bot detection system that will score and classify all webrequest data, which in turn is the source for our pageviews, unique devices, and clickstream pipelines. This will reflect in Superset, AQS, Wikistats, Pageviews tool, etc.
2026-10-27 Start of hourly backfill 17-20 days This is the first step of the KAPOW backfill. This will retroactively apply the KAPOW classification to private hourly datasets, from June 20th until October 26th, in order. Since these datasets are private, no changes will show on public dahboards, APIs or tools.
2026-11-12 Start of daily backfill 6-8 days This is the second step of the KAPOW backfill. This will retroactively apply the KAPOW classification to private and public daily datasets, from June 20th to October 26th, in order. Since some of these datasets are public, changes will show on Superset, AQS, Wikistats, Pageviews tool, etc.
2026-11-20 Start of weekly and monthly backfill 1-2 days This is the third and last step of the KAPOW backfill. This will retroactively apply the KAPOW classification to private and public weekly and monthly datasets. Weekly datasets will recompute from June 22nd to October 25th, while monthly datasets will recompute from July 1st to October 31st., in order. Since some of these datasets are public, changes will show on Superset, AQS, Wikistats, Pageviews tool, etc.
2026-11-23 End of backfill All affected datasets are showing KAPOW-classified data. Hourly and daily datasets: since June 20th; Weekly datasets: since June 22th; Monthly datasets: since July 1st.

See phab:T442233 for the status and details of the backfill process.

See also