I've gotten rid of a couple of flea infestations once with diotomaceous earth (before kids) and once with 20 Mule Team Borax (garden stores or organic specialty stores). Diotomaceous earth is extremely damaging to inhale and I wouldn't ever use it again. The microscopic sharp shells get into your lungs and cause damage and are hard to get rid of -- not unlike asbestos. I wore gloves and a mask and used water to wet it down, a lot of trouble. But if I'd been aware of borax I would've used that instead.
With borax, I sprinkled it into my carpet and used my carpet steam cleaner hoping the water would sink it further into the carpet and it worked great. This was on top of frontline which works great, but once you let it go too long and the flea eggs get into your carpet then you need borax to stop it at the source.
I also found this information: Boric acid and sodium borate (borax) is potentially toxic to people and pets. However serious poisonings in humans have been reported very rarely from a single acute ingestion. Serious toxicity is more likely with repeated exposure to raw or abraded skin or from repeated ingestions.
It takes as little as .1 grams per kilogram of a child's weight (ingested) to be lethal. That would be a small enough amount that they could easily eat that much. I would consider it to be very dangerous to kids. It would probably not be very dangerous on the rug. I have used it before and walked on it afterwards in my bare feet and it didn't damage the rug.