A government-ordered review of New Zealand's leading spy agency has found that it may have operated illegally in cases involving more than 80 people.

Prime minister John Key asked the cabinet secretary to examine the Government Communications Security Bureau (GCSB) after revelations it had illegally spied on alleged internet copyright pirate Kim Dotcom.

The review has found that over the past decade, GCSB operations involving 88 New Zealand citizens or residents are legally questionable.

Details of the cases have not been publicly released.

The report says the law governing the spy agency needs to be reformed as it is confusing, difficult to interpret and has not kept pace with changes in technology.

The report also highlights management and culture problems within the bureau.

The Greens and Labour want an independent inquiry into the country's intelligence agencies and their lines of accountability.

Mr Key, the minister responsible for the organisation, says the report makes for "sobering reading".

"I acknowledge this review will knock public confidence in the GCSB," he said, vowing to implement major changes.

"I expect the GCSB to always operate within the law."

The agency illegally spied on Dotcom before armed police raided his Auckland mansion and arrested him for online piracy in January 2012.

At the time, Mr Key offered a public apology to Dotcom, acknowledging the German national should have been off-limits to the GCSB because he has residency status in New Zealand.

Dotcom, who has received clearance from the New Zealand courts to attempt to sue the GCSB and police over his arrest, expressed surprise at the scale of the problem via Twitter.

I'm surprised at the scale of breaches. The Prime Minister should apologize to those people too & inform the targets. — Kim Dotcom (@KimDotcom)

The 39-year-old was arrested by New Zealand authorities cooperating with a massive US probe into online piracy.

US authorities allege Dotcom's Megaupload and related file-sharing sites netted more than $US175 million and cost copyright owners more than $US500 million by offering pirated copies of movies, TV shows and other content.

Dotcom denies any wrongdoing and is free on bail ahead of an extradition hearing scheduled in August.

ABC/AFP