Audience segments via API - Campaign report

394 views
Skip to first unread message

Raquel Correia

unread,
Nov 28, 2023, 5:59:24 AM11/28/23
to Google Ads API and AdWords API Forum
Hi,

I am currently working on retrieving a campaign report via API using Python and have encountered a challenge with specific columns.

I am successfully retrieving the following columns with the current query:

Currency code
Month
Campaign
Cost
However, I am facing difficulties in including the columns "Audience segment type" and "Audience segment" in the query. Here is the current query for your reference:

"SELECT customer.currency_code, campaign.name, metrics.cost_micros, segments.month
 FROM campaign 
WHERE segments.date >= '2023-01-01'' and segments.date <='2023-11-01' and metrics.cost_micros > 0"

Could you please guide me on how to modify the query to include these two additional columns?

Thank you in advance for your support.

Best regards,
Raquel Correia

Google Ads API Forum Advisor

unread,
Nov 28, 2023, 9:49:11 AM11/28/23
to raquel....@bizaygroup.com, adwor...@googlegroups.com
Hi,

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

By reviewing your query, I understand that you are trying to include "Audience segment type" and "Audience segment" in the  campaign report. I would recommend you to refer to this documentation to know more about the supported
 Fields/Segments/Metrics that can be used with the campaign resource. 

Could you confirm if you are able to include "Audience segment type" and "Audience segment" in the campaign report in the Google Ads account(UI)?

If yes, provide us with the uncropped screenshot of the Google Ads account(UI) with visible customer-id to assist you further.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02qVK3f:ref"

Thanks,
 
Google Logo Google Ads API Team


Google Ads API Forum Advisor

unread,
Nov 28, 2023, 10:42:11 AM11/28/23
to raquel....@bizaygroup.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

I understand that you want to retrieve the 'Audience segment type' from the Google Ads API. Kindly note that 'Audience segment type' is not yet supported in the API. I will raise a request to add this feature to be available in the Google Ads API. We cannot provide a scheduled timeline for the availability of this feature in the Google Ads API. I would recommend you follow our Release Notes and Blog Post for future updates.

Raquel Correia

unread,
Nov 28, 2023, 11:04:26 AM11/28/23
to Google Ads API Forum Advisor, adwor...@googlegroups.com

Hi,

 

I have successfully incorporated “Audience segment type" and "Audience segment" in this report in the Google Ads account(UI), please see screenshot. I want to reproduce this report via API.

 

Thank you in advance for your support.

 

Best regards,

 

Raquel Correia

BI-Marketing | Business Intelligence Analyst

 

raquel.correia@bizaygroup.com
www.bizay.co.uk

 

              

Assinatura Email Promoting-1

Uma imagem com objeto

Descrição gerada automaticamente

Assinatura Email Promoting-1

 

 

 

 

From: Google Ads API Forum Advisor <ads...@forumsupport.google>
Sent: Tuesday, November 28, 2023 2:49 PM
To: Raquel Correia <raquel....@bizaygroup.com>
Cc: adwor...@googlegroups.com
Subject: RE: audience segments via api - campaign report

 

ATENÇÃO: Este e-mail tem origem externa à bizaygroup. Não clique em links ou abra ficheiros anexos que sejam duvidosos, a menos que reconheça o remetente e tenha certeza de que o conteúdo é seguro!

Raquel Correia

unread,
Nov 29, 2023, 4:51:56 AM11/29/23
to Google Ads API Forum Advisor, adwor...@googlegroups.com

Hi,

 

But is possible to retrieve the 'Audience segment’ in the campaign report?

 

Thank you in advance for your support.

Best regards,

Raquel Correia

 

From: Google Ads API Forum Advisor <ads...@forumsupport.google>
Sent: Tuesday, November 28, 2023 3:42 PM
To: Raquel Correia <raquel....@bizaygroup.com>
Cc: adwor...@googlegroups.com
Subject: RE: audience segments via api - campaign report

 

ATENÇÃO: Este e-mail tem origem externa à bizaygroup. Não clique em links ou abra ficheiros anexos que sejam duvidosos, a menos que reconheça o remetente e tenha certeza de que o conteúdo é seguro!

 

Hi,

Google Ads API Forum Advisor

unread,
Nov 29, 2023, 11:03:57 AM11/29/23
to raquel....@bizaygroup.com, adwor...@googlegroups.com
Hi Raquel,


Thank you for getting back to us. 

Regarding your concern, the following fields display the audience segments and their types as visible in the provided UI: I would recommend you refer to the ad_group_audience_view resource to retrieve the audience segments and their types from the Google Ads API. 

Please find the sample GAQL query:
SELECT ad_group_audience_view.resource_name, campaign.name, campaign.status, ad_group_criterion.type, ad_group_criterion.display_name, ad_group_criterion.criterion_id, user_list.name, user_list.id FROM ad_group_audience_view
Additionally, you can utilize the Google Ads Query Builder and Query Validator to build and validate the queries for retrieving the data from the Google Ads API. 

Raquel Correia

unread,
Dec 4, 2023, 5:32:38 AM12/4/23
to Google Ads API Forum Advisor, adwor...@googlegroups.com

Hi,

 

I want to reproduce this report:

 

In your previous email you answered that “I understand that you want to retrieve the 'Audience segment type' from the Google Ads API. Kindly note that 'Audience segment type' is not yet supported in the API.”, you only mentioned 'Audience segment type'. My question is: is it possible to retrieve “Audience segment” and reproduce this report without 'Audience segment type'?

 

Thank you in advance for your support.

Best regards,

 

Raquel Correia

BI-Marketing | Business Intelligence Analyst

 

raquel.correia@bizaygroup.com
www.bizay.co.uk

 

              

Assinatura Email Promoting-1

Uma imagem com objeto

Descrição gerada automaticamente

Assinatura Email Promoting-1

 

 

 

 

 

 

From: Google Ads API Forum Advisor <ads...@forumsupport.google>
Sent: Wednesday, November 29, 2023 4:04 PM
To: Raquel Correia <raquel....@bizaygroup.com>
Cc: adwor...@googlegroups.com
Subject: RE: audience segments via api - campaign report

 

ATENÇÃO: Este e-mail tem origem externa à bizaygroup. Não clique em links ou abra ficheiros anexos que sejam duvidosos, a menos que reconheça o remetente e tenha certeza de que o conteúdo é seguro!

 

Hi Raquel,

Google Ads API Forum Advisor

unread,
Dec 5, 2023, 4:32:51 AM12/5/23
to raquel....@bizaygroup.com, adwor...@googlegroups.com
Hi,


Thank you for getting back to us.

In order to get the 'audience segment' use this ad_group_audience_view resource to build the query for the provided report. Additionally use Query Validator to validate the queries from the Google Ads API. I would recommend you to refer to this documentation to know more about the Fields/Segments/Metrics that can be used with the  ad_group_audience_view resource. Hope it helps. 
Reply all
Reply to author
Forward
0 new messages