Search API Connector Documentation
Import Criteo Data to Google Sheets
In this guide, we’ll walk through how to import Criteo data directly into Google Sheets, using the API Connector add-on for Sheets.
For this guide, we'll use the OAuth client credentials flow. That means we'll get our token through some custom API requests rather than through API Connector's automatic OAuth2 connection manager (as the OAuth manager currently only supports the authorization code flow).
Contents
- Before You Begin
- Part 1: Create a Criteo App
- Part 2: Get your Access Token
- Part 3: Pull Criteo Data into Sheets
- Part 4: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Create a Criteo
- If you haven't already, navigate to https://developers.criteo.com/ and log in with your existing Criteo account.
- Once logged in, you'll be redirected to the Criteo Developer Dashboard, and will be prompted to create an Organization. Provide your company name, country, company type, and email.
- Once you've created an Organization, you'll be redirected to the My Apps screen. Click Start building.
- You'll be prompted to select an authentication method. Choose Client credentials.
- Give your app a name, description and image, and click Create app
- You'll be asked to select the services you would like to access through your app (Marketing Solutions, Retail Media, or Publisher). This can't be changed, but you can always make a new app later.
- Click on Generate and download new key and you'll provided with a file containing an API Key (aka Client ID) and API Secret (aka Client Secret).
Part 2: Get Your Access Token
To get your access token, open Google Sheets, click Extensions > API Connector > Open > Create request, and set up a request as follows:
- Application:
Custom
- Method:
POST
- Request URL:
https://api.criteo.com/oauth2/token
- Request body:
{"grant_type":"client_credentials", "client_id":"your_api_key", "client_secret":"your_API_secret"}
Substitute in your API key and secret key from above. Name your request and click Run. The whole thing should look like this:
Note the value returned in the access_token field. That's the token we'll use for getting Criteo data. This token will only be valid for 15 minutes, so after that you'll need to run the request again to get a new token.
Part 3: Get Criteo Data in Sheets
You can create a request using any of the endpoints and parameters described in Criteo's documentation.
Example #1
This request shows how to fetch your advertiser ID, which you'll need for subsequent requests. Just substitute in your own access token.
- Application:
Custom
- Method:
GET
- Request URL:
https://api.criteo.com/2023-01/advertisers/me
- Headers
Authorization
:Bearer
your_token

For convenience, the example in the screenshot references the token value from cell A2. This means the header doesn't need to be updated as it will automatically pull in the new value each time the access token is refreshed.
Example #2
You can use the same setup to fetch data from any part of Criteo's API, by changing the request method and URL as directed in the documentation. For example, if you're fetching analytics stats, a request might look like this:
- Application:
Custom
- Method:
POST
- Request URL:
https://api.criteo.com/2023-01/statistics/report
- Headers
Authorization
:Bearer
your_token
- Request body:
{"advertiserIds":"your_advertiser_id","startDate":"2023-06-01","endDate":"2023-06-30","format":"csv","dimensions":["AdsetId","Day"],"metrics":["Displays","Clicks"],"timezone":"PST","currency":"USD"}
Part 4: API Documentation
Official documentation: https://developers.criteo.com/marketing-solutions/docs