If hidden fields on a layout is not included Data API output, one could make a nice dynamic output based on business rules.
Hidden fields, do you mean outside Layout area or Hide object when? Why should they do not exist in the Data API?
I suggest that you create a Data API file where you just create layouts with the fields that you need and keep all other kind of objects away. That will make your solution run faster too.
Retrieving data ...