Mandala
Tools

Google Ads

Query campaigns, ad groups, and performance metrics

Usage Instructions

Connect to Google Ads to list accessible accounts, list campaigns, view ad group details, get performance metrics, and run custom GAQL queries.

Tools

List all Google Ads customer accounts accessible by the authenticated user

Input

ParameterTypeRequiredDescription
developerTokenstringYesGoogle Ads API developer token

Output

ParameterTypeDescription
customerIdsarrayList of accessible customer IDs
totalCountnumberTotal number of accessible customer accounts

Run a custom Google Ads Query Language (GAQL) query

Input

ParameterTypeRequiredDescription
customerIdstringYesGoogle Ads customer ID (numeric, no dashes)
developerTokenstringYesGoogle Ads API developer token
managerCustomerIdstringNoManager account customer ID (if accessing via manager account)
querystringYesGAQL query to execute
pageTokenstringNoPage token for pagination

Output

ParameterTypeDescription
resultsjsonArray of result objects from the GAQL query
totalResultsCountnumberTotal number of matching results
nextPageTokenstringToken for the next page of results

List campaigns in a Google Ads account with optional status filtering

Input

ParameterTypeRequiredDescription
customerIdstringYesGoogle Ads customer ID (numeric, no dashes)
developerTokenstringYesGoogle Ads API developer token
managerCustomerIdstringNoManager account customer ID (if accessing via manager account)
statusstringNoFilter by campaign status (ENABLED, PAUSED, REMOVED)
limitnumberNoMaximum number of campaigns to return

Output

ParameterTypeDescription
campaignsarrayList of campaigns in the account
totalCountnumberTotal number of campaigns returned

Get performance metrics for Google Ads campaigns over a date range

Input

ParameterTypeRequiredDescription
customerIdstringYesGoogle Ads customer ID (numeric, no dashes)
developerTokenstringYesGoogle Ads API developer token
managerCustomerIdstringNoManager account customer ID (if accessing via manager account)
campaignIdstringNoFilter by specific campaign ID
dateRangestringNoPredefined date range (LAST_7_DAYS, LAST_30_DAYS, THIS_MONTH, LAST_MONTH, TODAY, YESTERDAY)
startDatestringNoCustom start date in YYYY-MM-DD format
endDatestringNoCustom end date in YYYY-MM-DD format

Output

ParameterTypeDescription
campaignsarrayCampaign performance data broken down by date
totalCountnumberTotal number of result rows

List ad groups in a Google Ads campaign

Input

ParameterTypeRequiredDescription
customerIdstringYesGoogle Ads customer ID (numeric, no dashes)
developerTokenstringYesGoogle Ads API developer token
managerCustomerIdstringNoManager account customer ID (if accessing via manager account)
campaignIdstringYesCampaign ID to list ad groups for
statusstringNoFilter by ad group status (ENABLED, PAUSED, REMOVED)
limitnumberNoMaximum number of ad groups to return

Output

ParameterTypeDescription
adGroupsarrayList of ad groups in the campaign
totalCountnumberTotal number of ad groups returned

Get performance metrics for individual ads over a date range

Input

ParameterTypeRequiredDescription
customerIdstringYesGoogle Ads customer ID (numeric, no dashes)
developerTokenstringYesGoogle Ads API developer token
managerCustomerIdstringNoManager account customer ID (if accessing via manager account)
campaignIdstringNoFilter by campaign ID
adGroupIdstringNoFilter by ad group ID
dateRangestringNoPredefined date range (LAST_7_DAYS, LAST_30_DAYS, THIS_MONTH, LAST_MONTH, TODAY, YESTERDAY)
startDatestringNoCustom start date in YYYY-MM-DD format
endDatestringNoCustom end date in YYYY-MM-DD format
limitnumberNoMaximum number of results to return

Output

ParameterTypeDescription
adsarrayAd performance data broken down by date
totalCountnumberTotal number of result rows

Notes

  • Category: tools
  • Type: google_ads
Google Ads