regarding google search ad campaigns

49 views
Skip to first unread message

Dushyant

unread,
Sep 26, 2024, 1:42:22 AM9/26/24
to Google Ads API and AdWords API Forum
I have some doubts regarding search campiagns :
1. Is it possible to add image, video and other types of assets to the search campiagn, if yes then how to do so. also, is it required or optional ?

2. How to use client library to make search campiagns. kindly tell the methods required to set up search campiagns, budget, bidding startegy and targeting options.

3. Can you provide a sample cURL for making search campaigns including all the possible fields.

4. Please list down all the required and optional fields for the search campaigns so, that we have an idea to modify the campaign according to one's needs.

Google Ads API Forum Advisor

unread,
Sep 26, 2024, 8:32:51 AM9/26/24
to dkno...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Please find the following answers to your questions:

1) Is it possible to add image, video and other types of assets to the search campaign, if yes then how to do so. also, is it required or optional ?

Yes, you can add the image asset to a search campaign. but the video asset is not supported. You may check this document to know how the Asset types linked to customers, campaigns, and ad groups.

To do this you need to
  • create an asset with type image
{
  "operations": [
    {
      "create": {
        "imageAsset": {
          "fullSize": {
            "url": "https://gaagl.page.link/Eit5",
            "heightPixels": 1200,
            "widthPixels": 628
          },
          "mimeType": "IMAGE_PNG",
          "data": ""
        },
        "name": "marketing image"
      }
    }
  ]
}
  • Later you need to link that asset to a search campaign. Adding the image asset is optional and it's based on your requirement. 
{
  "operations": [
    {
      "create": {
        "campaign": "customers/customerId/campaigns/campaignId",
        "asset": "customers/customerId/assets/assetID",
        "status": "ENABLED",
        "fieldType": "AD_IMAGE"
      }
    }
  ]
}

2) How to use client library to make search campaigns. kindly tell the methods required to set up search campaigns, budget, bidding strategy and targeting options.

I would suggest you refer to this document to know how to get started with the Java client library. Also, you may check this sample Java code to create a search campaign for settings required for establishing a new campaign, including the budget, bidding strategy, campaign type, start & end dates, and more.

3) Can you provide a sample cURL for making search campaigns including all the possible fields.

Please find the below sample cURL request for your reference :
curl --request POST \
  'https://googleads.googleapis.com/v17/customers/5494898462/campaigns:mutate?key=[YOUR_API_KEY]' \
  --header 'developer-token: **********************' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"operations":[{"create":{"name":"Test_search_campaign","advertisingChannelType":"SEARCH","campaignBudget":"customers/5494898462/campaignBudgets/13949138531","maximizeConversions":{"targetCpaMicros":17249760000},"status":"ENABLED","startDate":"2024-09-26","endDate":"2024-12-26","targetingSetting":{"targetRestrictions":[{"bidOnly":true,"targetingDimension":"AUDIENCE"}]}}}],"partialFailure":true}' \
  --compressed

4) Please list down all the required and optional fields for the search campaigns so, that we have an idea to modify the campaign according to one's needs.

The required fields for the search campaigns are the budget, bidding strategy, campaign type, start & end dates, target setting. You may check this campaign document to know more fields. 

I hope this helps! Let us know if you have any further questions. 
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGaiu:ref" (ADR-00269634)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages