Official documentation: Google Ads API docs

Authentication

Google Ads uses API key authentication.

  1. Go to the Connections page and create a New Connection
  2. Select Google Ads API from the Connector dropdown
  3. Enter a Connection name
  4. Fill in the following credentials:
Field Required
Developer Token ✅
Client Id ✅
Client Secret ✅
Refresh Token ✅

In order to start using the hibase connector to the Google Ads API (v12), you need to get a Developer Token and a OAuth2 Refresh Token from Google.

  1. Navigate to your Google Ads Manager Account API Centre and first of all copy the Account ID you see right of the AdWords logo at the top of the page (e.g. 123-456-7890)

  2. Fill out the form and apply for a Developer Token if you do not have one already. Apply for Basic API Access as described here. You will have to wait until your application is approved in order to start using the connector, but you can move on to the next steps already to ensure everything is set up

  3. Navigate to the Google API Console Credentials page and select your Project (or create a new one if needed)

  4. Click on Create Credentials, then OAuth client ID

  5. Set up an OAuth consent screen if asked to do so. You only have to provide an Application name for the purpose of this guide

  6. Back in the OAuth client ID setup form, select Web application as as Application type and provide a name for the application (e.g. hibase)

  7. Under Authorized redirect URIs, type https://developers.google.com/oauthplayground

  8. Click Create and note down the client ID and secret that are provided in the confirmation screen

  9. Navigate to the Google OAuth2 Playground and click on the gear icon in the top-right corner

  10. Paste your client ID and secret at the bottom of the form

  11. On the left-hand side of the screen, under Select & authorize APIs, paste https://www.googleapis.com/auth/adwords and click Authorize APIs. Note that if you get a 400 error stating the redirect URI is not authorized, you might simply have to retry in a few minutes after the changes you just saved above have propagated

  12. Authenticate with your Google Account in the OAuth2 consent screen and grant permissions to manage AdWords campaigns

  13. Back in the OAuth2 Playground, hit Exchange authorization code for tokens and copy the Refresh token that is provided

  14. In your credentials page, you can now remove https://developers.google.com/oauthplayground from the Authorized redirect URIs of your OAuth Client ID

  15. In hibase, provide the Account ID, Developer Token, Client ID, Client Secret and Refresh Token when adding the Google Ads API connector

Endpoints

Report (API docs)

Execute a Google Ads Query Language (GAQL) query to retrieve advertising performance data and campaign metrics.

Parameter Description Required
manager_customer_id The customer ID of the manager account (MCC). Required for accounts managed through an MCC. —
customer_id The Google Ads customer ID to query (format: 123-456-7890 or 1234567890). ✅
query A GAQL (Google Ads Query Language) query string, e.g. SELECT campaign.name, metrics.clicks FROM campaign WHERE segments.date DURING LAST_7_DAYS. ✅

Returned Data: All fields from the API response are automatically flattened into columns.