I'm afraid we have not implemented this sort of search in the API. The rather clumsy work-around is to scan the whole CSD with the required criteria, for example:
from ccdc import io
csd = io.CrystalReader('csd')
refcodes = 
for c in csd:
if c.z_value == required_z and c.z_prime == required_z_prime and c.calculated_density is not None and low_density < c.calculated_density < high_density:
m = c.molecule
if len(m.components) == required_components:
atoms_with_sites = [a for a in m.atoms if a.coordinates is not None]
if len(atoms_with_sites) == required_sited_atoms:
with open('hit_structures.gcd', 'w') as writer:
I'm sorry that there is nothing faster available in the API: I shall raise this at the next scheduling meeting to see whether it can be implemented for a future release.
Thank you for the question: it is feedback like this that helps to make the API better.