The suspects were identified after investigators combed through more than 600 social media posts, according to federal police and the national internet crime hub ZIT in Frankfurt.
They are accused of directly insulting politicians from all parties represented in the Bundestag parliament as well as spreading false information, including fake quotes, according to the authorities.
Two thirds of the politicians targeted were women.
The suspects were based in 13 of Germany’s 16 states including the capital Berlin, where police searched eight private addresses.
In Rhineland-Palatinate state, police found weapons, ammunition and other illegal objects on one of the suspects.
Germany introduced stronger penalties last year against hate speech directed at politicians after the murder of pro-migration politician Walter Lübcke by a neo-Nazi in 2019.
“Freedom of expression reaches its limits as soon as it comes to defamation, insults and threats,” said federal police chief Holger Muench.
The day of raids made it clear that “anyone who posts hate speech must expect the police to show up at their door”, he said.
Bavarian interior minister Joachim Herrmann said posting hate speech on social media was “not a trivial offence” and he hoped the searches would deter others from posting such content.