The Constitutional Court in France has ruled that the government can pursue plans to trawl social media to detect tax avoidance, although it introduced limitations on what information can be collected following a privacy outcry.

The new rules, part of a broader law on tax changes passed by the lower house of parliament last week, add to the state’s surveillance powers by letting it collect masses of public data, as part of a three-year online monitoring experiment.

Customs and tax authorities will be allowed to review people’s profiles, posts and photographs on social media for evidence of undeclared income or inconsistencies.

The motion sparked concern from the French data protection authority, several advocacy groups and members of parliament, however, who challenged its implications for people’s privacy.

The Constitutional Court, which could have stopped the provision in its tracks, said the law could risk compromising social media users’ privacy and freedom of expression as drafted, but gave it the green light with caveats.

Authorities would have to ensure password-protected content on social media platforms was off limits, it said in its ruling.

The court added that authorities would only be able to use public information pertaining to the person divulging it online, and that regulators would have to closely monitor how the data was being exploited.

Minister of Public Action and Accounts Gerald Darmanin recently played down the significance of the move and the outcry, saying authorities in the UK and the United States had similar powers.