API to connect to Sheets

Hello,

I wish to transpose row data into column.
What API to be used to access sheets, create new sheets and pivot function to transpose.

regards