how can i bindding a keyword to adGrou or campaign?

46 views
Skip to first unread message

chun liu

unread,
May 10, 2024, 1:58:14 AM5/10/24
to Google Ads API and AdWords API Forum
i have checked 
customers.keywordPlans
customers.keywordPlansCampaigns
customers.keywordPlansCampaignKeywords
customers.keywordPlanAdGroups
customers.keywordPlanAdGroupKeywords
all these no need any adGroups.resourceName or campaign.resourceName or any other for binding.

can you tell me how to create a keyword for campaign/adGroup?
as the follow picture:

微信截图_20240510135620.png

Google Ads API Forum Advisor

unread,
May 10, 2024, 12:19:37 PM5/10/24
to liux...@gmail.com, adwor...@googlegroups.com
Hi,

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

To create keywords for campaigns with a resource name, you may use this endpoint "Method: customers.campaignCriteria.mutate ". Also, to create keywords for ad group with resource name, you may use this end point "Method: customers.adGroupCriteria.mutate ".

Kindly refer to the below sample request for creating keywords using CampaignCriterionOperation:
{
  "operations": [
    {
      "create": {
        "keyword": {
          "matchType": {matchType},
          "text": {text}
        },
        "resourceName": "customers/{customerId}/campaignCriteria/{campaignId}~{criterionId}",
        "negative": true
      }
    }
  ]
}

Kindly refer to the below sample request for creating keywords using AdGroupCriterion:
 
"operations":[
     {
        "create":{
          "keyword":{
            "matchType":"{matchType}",
            "text":"{text}"
            },
    "adGroup":"customers/{customerId}/adGroups/{adGroupId}"

}}]}

I tried to create the keywords for the campaign and adgroup by my end. So, I would suggest you to try the above request from your end and let us know, how this goes on your end.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tIwOC:ref" (ADR-00234450)

Thanks,
 
Google Logo Google Ads API Team





 

Reply all
Reply to author
Forward
0 new messages