MP XAS data available for some old materials ids, but not new

Using the following API call (in python; will require an API key of course), I get four materials.

import requests
import json
mp_base_url = "https://api.materialsproject.org/"
headers = {
    'accept': 'application/json',
    'X-API-KEY': 'MY_API_KEY',
}

co_query = {
    'edge': 'K',
    'spectrum_type': 'XANES',
    'absorbing_element': 'Co',
    'formula': 'Li5CoO4',
    '_fields': 'material_id,spectrum'
}
response = requests.get(mp_base_url + "xas", params = co_query, headers = headers)
data = response.json()['data']

The four material ids returned are

mp-773454, mp-781073, mp-775093, mp-765070

The first of which is an existing material id, and the other three when plugged into the website have redirects to new material ids. However, mp-779022: Li5CoO4 (Orthorhombic, Pbca, 61) shows XAS data, but starting from the id it redirects to, mp-779022: Li5CoO4 (Orthorhombic, Pbca, 61) says no X-ray absorption data is available (the same is true for the other two material ids listed above).

How should I interpret this? Is it that:

  1. The process of merging the material ids lost information on the website, but this is preserved through the API and the old “redirected” link,
  2. These spectra should not be used for some reason, and the website is updated to reflect that but not necessarily the API, or
  3. Something else?

Thank you.

Hi @itsgt, sorry for the late reply. I would interpret it as #1. We are in the process of making changes to the website to better communicate material_id changes and avoid missing data and confusion like this. In general, the only data that should NOT be used is that related to materials which have deprecated=True set in materials and summary. The API by default does not return this, but I thought I should mention it.

– Jason

1 Like