You have to use the Supermetrics' Connector.
After opening a blank spreadsheet in Google sheets, click on «Add-ons» and then on «Get add-ons»
Search for «Supermetrics» in Google Workspace Marketplace and click on «Supermetrics» and «Install» in order to install the add-on. You have to link your Google account with Supermetrics Connector in order to get your data in Google Sheets.
Click on «Allow» in order to allow the Supermetrics Connector to change your data on
behalf of you.
After you are done with the authentication, click on «Add-ons» and launch Supermetrics’ sidebar.
Search for «Searchmetrics» in the sidebar and click on it in order to authenticate yourself with Searchmetrics. Connect to Searchmetrics by filling in your API Key and API Secret. Have a look at this article, when you don't know where to find these information: API Management.
After you are done with Searchmetrics’ authentication, click on «Report configuration» to expand it and select your query type.
Configure your query according to your needs and select «Combine new results with old» in order to append the newest data to your current data set.
Click on «Get Data to Table» in order to get your Searchmetrics Data to your spreadsheet.
And the data will show up in the table.
In order to manage queries, click on the hamburger menu on the top left of the sidebar.
The hamburger menu will reveal several options. Click on «Manage queries».
Clicking on «Manage queries» will bring up the «Supermetrics Queries» tab.
Click on the «Query ID» and wait for a couple of seconds, the information about the query will show up in the side bar.
Click on «Modify» to modify your query.
After you are done with the modifications, click on «Apply changes». The query will refresh after you apply your changes.
In order to run query refreshes automatically, click on the «Schedule» tab on the sidebar. Then click on «Add trigger» to set up your trigger.
Set up your trigger and click on «Save changes» to save them.