How to get campaign id's under a campaign group id?

8 views
Skip to first unread message

Monty808

unread,
Mar 2, 2021, 4:39:01 AM3/2/21
to AdWords API and Google Ads API Forum
Hi Google,

I can list all of my campaign groups using python api.  How do get, given a campaign group id, call campaign id's under the campaign group?  What service?  is there a sample?

offset = 0

        selector = {

            'fields': ['Id', 'Name'],

            'paging': {

                'startIndex': str(offset),

                'numberResults': str(self.PAGE_SIZE)

            }

        }

        

        page = self.campaign_group_service.get(selector)

Google Ads API Forum Advisor Prod

unread,
Mar 2, 2021, 10:33:54 PM3/2/21
to davidmo...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for raising your concern.

Could you confirm if you are using AdWords API? If yes, then you may try to use the CampaignService.get() and try to filter the campaignGroupId by specific campaign group ID to get campaigns under it. You may use this sample code and apply that filter that I've mentioned earlier.

If you have follow up questions, let us know so that we can provide further support. However, if you have questions about the implementation of your code, then I would suggest reaching out to the author of the Python client library via this link as they are more equipped to provide support.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2DKIzX:ref
Reply all
Reply to author
Forward
0 new messages