Maybe use the data explorer plugin to get the data you want. You could then retrieve it via the API.
Or maybe say what problem you’re trying to solve. That is, what are you going to do when you have the information? Maybe there’s a better way to do that.