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, Materials Project - Materials Explorer - mp-781073 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:
- The process of merging the material ids lost information on the website, but this is preserved through the API and the old “redirected” link,
- These spectra should not be used for some reason, and the website is updated to reflect that but not necessarily the API, or
- Something else?
Thank you.