Ideally, you might be able to get this data from ElementData:
https://reference.wolfram.com/language/ref/ElementData.html
But it doesn't look like it supports what you're looking for yet. In that case you will have to use WolframAlpha to get the data. The WolframAlpha command really just works by navigation. There isn't a specific design to it that allows you to determine what information it might have or the structure it will take. You just discover the information that is available with it. Since it breaks up the spectrum into those components, that's the way the data is available.