We’ve had the war on terror and the war on drugs. Now, get set for the war on bots. The Ontario government is the latest to focus on the use of automated software programs for ticket scalping.

When you take your seat on an airline, you may have paid a higher price than the person next to you. This price variation is a planned feature in travel systems, which perform complex calculations based on parameters such as flight times and seat demand. Event ticket sales companies don’t do that, instead keeping their ticket prices largely the same. That creates an arbitrage opportunity for those willing to buy tickets early and sell them later as demand increases. Ticket scalping is big business.

Scalpers are moving with the times. The rise of online sales has created an army of software bots that scalp tickets automatically. They scan ticket sites, purchasing tickets for operators who then sell them on via a web of alternative ticket brokers. Ticket scalpers mark up the tickets by an average of 49 per cent, but in some cases by over 1,000 per cent, according to a report released last year by the state of New York.

The fans and artists aren’t the only ones who are paying. Ticketmaster has said that programs constantly checking its site to detect the release of tickets – known as spinner bots – account for up to 90 per cent of its traffic.

The bots can then reserve tickets for sale, tying them up temporarily while the ticketing site allows a few minutes for them to make the purchase. They do this en masse, giving scalpers the chance to choose the seats they want. Finally, the bot will automatically purchase the chosen tickets using borrowed or invented user details.

Some of them also take orders before acquiring the tickets, complains Rami Essaid. He is the CEO of Distil Networks, which sells technology designed to beat the bots.

“It creates this shadow market for people to siphon money from this ecosystems. It’s being paid for by the fans, and isn’t going to the artists or the venues,” he adds.

This spring, the Ontario government hopes to introduce legislation that will help tackle the problem. It is consulting the public for its views on ticket accessibility when attending sports games, concerts, and other events. The consultation deadline falls next week.

The Ontario government isn’t the only one taking ticket scalping seriously. New York state’s report led to a law there tackling the issue last summer, while U.S. Congress also passed the BOTS Act, giving the FTC the power to prosecute those running automated scalpers.

Whether the law deters bot operators or now, the problem for site owners is spotting and stopping their programs. Bot developers have become adept at mimicking human behaviour. Looking for lots of queries from a single IP address no longer works, because bots use proxy services providing them with hundreds of different addresses. They will also register thousands of email addresses to make multiple purchases look unique.

Companies have tried to solve the problem with captcha technology that uses challenges intended to weed out machines. The problem is that they don’t always work: determined bots can use image recognition AI to solve them. Commercial services even offer APIS to solve captchas for bot developers.

Distil offers technology designed to beat the scraper bots by looking at dozens of different data points. “These bots are behaving in some fashion that isn’t human,” he explains, pointing to factors including the speed and frequency of their interactions with ticketing web sites, and the button clicks they make. His software uses machine learning to spot those sessions by comparing them against a baseline of normal traffic.

Bot spotting software is creating a cat and mouse game between site scrapers and site owners. It’s a constant fight, because bots are big business, and scalping isn’t always the goal. Scraper bots target industries ranging from travel to real estate and retail price watching, aggregating information or getting early access. American Airlines settled out of court with travel software company Farechase in 2003 for scraping travel fare details from its site, for example.

Back in the world of ticket sales, the battle of the bots is unlikely to stop. Now that the US has made bot scalping illegal, the bot operators are simply retreating further underground, warns Essaid. His and other anti-scraping firms are trying to hit them where it hurts, by making it harder for them to fake human behaviour.

He hopes that this will chew up computing power and time on their side: “You have to make it a lot more resource intensive for the bad guys,” he concludes.