Mr Shearer said overseas real estate websites were championing the fact that New Zealand had no capital gains tax, stamp duty or other restrictions.
"We are effectively open for business," he said.
Greens and New Zealand First strongly backed the policy.
New Zealand First leader Winston Peters said: "When I see Barfoot and Thompson's top 25 agents and 19 are Asian and they're not selling to the New Zealand population, they're selling to foreign buyers, then we've got something seriously wrong."
Mr Key, on the other hand, argued that the number of non-residents who were buying up property was "very small".
"The number of people in mainland China who happen to be buying a $500,000 or $600,000 house in Pakuranga you could probably count on your right hand."
Asked whether he felt it was a xenophobic policy, Mr Key said: "Some people see certain bias from certain ethnicities at auctions, for instance, and assume they are foreigners. That's a very heroic assumption on their front, it almost certainly won't be correct."
Act Party leader John Banks went further, saying it was anti-investment, anti-immigrant and anti-Chinese.
Mr Shearer said similar restrictions had already been introduced in the UK, China, Hong Kong and Singapore.
"I make no apologies for getting in behind New Zealand buyers. If we don't we're the odd country out."
Real estate experts had some reservations about the policy.
Property commentator Olly Newland said it was "a bit of a nonsense" because Australians bought more properties than other foreigners, and because offshore buyers could get residents to buy houses in their name and hold it in a trust for them.
Real Estate Institute of New Zealand head Helen O'Sullivan said she was interested to know how the policy would be enforced. "Would you be needing to ask for passports at open homes?"
Mr Shearer believed the policy would be "self-policing".
He said that lawyers conducting a property transaction would have to prove that the buyer was a New Zealand resident.
Labour's proposal
*Non-residents banned from buying existing NZ houses.
*Exemptions for Australians or foreigners who plan to live in NZ permanently.
*Non-residents will be able to buy vacant land if they plan to build on it within 12
months.
*Students or skilled migrants who have been in NZ for more than 12 months can
buy homes, but must sell if they leave.
*Non-residents found to have bought a house will be forced to sell and could be
fined.
*Part of housing policy which includes capital gains tax on investment
properties and building 100,000 new homes in 10 years.
- additional reporting Rebecca Quilliam