Maybe using find along side of grep?
grep text `find . -maxdepth 3 -type f`
This example will find the text "text" within all files found, with the max depth of three directories. I know this isn't exactly what you need, I'm sure you can work with it and figure something out. I would fix it up for you myself, but I'm at work and I don't have access to linux currently.