When you have as many mistresses as Louis XIV and Louis XV in an age with any kind of birth control it is inevitable that one of those mistresses becomes pregnant. Especially Louis XIV was known for his particularly nice behaviour towards these illegitimate children and he had many of them legitimised in order to give them the best life possible. Not everyone was fond of this legitimisation because it meant that these royal bastards took place above the other nobles in the much beloved etiquette - the Duke of Saint-Simon hated this procedure and in his memoirs always referred to the King's illegitimate children as "the bastards", noble or not.
Anyway, these are the many children that Louis XIV fathered with pretty much anyone else but his wife. Notice that they are all given the royal surname of "de Bourbon".
Louise de La Vallière had four children by the Sun King but just two of them survived their infancy:
Marie Anne de Bourbon (1666-1739); legitimised after which she was known as Mademoiselle de Blois
Louis de Bourbon (1667-1683); Comte de Vermandois
Marie Angélique de Scorailles had one stillborn boy by the King - the birth had been complicated and bloody and she retired to a convent afterwards
Françoise-Athénaïs better known as the Marquise de Montespan had no less than seven children by the King. A surprisingly high number considering how fast he tired of his mistresses:
Louise Françoise de Bourbon (1669-1672)
Louis Auguste de Bourbon (1670-1730); legitimised and created the Duc de Maine
Louis César de Bourbon (1672-1683); legitimised and made the Comte de Vexin
Louise Françoise de Bourbon (1673-1743); legitimised and made Mademoiselle de Nantes
Louise Marie Anne de Bourbon (1674-1681); legitimised and made Mademoiselle de Tours
Francoise Marie de Bourbon (1677-1749); legitimised and created Mademoiselle de Blois
Louis Alexandre de Bourbon (1678-1737); legitimised and made the Comte de Toulouse
Claude de Vin des Æillets became pregnant with a daughter:
Louise de Maisonblanche (1676-1718); not legitimised
Anne de Rohan-Chabot had quite a few children and one of them was suspected to be fathered by Louis because the two were lovers at the time and the great resemblance between the child and the King.
Armand Gaston Maximilien de Rohan (1674-1749); not legitimised
These were the children known to be fathered by Louis XIV (whether he acknowledged them or not) and remember that these were all his mistresses that we know off. It is not difficult to imagine that the King had a fling or two besides these ladies.