The class action lawsuit has been brought by Facebook users Matthew Campbell and Michael Hurley on behalf of all 166 million users in the US who have sent weblinks on the site via private messages.
They claim, citing independent research from a Swiss security firm, that Facebook is violating California state laws and the Electronic Communications Privacy Act by scanning the content of messages that contain links to third-party websites and searching for information to profile the senders’ web activity.
The lawsuit goes on to accuse Facebook of profiting from the information by sharing it with marketers and data aggregators.
An attorney for the claimants says in the complaint filed with a San Jose court earlier this week that the scanning is “a mechanism for Facebook to surreptitiously gather data in an effort to improve its marketing algorithms and increase its ability to profit from data about Facebook users”.
The claimants are attempting to block Facebook from scanning private messages and are looking to claim up to $10,000 for each user affected.
A Facebook spokesman says: “We continue to believe the allegations in this lawsuit have no merit and we will defend ourselves vigorously.”
In 2012 a US court ordered Facebook to pay $20m (£13m) to settle a separate class action lawsuit alleging the site was violating user privacy with its Sponsored Stories ad format by advertising when users had liked certain brands – using their names, profile pictures and an “endorsement” of that advertiser – without giving them an option to opt out.
In June last year Facebook “streamlined” the number of its ad units to fewer than half of the 27 it previously offered, including the removal of the Sponsored Stories ad format.