How to download the user remarks from materials api

When we use the materials api to download data, we can specify the properties which we want to include in the output entries. This is very nice. However, it looks like the webpage from materials project has more info than what we can access.
For instance, I found the following compound has been marked as High pressure experimental phase

I wonder if I can access such information through materials api?

Hi Qiang,

Yes. Using our general “mpquery” endoint (accessed via pymatgen as MPRester.query), you can access many such nuggets programmatically. We could certainly be clearer about this, and we intend to have inline links on detail pages in the future in order to ease such access.

The general procedure at this time is to go to our searchable repository “mapidoc” for our API, and explore the available keypaths. For example, if you navigate to the repository, type “t” (lower-case T, no quotes) to activate GitHub’s file finder. Then, start typing in “remarks” and you should be able to select to view " mapidoc/materials/snl_final/about/remarks/ This is your field of interest, so you then can enter the path (replacing slashes with dots, and omitting the “mapidoc/materials” part) as a string to MPRester.query to get that property. Here’s the code:

from pymatgen import MPRester

mpr = MPRester()
mpr.query("mp-1102", ["snl_final.about.remarks"])
[{'snl_final.about.remarks': ['High pressure experimental phase',
   'Lutetium nitride']}]

Hope this helps,

1 Like

Please don’t put too much faith in the “High pressure experimental phase” remark specifically right now however, this is very much open to interpretation and not a prediction from us :slight_smile: (and likely should not be there in some instances).