Is there a way to export graph data as JSON/other data format?

For example, if I query for now and five minutes before, I would get the necessary data from the specific graph I would mention to draw a graph myself (in an external app, for example).

Is there an API/service like this? Would really appreciate something like this.