Get all products in a PMax campaign

18 views
Skip to first unread message

shahids...@gmail.com

unread,
Apr 27, 2023, 9:09:04 AM4/27/23
to Google Ads API and AdWords API Forum
I use the following code to get all products in an ad account : 

$query = 'SELECT ad_group_criterion.resource_name, '
                . ' ad_group_criterion.listing_group.case_value.product_item_id.value, '
                . ' ad_group_criterion.status, ad_group.id, campaign.id '
                . ' FROM ad_group_criterion WHERE ad_group_criterion.type = "LISTING_GROUP"';

This does not return products that are within a PMax campaign. How can I get all the products in a PMax campaign?

Google Ads API Forum Advisor

unread,
Apr 27, 2023, 11:43:48 AM4/27/23
to shahids...@gmail.com, adwor...@googlegroups.com

Hi, 

Thanks for reaching out to the Google Ads API Team. I hope you are doing well today.

With regards to your concern about sample queries that do not return products that are within a PMax campaign. For our team to further compare, investigate, and validate why you are encountering issues, can you provide more information?
 

  • Provide the complete (request and response with request-id) logs with request ID generated as shown in the respective links.
  • Complete screenshots (without cropping) from the Google Ads UI, the data that you are retrieving.


We do this to check if there’s an error thrown on your side and provide accurate recommendations. 

If you haven't enabled logging yet, it can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link. For REST interface requests, you can enable logging via the curl command by using the -i flag. This will cause the tool to include the HTTP response headers in the output.

Reference links:


Have a great day.

Regards,

Google Logo Google Ads API Team


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