How to specify spacegroup in API?

I used the API as said in the API page of the main website, although I did modify it a bit in order to get a specific element (Sc-*). However, I am unsure of how to specify the space group I want (Fm3m). Can anybody help? Thanks!

You can find a description and examples of the (nested) fields within the API’s exposed material “documents” via the materialsproject/mapidoc github repository.

Spacegroup information is a subdocument within a material document. You can filter on these fields using so-called “dot notation”. For example, the following currently yields 23 matching responses.

from pymatgen.ext.matproj import MPRester

mpr = MPRester()
mpr.query({
    "elements": "Sc",
    "nelements": 2,
    "spacegroup.symbol": "Fm-3m"
}, ["material_id", "spacegroup"])

, i.e. Sc-* materials with spacegroup Fm3̅m (I can’t find any with “Fm3m” encoding).