Christian Atsu opened the scoring in the third minute and Yoan Gouffran added a second seconds before half-time.
Cardiff's Peter Whittingham pulled one back from outside the area in the 77th minute to give the visitors a chance but Newcastle had done enough.
The latest success, equalling the club's run during the 2009-10 promotion season, lifted Rafael Benitez's side six points clear at the top of the table, even though Cardiff pushed them all the way.
Newcastle got off to the ideal start. Aleksandar Mitrovic won the battle to lead the line despite the return to fitness of leading scorer Dwight Gayle and the Serbian did not take long to make his presence felt.
After he was fed the ball just inside the Cardiff penalty area, Mitrovic turned his man and rolled a pass into the feet of Atsu. The winger, included in the absence of suspended Matt Ritchie, then did the rest by picking out the inside corner of Ben Amos' net.
Cardiff threatened a couple of times before the break when Craig Noone reacted quickest to a ball over the top but he crashed a volley wide and Sol Bamba headed another effort wide.
Before that Newcastle would have added to their one-goal advantage had Cardiff goalkeeper Amos not made a fantastic stop with his left hand to stop Paul Dummett from firing past him.
There was also a Mitrovic header that flew over the bar when he rose highest to meet a Jonjo Shelvey corner and the latter had a rasping curler headed away by Bamba when it looked destined for the top corner.
After a period of Cardiff pressure, the second goal arrived seconds before the interval. DeAndre Yedlin's pass behind the defence was perfect for Gouffran to shoot first time inside the far post.
Cardiff had only lost once since Neil Warnock took over in early October and they recovered to make a game of it after initially finding Newcastle too hot to handle.
Atsu almost had a second moments after the restart. A move down the left ended with his shot being deflected marginally over the bar.
The Ghanaian should have done better with another effort after Mitrovic had played set him free, but the winger's quick feet was not followed by a good finish and he curled over when the target was gaping.
Cardiff's Rickie Lambert could have pulled one back but missed the target before substitute Whittingham did drill a low effort through a crowded box to make things interesting for the final 13 minutes.