The children, aged 9 and 11, were with their father in their house on the Wheatfield estate when the attackers struck.
The shooter, a passenger on a motorbike, casually got off the bike and then aimed a shot at the house around 9pm on Monday evening before calmly escaping again on the bike.
It is believed only one shot was fired and the bullet did not smash the window.
The motorbike used during the attack was later found burned-out nearby at Carnamy.
Garda Inspector David Kelly of Buncrana Garda station said it was lucky that nobody was seriously hurt or even killed during the attack.
“The recklessness shown by these people could have left somebody seriously injured or even killed.
“This is a busy estate and it was not that late in the evening so there was people about. It could have been a lot worse,” said Inspector Kelly.
He refused to say if the children were in the room which was targeted during the shooting.
“When we arrived there was a lot of people in shock and that’s very understandable. We could be dealing with a much more serious situation this morning,” he said.
He also revealed that a Garda had been at an adjoining housing estate just before the attack on another call and rushed to the scene.
“Had it have been any earlier, then we could be dealing with a much more serious incident,” added Inspector Kelly.
It is believe the family targeted in the attack are originally from Armagh but have been living in the area for more than a year.
Local Sinn Fein TD Deputy Padraig MacLochlainn has blamed so-called vigilantes for carrying out the attack and has asked them to stop.
The Gardai in Buncrana on 93 20540 say they have already received a lot of eye-witness reports but have appealed for anybody with information on the shooting to contact them.