You can do something like this:
var selparams = new NodeSelectionParameters
{
ClassNames = "Custom.Page",
Where = "NodeLevel = 3",
SelectOnlyPublished = true
};
DocumentHelper.GetDocuments(selparams, new TreeProvider()).Items.ToList();
Another option is to create a class from your page type using the generated code in the CMS, and do something like this:
var pages = CustomPageTypeProvider.GetCustomPageType().Published().Where("Nodelevel", QueryOperator.Equals, 3)
You can find other ways by looking into the document query documentation