Skip to contents

logo Interface for loading data from 'Google Ads API', see Package provide function for authorization and loading reports.

Capabilities of rgoogleads:

  • Authorization in the Google Ads API

  • Loading a list of top-level accounts

  • Loading the entire hierarchy of accounts from manager accounts

  • Loading list of Google Ads client account objects: campaigns, ad groups, ads, etc.

  • Loading statistics from Google Ads client account

  • Loading resource metadata, resource fields, segments and metrics

  • Loading forecast and historical metrics from Keyword Planning.


Alexey Seleznev


if (FALSE) {

# set own oauth app
gads_auth_configure(path = 'C:/auth/app.json')
# set your developer token if needed, or use default developer token
gads_auth(email = '', developer_token = "own developer token")

# get list of accessible accounts
my_accounts <- gads_get_accessible_customers()

# set manager account id

# set client account id

# load report data
ad_group_report <- gads_get_report(
  resource    = "ad_group",
  fields = c("ad_group.campaign",
  date_from   = "2021-06-10",
  date_to     = "2021-06-17",
  where       = "ad_group.status = 'ENABLED'",
  order_by    = c("metrics.clicks DESC", "metrics.cost_micros")