Query campaigns, ad groups, and performance metrics
Connect to Google Ads to list accessible accounts, list campaigns, view ad group details, get performance metrics, and run custom GAQL queries.
List all Google Ads customer accounts accessible by the authenticated user
| パラメータ | 型 | 必須 | 説明 |
|---|
developerToken | string | はい | Google Ads API developer token |
| パラメータ | 型 | 説明 |
|---|
customerIds | array | List of accessible customer IDs |
totalCount | number | Total number of accessible customer accounts |
Run a custom Google Ads Query Language (GAQL) query
| パラメータ | 型 | 必須 | 説明 |
|---|
customerId | string | はい | Google Ads customer ID (numeric, no dashes) |
developerToken | string | はい | Google Ads API developer token |
managerCustomerId | string | いいえ | Manager account customer ID (if accessing via manager account) |
query | string | はい | GAQL query to execute |
pageToken | string | いいえ | Page token for pagination |
| パラメータ | 型 | 説明 |
|---|
results | json | Array of result objects from the GAQL query |
totalResultsCount | number | Total number of matching results |
nextPageToken | string | Token for the next page of results |
List campaigns in a Google Ads account with optional status filtering
| パラメータ | 型 | 必須 | 説明 |
|---|
customerId | string | はい | Google Ads customer ID (numeric, no dashes) |
developerToken | string | はい | Google Ads API developer token |
managerCustomerId | string | いいえ | Manager account customer ID (if accessing via manager account) |
status | string | いいえ | Filter by campaign status (ENABLED, PAUSED, REMOVED) |
limit | number | いいえ | Maximum number of campaigns to return |
| パラメータ | 型 | 説明 |
|---|
campaigns | array | List of campaigns in the account |
↳ id | string | Campaign ID |
↳ name | string | Campaign name |
↳ status | string | Campaign status (ENABLED, PAUSED, REMOVED) |
↳ channelType | string | Advertising channel type (SEARCH, DISPLAY, SHOPPING, VIDEO, PERFORMANCE_MAX) |
↳ startDate | string | Campaign start date (YYYY-MM-DD) |
↳ endDate | string | Campaign end date (YYYY-MM-DD) |
↳ budgetAmountMicros | string | Daily budget in micros (divide by 1,000,000 for currency value) |
totalCount | number | Total number of campaigns returned |
Get performance metrics for Google Ads campaigns over a date range
| パラメータ | 型 | 必須 | 説明 |
|---|
customerId | string | はい | Google Ads customer ID (numeric, no dashes) |
developerToken | string | はい | Google Ads API developer token |
managerCustomerId | string | いいえ | Manager account customer ID (if accessing via manager account) |
campaignId | string | いいえ | Filter by specific campaign ID |
dateRange | string | いいえ | Predefined date range (LAST_7_DAYS, LAST_30_DAYS, THIS_MONTH, LAST_MONTH, TODAY, YESTERDAY) |
startDate | string | いいえ | Custom start date in YYYY-MM-DD format |
endDate | string | いいえ | Custom end date in YYYY-MM-DD format |
| パラメータ | 型 | 説明 |
|---|
campaigns | array | Campaign performance data broken down by date |
↳ id | string | Campaign ID |
↳ name | string | Campaign name |
↳ status | string | Campaign status |
↳ impressions | string | Number of impressions |
↳ clicks | string | Number of clicks |
↳ costMicros | string | Cost in micros (divide by 1,000,000 for currency value) |
↳ ctr | number | Click-through rate (0.0 to 1.0) |
↳ conversions | number | Number of conversions |
↳ date | string | Date for this row (YYYY-MM-DD) |
totalCount | number | Total number of result rows |
List ad groups in a Google Ads campaign
| パラメータ | 型 | 必須 | 説明 |
|---|
customerId | string | はい | Google Ads customer ID (numeric, no dashes) |
developerToken | string | はい | Google Ads API developer token |
managerCustomerId | string | いいえ | Manager account customer ID (if accessing via manager account) |
campaignId | string | はい | Campaign ID to list ad groups for |
status | string | いいえ | Filter by ad group status (ENABLED, PAUSED, REMOVED) |
limit | number | いいえ | Maximum number of ad groups to return |
| パラメータ | 型 | 説明 |
|---|
adGroups | array | List of ad groups in the campaign |
↳ id | string | Ad group ID |
↳ name | string | Ad group name |
↳ status | string | Ad group status (ENABLED, PAUSED, REMOVED) |
↳ type | string | Ad group type (SEARCH_STANDARD, DISPLAY_STANDARD, SHOPPING_PRODUCT_ADS) |
↳ campaignId | string | Parent campaign ID |
↳ campaignName | string | Parent campaign name |
totalCount | number | Total number of ad groups returned |
Get performance metrics for individual ads over a date range
| パラメータ | 型 | 必須 | 説明 |
|---|
customerId | string | はい | Google Ads customer ID (numeric, no dashes) |
developerToken | string | はい | Google Ads API developer token |
managerCustomerId | string | いいえ | Manager account customer ID (if accessing via manager account) |
campaignId | string | いいえ | Filter by campaign ID |
adGroupId | string | いいえ | Filter by ad group ID |
dateRange | string | いいえ | Predefined date range (LAST_7_DAYS, LAST_30_DAYS, THIS_MONTH, LAST_MONTH, TODAY, YESTERDAY) |
startDate | string | いいえ | Custom start date in YYYY-MM-DD format |
endDate | string | いいえ | Custom end date in YYYY-MM-DD format |
limit | number | いいえ | Maximum number of results to return |
| パラメータ | 型 | 説明 |
|---|
ads | array | Ad performance data broken down by date |
↳ adId | string | Ad ID |
↳ adGroupId | string | Parent ad group ID |
↳ adGroupName | string | Parent ad group name |
↳ campaignId | string | Parent campaign ID |
↳ campaignName | string | Parent campaign name |
↳ adType | string | Ad type (RESPONSIVE_SEARCH_AD, EXPANDED_TEXT_AD, etc.) |
↳ impressions | string | Number of impressions |
↳ clicks | string | Number of clicks |
↳ costMicros | string | Cost in micros (divide by 1,000,000 for currency value) |
↳ ctr | number | Click-through rate (0.0 to 1.0) |
↳ conversions | number | Number of conversions |
↳ date | string | Date for this row (YYYY-MM-DD) |
totalCount | number | Total number of result rows |