How to get the 2D material data of material project

Hello everyone, how can I get all material data in the database whose dimension is 2D? I read through similar threads on this forum asking how to query 2D material data, but the best answer was a workaround for an older version. The new mp-api cannot quickly screen all 2D material data, no matter through any of its internal classes, I sincerely hope that some technical personnel can help me solve this problem.