Legacy API Users
Additional notes relevant to users of the legacy Materials Project API.
Legacy API users will be used to querying data largely through the top level query
method of the old MPRester
. Additionally, MongoDB-like query syntax (e.g. {"elements": {"$in": ["Si", "O"]}}
) was required as input, with parameters defined in the mapidoc GitHub repository. This is no longer available in the new API and MPRester
client.
The major API changes are summarized below:
The
MPRester
client can now be found in themp-api
Python package.The
query
method is replaced by thesearch
method of thesummary
endpoint (i.e.MPRester.summary.search
).Query parameters are defined in the client as inputs to the
search
function.
It should be noted that most of the other top level convenience function in the MPRester
are still available (e.g. get_bandstructure_by_material_id
, get_entries_in_chemsys
).
See the Getting Started section for details on how to start using the new MPRester
client.
Last updated