Endpoint Get Campaigns
Name
get_campaigns
Description
Get Google Ads campaign data [API reference]
Parameters
| Parameter | Required | Options |
|---|---|---|
|
Name:
Label: CustomerId (without dash e.g. 2125557752) Login to your Google Ads account and see top-right corner for your CustomerId |
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| Id |
DT_WSTR
|
nvarchar(30)
|
30 | |
| Name |
DT_WSTR
|
nvarchar(500)
|
500 | |
| Status |
DT_WSTR
|
nvarchar(30)
|
30 | |
| StartDate |
DT_DBDATE
|
date
|
||
| EndDate |
DT_DBDATE
|
date
|
||
| CampaignBudgetAmount |
DT_R8
|
float
|
||
| CampaignBudgetAmountMicros |
DT_I8
|
bigint
|
||
| TargetCpa |
DT_R8
|
float
|
||
| TargetCpaMicros |
DT_I8
|
bigint
|
||
| MaximizeConversionsTargetCpa |
DT_R8
|
float
|
||
| MaximizeConversionsTargetCpaMicros |
DT_I8
|
bigint
|
||
| KeywordMatchType |
DT_WSTR
|
nvarchar(50)
|
50 | |
| ResourceName |
DT_WSTR
|
nvarchar(500)
|
500 | |
| BiddingStrategyType |
DT_WSTR
|
nvarchar(100)
|
100 | |
| FinalUrlSuffix |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AdServingOptimizationStatus |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AdvertisingChannelType |
DT_WSTR
|
nvarchar(500)
|
500 | |
| NetworkSettingsTargetGoogleSearch |
DT_BOOL
|
bit
|
||
| NetworkSettingsTargetSearchNetwork |
DT_BOOL
|
bit
|
||
| NetworkSettingsTargetContentNetwork |
DT_BOOL
|
bit
|
||
| NetworkSettingsTargetPartnerSearchNetwork |
DT_BOOL
|
bit
|
||
| NetworkSettingsTargetYoutube |
DT_BOOL
|
bit
|
||
| NetworkSettingsTargetGoogleTvNetwork |
DT_BOOL
|
bit
|
||
| ExperimentType |
DT_WSTR
|
nvarchar(100)
|
100 | |
| ServingStatus |
DT_WSTR
|
nvarchar(100)
|
100 | |
| DynamicSearchAdsSettingDomainName |
DT_WSTR
|
nvarchar(500)
|
500 | |
| DynamicSearchAdsSettingLanguageCode |
DT_WSTR
|
nvarchar(50)
|
50 | |
| DynamicSearchAdsSettingUseSuppliedUrlsOnly |
DT_BOOL
|
bit
|
||
| TargetingSettingTargetRestrictions |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| GeoTargetTypeSettingPositiveGeoTargetType |
DT_WSTR
|
nvarchar(100)
|
100 | |
| GeoTargetTypeSettingNegativeGeoTargetType |
DT_WSTR
|
nvarchar(100)
|
100 | |
| PaymentMode |
DT_WSTR
|
nvarchar(100)
|
100 | |
| BaseCampaign |
DT_WSTR
|
nvarchar(500)
|
500 | |
| Labels |
DT_WSTR
|
nvarchar(500)
|
500 | |
| BiddingStrategySystemStatus |
DT_WSTR
|
nvarchar(500)
|
500 | |
| PrimaryStatus |
DT_WSTR
|
nvarchar(100)
|
100 | |
| PrimaryStatusReasons |
DT_WSTR
|
nvarchar(1050)
|
1050 | |
| CampaignBudget |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ManualCpcEnhancedCpcEnabled |
DT_BOOL
|
bit
|
||
| CampaignGroup |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AdvertisingChannelSubType |
DT_WSTR
|
nvarchar(100)
|
100 | |
| TargetSpend |
DT_R8
|
float
|
||
| TargetSpendMicros |
DT_I8
|
bigint
|
||
| FrequencyCaps |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
| VideoBrandSafetySuitability |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AssetAutomationSettings |
DT_WSTR
|
nvarchar(1090)
|
1090 | |
| TargetImpressionShareLocation |
DT_WSTR
|
nvarchar(500)
|
500 | |
| TargetImpressionShareLocationFraction |
DT_R8
|
float
|
||
| TargetImpressionShareLocationFractionMicros |
DT_I8
|
bigint
|
||
| TargetImpressionShareCpcBidCeiling |
DT_R8
|
float
|
||
| TargetImpressionShareCpcBidCeilingMicros |
DT_I8
|
bigint
|
||
| UrlExpansionOptOut |
DT_BOOL
|
bit
|
||
| AudienceSettingUseAudienceGrouped |
DT_BOOL
|
bit
|
||
| PerformanceMaxUpgradePerformanceMaxCampaign |
DT_WSTR
|
nvarchar(500)
|
500 | |
| PerformanceMaxUpgradeStatus |
DT_WSTR
|
nvarchar(500)
|
500 | |
| OptimizationScore |
DT_R8
|
float
|
If the column you are looking for is missing, consider customizing Google Ads Connector.
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Examples
SSIS
Use Google Ads Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
API Source - Google Ads
Read / write Google Ads data inside your app (e.g. Campaigns, Ad Groups, Keywords, Spending, Performance); perform many Google Ads operations without coding, just using easy to use high performance API Connector for Google Ads
Google Ads
Get Campaigns
| There are no parameters to configure. |
API Destination
API Destination - Google Ads
Read / write Google Ads data inside your app (e.g. Campaigns, Ad Groups, Keywords, Spending, Performance); perform many Google Ads operations without coding, just using easy to use high performance API Connector for Google Ads
Google Ads
Get Campaigns
| There are no parameters to configure. |
ODBC application
Use these SQL queries in your ODBC application data source:
Get Campaigns
Get all Campaigns for Google Ads account
SELECT * FROM get_campaigns
--OR--
--select * from get_resource_data WITH(Resource='Campaign') --This is slight FASTER
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Get Campaigns
Get all Campaigns for Google Ads account
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_campaigns
--OR--
--select * from get_resource_data WITH(Resource=''Campaign'') --This is slight FASTER';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_ADS_IN_GATEWAY];