Fixing csv and html outputs

I clone this and CSV and HTML format doesn't work until I make this changes
I'm working with a one register data set who's not an array.

I use API KEY auth