Sydney shooting leaves residents shaken

The residents of a western Sydney home targeted in a drive-by shooting are "extremely shaken" but unhurt, police say.

It's believed eight people were inside the Guildford home on Station Street when about five shots were fired into a bedroom just before midnight on Monday.

Police are searching for a black Mazda hatchback seen leaving the street.

The residents are not known to police and investigators are trying to work out a motive.

"As you can imagine they are extremely shaken and it's very lucky that no one was injured," Inspector Ian Casher told Macquarie Radio on Tuesday.