--- id: mp-api version: "0.46.4" license: BSD-3-Clause-LBNL license_treatment: permissive maintenance: active --- # mp-api — API Client for the Materials Project License: permissive · Maintenance: active · Downloads: 297.8K/mo ## What it is and what it does mp-api is the official Python client for the Materials Project, a large database of computed materials properties and crystal structures. It provides a programmatic interface to search, filter, and download materials data by composition, structure, or property, making it the standard tool for researchers and engineers working with computational materials datasets. The package wraps the Materials Project REST API and handles authentication, data serialization (via orjson), and cloud storage access (via boto3 and deltalake). It depends on pymatgen for materials-specific data structures and emmet-core for common data models. Installation is straightforward, though it requires Python 3.11 and a free API key from the Materials Project. Use it for: - Search for materials by chemical formula or composition to retrieve computed band gaps, elastic constants, or thermodynamic properties. - Download crystal structure files in bulk for machine learning training datasets or high-throughput screening workflows. - Integrate materials data into simulation pipelines that depend on pymatgen structures and properties. - Query phase diagrams or stability data for materials design and discovery applications. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Python client for querying and downloading materials science data from the Materials Project database, providing programmatic access to computed properties and structures. Yes, if you work with materials science data. The package is actively maintained, has low install friction, carries no known vulnerabilities, and is the official client for a widely-used database. The permissive license poses no restriction. The main requirement is a Materials Project API key and Python 3.11+; the dependency stack is substantial but appropriate for materials research workflows. ## Install pip install mp-api uv add mp-api poetry add mp-api ## Installing mp-api Before you install: Low friction installation with a pure-wheel distribution. Active maintenance with a release within the last 60 days. Requires Python 3.11 or later and depends on a substantial stack including pymatgen, boto3, and data processing libraries (pyarrow, deltalake). License in practice: BSD-3-Clause-LBNL is a permissive license; you can use this package freely in commercial and private projects with minimal restrictions, provided you retain the license notice. Quickstart: pip install mp-api from mp_api.client import MPRester with MPRester(api_key="YOUR_API_KEY") as mpr: docs = mpr.materials.search(formula="Si") Requires a Materials Project API key (free registration at materialsproject.org) and Python 3.11 or later. Verify before relying: - Whether the package supports offline use or requires live API connectivity for all operations. - Performance characteristics when querying large result sets or downloading bulk data. - Whether pymatgen and emmet-core are required for all use cases or only for specific workflows. ## Package facts - License: BSD-3-Clause-LBNL (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 297.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags materials project api client, materials science data download, crystal structure database python, computed materials properties, materials project database access, materials-science, api-client, database-access [View on SkillFed](https://skillfed.io/packages/mp-api) · [View on PyPI](https://pypi.org/project/mp-api/)