Materials 404 not found error

I’m attempting to fetch data about some materials using material IDs collected from pymatgen a few months prior. However, I noticed that some were returning a 404 error. Strangely, materials that can’t be found on the old materials project database (such as mp-1021383) can be found on the next gen database, and vice versa (such as mp-1057017). I’ve tried calling pymatgen functions, sending a GET request to the MAPI directly, and searching on the actual website. I’ve also tried using the “get_materials_id_from_task_id(task_id )” function, but with no avail. What is the reason for this and is there a way to fix it?

Hi @jzhao,

The short answer to this is that the new API and website provide access to an updated set data. There are some task_id values in the new release that are deprecated in the previous one, and vice versa. This results in different task_id values being chosen as the main material_id for a unique entry.

That being said, the new API should give you access to all material data, both deprecated and undeprecated. For example, the MPID mp-1057017 now corresponds to material mp-722819. To query deprecated data, you can use the endpoint search methods in the new client and pass in deprecated=True in addition to other criteria.

Let me know if you need any more help getting the data you need.

– Jason