Extract Tags or names of structures

Hi all,

I have a question about Tags or names in Materials project entries. There is a Tags label below the structure representation in the materials project. e.g. for TiO2 Titanium oxide Titanium dioxide Anatase etc.
Is there any way to extract these tags for a bunch of structures with API or pymatgen?

Hi @nbm220, you can extract the tags for a particular material using the new API:

from mp_api import MPRester

with MPRester("your_api_key_here") as mpr:
    doc = mpr.provenance.get_data_by_id("mp-149",  fields=["tags"])
    tags = doc.tags

Hi,

Thank you for your help and for introducing the new API. It was the exact thing I looking for that.

No problem!