The arrangement involved the "systematic surveillance of a large number of publicly-known people's movements and thus a significant violation" of their rights, the Glostrup district court outside Copenhagen said in a statement.
The fact that the intention was "to make money from delivering information of no societal value" was an aggravating circumstance, it said.
Danish women-led mosque holds first Friday prayers
Henrik Qvortrup, who was editor of the weekly Se og Hor magazine between 2001 and 2008, was handed a 15-month jail term, one year of which would be a suspended sentence if he performed 200 hours of community service.
IT expert Peter Bo Henriksen, a former employee at a firm which is now part of a card payment company, was given an 18-month sentence that he said he would appeal.
Qvortrup could end up serving his three-month sentence at home wearing an ankle bracelet, his lawyer told news agency Ritzau, saying his client had not yet decided whether to appeal the verdict.
Denmark's feminist mosque founder challenges norms
Three other journalists were given suspended sentences and community service, while a former acting editor-in-chief was acquitted of any wrongdoing.
Another two journalists and publisher Aller Media were in August given suspended sentences and a 10 million kroner (1.3 million euros, $1.4 million) fine, respectively, after pleading guilty.
The magazine's rivals had been baffled by a series of celebrity scoops it had run, including one about Danish Prince Joachim's 2008 honeymoon in Canada, which had been kept secret.
Suspicions were raised in April 2014, when former Se og Hor journalist Ken B. Rasmussen published a purportedly fictional book detailing how a gossip magazine used credit card information to write stories about members of the royal family.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ