There is no perfect filter that does this. The closest thing I can think of is the ItemsFilterDataItemsFilterData
with the RecursiveRecursive
property to trueTrue. However, this will simply get all the items in a given publicationPublication/folderFolder/SG recursively through all nested subitems.
I think in your case you will need to get the ID of your level 1 componentComponent, fetch that componentComponent, get the ID of the next level and so on. Basically drill down until you get to the componentComponent that's on a pagePage.