materialsproject / api

New API client for the Materials Project
https://materialsproject.github.io/api/
Other
105 stars 33 forks source link

Entries in doi endpoint do not have 'material_id' field #907

Open slee-lab opened 2 months ago

slee-lab commented 2 months ago

Hi,

I wanted to query a material_id and get the dois in Materials Project API.

I am using mp-api 0.41.2 and python 3.10. I wanted to use doi endpoint for this. mpr.doi.available_fields gives ['doi', 'bibtex', 'material_id']

Issue 1. All my queries using material_id seems to return a blank list. Referring to https://github.com/materialsproject/api/issues/612, I tried mpr.doi.get_data_by_id('mp-771054') which returns None. mpr.doi.search(material_ids=['mp-771054']) which returns blank list.

Issue 2. I did download all the entries in doi endpoint dois = mpr.doi.search(num_chunks=100,chunk_size=1000,all_fields=True,fields=['doi','material_id']) but all of them have 'fields_not_requested': ['bibtex', 'material_id'] and 'material_id' as None.

Question 1. Is the doi endpoint still under development? Is there a particular way I should query in this endpoint? Question 2. If doi endpoint should be updated, could you advise on how to retrieve the dois for a given mpid as of now?

Thank you.