Can I use the API to get relevant data that can draw a bandgap graph?

I use the following method to get the data.

data = m.get_bandstructure_by_material_id("mp-22691", line_mode=False)

However, the data I obtained through the above method is not the same as that displayed on the website, so I can’t make the same bandgap map as the website by the obtained data.

Is the data obtained by the above method consistent with the k-point and energy data of the bandgap map of the website?
I need some valid data to calculate the effective quality. How can I get relevant valid data?

Hi @GZ_H,

Apologies your question was missed previously.

The answer is that yes, the data from the API should be consistent, and you can plot band structure diagrams using the relevant BSPlotter classes from pymatgen. This tutorial might help with that:

As one note, make sure that when you make the request you set line_mode to True:

data = m.get_bandstructure_by_material_id("mp-22691", line_mode=True)

Otherwise you will get the uniform band structure (DOS) not the line-mode band structure which is typically used for plotting.