Querying Data
An introduction on how to query for data with the Materials Project API client.
with MPRester("your_api_key_here") as mpr:
docs = mpr.materials.summary.search(
material_ids=["mp-149", "mp-13", "mp-22526"]
)example_doc = docs[0]
mpid = example_doc.material_id
formula = example_doc.formula_prettylist_of_available_fields = mpr.materials.summary.available_fieldswith MPRester("your_api_key_here") as mpr:
docs = mpr.materials.summary.search(
elements=["Si", "O"], band_gap=(0.5, 1.0)
)Determine which functional was used to relax structures
Other Data
Convenience Functions
Last updated
Was this helpful?