Hi everyone,
I’m looking to create a Demand Gen campaign with the primary goal of YouTube engagement (e.g., views, interactions).
I have a few questions regarding this:
Is this campaign goal supported in API version 18?
If yes, could you please provide the relevant resource names/endpoints and the required parameters for creating this campaign via the Google Ads API?
Additionally, if possible, could you share a sample code snippet showing how to set up:
The campaign itself
An ad group
And a YouTube ad (asset/ad creative)
I apologize if this has been asked before — I’ve looked through the documentation, but haven’t been able to find a clear example specifically for this use case.
Any help or references would be greatly appreciated. Thanks in advance!
1. Is this campaign goal supported in API version 18?
2. If yes, could you please provide the relevant resource names/endpoints and the required parameters for creating this campaign via the Google Ads API?
3. Additionally, if possible, could you share a sample code snippet showing how to set up: The campaign itself, An ad group, And a YouTube ad (asset/ad creative)
Request Body: ============== POST https://googleads.googleapis.com/v19/customers/{customerId}/campaignBudgets:mutate?key=[YOUR_API_KEY] HTTP/1.1 developer-token: ********************** Authorization: Bearer [YOUR_ACCESS_TOKEN] Accept: application/json Content-Type: application/json { "operations": [ { "create": { "amountMicros": 100000, "deliveryMethod": "STANDARD", "name": "campaign budget1289", "type": "STANDARD" } } ] } Response: =========== HTTP/1.1 200 content-encoding: gzip content-length: 114 content-type: application/json; charset=UTF-8 date: Thu, 24 Apr 2025 20:00:45 GMT server: ESF vary: Origin, X-Origin, Referer { "results": [ { "resourceName": "customers/{customerId}/campaignBudgets/{campaignBudgetId}" } ] }Then you need to create a campaign using the campaigns method:
Request Body: ============== POST https://googleads.googleapis.com/v19/customers/{customerId}/campaigns:mutate?key=[YOUR_API_KEY] HTTP/1.1 developer-token: ********************** Authorization: Bearer [YOUR_ACCESS_TOKEN] Accept: application/json Content-Type: application/json { "operations": [ { "create": { "name": "demand gen campaign233", "advertisingChannelType": "DEMAND_GEN", "campaignBudget": "customers/{customerId}/campaignBudgets/{campaignBudgetId}", "targetCpa": { "targetCpaMicros": 10000 } } } ] } Response: ========== HTTP/1.1 200 content-encoding: gzip content-length: 108 content-type: application/json; charset=UTF-8 date: Thu, 24 Apr 2025 20:04:49 GMT server: ESF vary: Origin, X-Origin, Referer { "results": [ { "resourceName": "customers/{customerId}/campaigns/{campaignId}" } ] }Then you need to create an ad group using the adGroups method:
Request Body: =============== POST https://googleads.googleapis.com/v19/customers/{customerId}/adGroups:mutate?key=[YOUR_API_KEY] HTTP/1.1 developer-token: ********************** Authorization: Bearer [YOUR_ACCESS_TOKEN] Accept: application/json Content-Type: application/json { "operations": [ { "create": { "campaign": "customers/{customerId}/campaigns/{campaignId}", "name": "demand gen ad group 20", "status": "ENABLED" } } ] } Response: ========== HTTP/1.1 200 content-encoding: gzip content-length: 106 content-type: application/json; charset=UTF-8 date: Thu, 24 Apr 2025 20:06:05 GMT server: ESF vary: Origin, X-Origin, Referer { "results": [ { "resourceName": "customers/{customerId}/adGroups/{adGroupId}" } ] }As you are specifically looking for the YouTube videos related ad, you need to create a DemandGenVideoResponsiveAdInfo and add the YouTube based video asset IDs to the 'videos' field. I would recommend you to kindly refer to the adGroupAds.mutate method where you can create ads using the Google Ads API.
Request Body: =============== POST https://googleads.googleapis.com/v19/customers/{customerId}/adGroupAds:mutate?key=[YOUR_API_KEY] HTTP/1.1 developer-token: ********************** Authorization: Bearer [YOUR_ACCESS_TOKEN] Accept: application/json Content-Type: application/json { "operations": [ { "create": { "adGroup": "customers/{customerId}/adGroups/{adGroupId}", "status": "ENABLED", "ad": { "demandGenVideoResponsiveAd": { "headlines": [ { "text": "demand gen video ad" } ], "descriptions": [ { "text": "a good demand gen video responsive ad" } ], "longHeadlines": [ { "text": "a long headline for the demand gen video responsive ad" } ], "videos": [ { "asset": "customers/{customerId}/assets/{assetId}" } ], "logoImages": [ { "asset": "customers/{customerId}/assets/{assetId}" } ], "breadcrumb1": "demand gen", "breadcrumb2": "video", "businessName": { "text": "Video Ads business" }, "callToActions": [ { "asset": "customers/{customerId}/assets/{assetId}" } ] }, "name": "Demand gen video responsive", "finalUrls": [ "https://www.example.com" ] } } } ] } Response: ============ HTTP/1.1 200 content-encoding: gzip content-length: 121 content-type: application/json; charset=UTF-8 date: Thu, 24 Apr 2025 20:07:58 GMT server: ESF vary: Origin, X-Origin, Referer { "results": [ { "resourceName": "customers/{customerId}/adGroupAds/{adGroupId}~{adId}" } ] }I hope this clarifies.
![]() |
Google Ads API Team |
[2025-04-24 20:28:02Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUt5q:ref" (ADR-00301597)
![]() |
Google Ads API Team |
[2025-04-25 03:17:28Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUt5q:ref" (ADR-00301597)
Yes, the YouTube Engagements campaign goal is specifically supported through both the Google Ads UI and the Google Ads API (v19). For more detailed information, I would recommend you to refer to the help center article "About YouTube Engagements goals in Demand Gen."
To set this up via the Google Ads API, you’ll need to use the appropriate endpoint to create 'CampaignConversionGoals' for your Demand Gen campaign. Make sure to set the 'ConversionActionCategory' to 'ENGAGEMENT' and the 'ConversionOrigin' to 'YOUTUBE_HOSTED'.
After reviewing your account (125-518-7903), I can confirm that 'ENGAGEMENT' is already selected as the account default goal. Since it's an account default goal, you’ll also need to set the 'biddable' field to 'true'. However, if you don’t define any specific conversion goals for your campaign, the account-level goals will be applied by default. In your case, since the account-level goal is set to 'ENGAGEMENT' with the conversion source as 'YouTube Hosted', all your campaigns will use this configuration unless you choose to override it.
![]() |
Google Ads API Team |
[2025-04-25 19:04:49Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUt5q:ref" (ADR-00301597)
Thanks for the great response — it’s really working well!
Meanwhile, I have a question: In the above code, I created a Demand Gen campaign and changed the campaign goal to YouTube Engagement. However, I noticed that a Target Cost Per Action (tCPA) of 0.01 was automatically set, which I don't want.
How can I remove or uncheck this setting using the Google Ads API (v19)?
Hi,
With regard to the Google Ads UI screenshot that you have provided, we are not sure why the target CPA value is getting automatically applied as our team only provides support for Google Ads API related concerns and technical implementations. But, if you use Google Ads API, then you need to explicitly mention the target CPA value. If you do not specify it, it will not be applied to your campaign.
I hope this clarifies your concern. Feel free to reach out for any further concerns/ queries.
![]() |
Google Ads API Team |
[2025-04-28 02:12:21Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUt5q:ref" (ADR-00301597)
{ "operations": [ { "create": { "name": "demand gen campaign233", "advertisingChannelType": "DEMAND_GEN", "status": "ENABLED", "campaignBudget": "customers/{customerId}/campaignBudgets/{campaign_budget_id}", "targetCpa": { "targetCpaMicros": 10000 } } } ] } { "results": [ { "resourceName": "customers/{customerId}/campaigns/{campaignId}" } ] }I request you kindly create the demand gen campaign by following the given suggestions via the Google Ads API and let us know how if you still face any issues.
![]() |
Google Ads API Team |
[2025-04-28 15:47:32Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUt5q:ref" (ADR-00301597)
Hi,
Please note that you need to create a Demand Gen campaign with appropriate bidding strategies. Without a bussing strategy, it is not possible to create the demand gen campaign. So the supported bidding strategies are maximize clicks, target CPA, maximize conversions, and target ROAS. For more information, please refer to the Supported bidding strategies help center article.
![]() |
Google Ads API Team |
[2025-04-28 19:37:44Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUt5q:ref" (ADR-00301597)