Prime Minister John Key says the country's electronic spy agency operates within the law, following new revelations by American whistleblower Edward Snowden indicating that New Zealand spies are sharing metadata with a US spy agency.

The revelations detail a National Security Agency search engine, known as ICREACH, which contains more 850 billion records of metadata on phone calls and email.

Photo: PHOTO NZ

The classified documents from a range of intelligence agencies suggest that the metadata from the search engine is then shared among Five Eyes partners - New Zealand, Australia, Britain, the US and Canada.

One from 2008 states that New Zealand's Government Communications Security Bureau agreed that metadata it collects may be shared with the US Intelligence Community - but it is not clear if that metadata is domestic or foreign.

Mr Key has consistently denied that there is any mass surveillance of New Zealanders.

Photo: RNZ

But Greens' co-leader Russel Norman said today that Mr Key needs to rule out the sharing of New Zealanders' data under that arrangement.

"Why these documents say that when the Prime Minister himself has said that they're not doing this. I mean, this isn't small amounts of information about a handful of people - this is billions of pieces of information. This is a truly massive database.

"Once again, we're seeing evidence that directly links New Zealand spies to a global mass surveillance network. Changes made to the GCSB's powers last year mean they can now spy on New Zealanders and have the ability to access our communications via our telecommunication providers."

"This new evidence puts the GCSB at the heart of the mass surveillance network and contradicts what Prime Minister John Key has been claiming all along - that New Zealand doesn't supply information to outside organisations."

Dr Norman says New Zealanders deserve to know the truth about whether their personal information is being collected and possibly shared offshore.

He said the Prime Minister and the GCSB have no choice but to start answering questions about what it means for New Zealand to be a member of the Five Eyes network.

"Over and over again we're seeing these types of documents trickling out into the public sphere, which fly in the face of claims by the National Government that New Zealand is not tied up with the global spying network."

But the Prime Minister said New Zealanders' data is safe and that the GCSB is operating within the law. John Key said any metadata that is used, would be used appropriately and within the law.