Empty response from API getCampaignCriterionBidLandscape

100 views
Skip to first unread message

MOISES SAAVEDRA CACERES

unread,
Nov 5, 2020, 2:16:13 PM11/5/20
to AdWords API and Google Ads API Forum
Hi,

I am trying to receive bid landscape from a CampaignID and in each request I receive the following as output:

This is my output:
{
    'totalNumEntries': 0,
    'Page.Type': 'CriterionBidLandscapePage',
    'entries': []
}

This is my code: (I give it a CampaginID)
# Initialize appropriate service.
    data_service = client.GetService('DataService', version='v201809')

    #Se crea el intervalo de dias por analizar
    endDate = datetime.datetime.today()
    startDate = endDate - datetime.timedelta(days=28)

     Se entrega el selector que filtra segun lo solcitado
    selector = {
        'fields': ['CampaignId', 'CriterionId', 'StartDate', 'EndDate',
                    'BidModifier', 'LocalClicks', 'LocalCost', 'LocalImpressions',
                    'TotalLocalClicks', 'TotalLocalCost', 'TotalLocalImpressions',
                    'RequiredBudget'],
        'paging': {
            'startIndex': 0,
            'numberResults': PAGE_SIZE
        },
        'predicates': 
        [
            {'field': 'CampaignId', 'operator': 'IN', 'values': [campaign_id]},
            {'field': 'StartDate', 'operator': 'IN', 'values': [startDate.strftime('%Y%m%d')]},
            {'field': 'EndDate', 'operator': 'IN', 'values': [endDate.strftime('%Y%m%d')]},
        ]
    }


    # Valor inicial de busqueda (si son muchos datos se analizan mas paginas)
    offset = 0
    more_pages = True

    # Comienza la busqueda y retorna segun lo solicitado
    while more_pages is True:
        num_landscape_points = 0
        page = data_service.getCampaignCriterionBidLandscape(selector)
    ....


I need help pls!

Google Ads API Forum Advisor Prod

unread,
Nov 8, 2020, 10:14:38 PM11/8/20
to adwor...@googlegroups.com
Hi Moises,

Thanks for posting your concern.

To investigate, could you instead provide the customer ID and the complete SOAP request and response logs generated on your end with empty result? If you haven't enabled yet the SOAP logging for Python client library, you may follow this guide in order to do so.

You can provide it via Reply privately to author option.

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


ref:_00D1U1174p._5004Q277Uai:ref
Message has been deleted

Google Ads API Forum Advisor Prod

unread,
Nov 10, 2020, 10:09:36 PM11/10/20
to adwor...@googlegroups.com
Hi Moises,

Thanks for providing the requested details.

I would like to inform you first that I will delete your latest reply on this forum post and paste the SOAP logs here and hide some of the IDs for privacy purposes.

Moving forward, I can see that you've used CampaignId as filter of your API request. However, I can see that the values you are comparing to this field is string ('CAMPAIGN_ID') not the actual campaigns IDs. With this, you may try to set the campaign IDs in your API request and re-upload it.

Let me know how it goes after.

"[2020-11-10 13:16:51,524 - googleads.common - WARNING] Your default encoding, cp1252, is not UTF-8. Please run this script with UTF-8 encoding to avoid errors.
[2020-11-10 13:16:51,863 - googleads.soap - INFO] Request made: Service: "DataService" Method: "getCampaignCriterionBidLandscape" URL: "https://adwords.google.com/api/adwords/cm/v201809/DataService"
[2020-11-10 13:16:51,864 - googleads.soap - DEBUG] Outgoing request: {'SOAPAction': '""', 'Content-Type': 'text/xml; charset=utf-8', 'authorization': 'REDACTED'}
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
  <soap-env:Header>
    <ns0:RequestHeader xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201809">
      <ns0:clientCustomerId>XXXXXXXXXX</ns0:clientCustomerId>
      <ns0:developerToken>REDACTED</ns0:developerToken>
      <ns0:userAgent>unknown (AwApi-Python, googleads/25.0.0, Python/3.8.5, zeep)</ns0:userAgent>
      <ns0:validateOnly>false</ns0:validateOnly>
      <ns0:partialFailure>false</ns0:partialFailure>
    </ns0:RequestHeader>
  </soap-env:Header>
  <soap-env:Body>
    <ns0:getCampaignCriterionBidLandscape xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201809">
      <ns0:serviceSelector>
        <ns0:fields>CampaignId</ns0:fields>
        <ns0:fields>CriterionId</ns0:fields>
        <ns0:fields>StartDate</ns0:fields>
        <ns0:fields>EndDate</ns0:fields>
        <ns0:fields>BidModifier</ns0:fields>
        <ns0:fields>LocalClicks</ns0:fields>
        <ns0:fields>LocalCost</ns0:fields>
        <ns0:fields>LocalImpressions</ns0:fields>
        <ns0:fields>TotalLocalClicks</ns0:fields>
        <ns0:fields>TotalLocalCost</ns0:fields>
        <ns0:fields>TotalLocalImpressions</ns0:fields>
        <ns0:fields>RequiredBudget</ns0:fields>
        <ns0:predicates>
          <ns0:field>CampaignId</ns0:field>
          <ns0:operator>IN</ns0:operator>
          <ns0:values>CAMPAIGN_ID</ns0:values>
        </ns0:predicates>
        <ns0:paging>
          <ns0:startIndex>0</ns0:startIndex>
          <ns0:numberResults>100</ns0:numberResults>
        </ns0:paging>
      </ns0:serviceSelector>
    </ns0:getCampaignCriterionBidLandscape>
  </soap-env:Body>
</soap-env:Envelope>

[2020-11-10 13:16:53,466 - googleads.soap - DEBUG] Incoming response:
b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">\n  <soap:Header>\n    <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809">\n      <requestId>XXXXXXXXXXXXXXXXXXXXXX</requestId>\n      <serviceName>DataService</serviceName>\n      <methodName>getCampaignCriterionBidLandscape</methodName>\n      <operations>1</operations>\n      <responseTime>432</responseTime>\n    </ResponseHeader>\n  </soap:Header>\n  <soap:Body>\n    <getCampaignCriterionBidLandscapeResponse xmlns="https://adwords.google.com/api/adwords/cm/v201809">\n      <rval>\n        <totalNumEntries>0</totalNumEntries>\n        <Page.Type>CriterionBidLandscapePage</Page.Type>\n      </rval>\n    </getCampaignCriterionBidLandscapeResponse>\n  </soap:Body>\n</soap:Envelope>\n'

{
    'totalNumEntries': 0,
    'Page.Type': 'CriterionBidLandscapePage',
    'entries': []
}
"
Message has been deleted

Google Ads API Forum Advisor Prod

unread,
Nov 12, 2020, 1:35:18 PM11/12/20
to adwor...@googlegroups.com
Hi Moises,

The account ID you are using is a manager account. You will need to make this request with a child account ID. Please let us know if you still face issues.

Regards,
Anthony
Google Ads API Team

Google Logo
Anthony
Google Ads API Team
 


ref:_00D1U1174p._5004Q277Uai:ref
Message has been deleted

Google Ads API Forum Advisor Prod

unread,
Nov 12, 2020, 9:27:55 PM11/12/20
to adwor...@googlegroups.com
Hi Moises,

I'm going to remove your 2 previous response as it contains customer IDs.

To further investigate, please provide the latest and complete SOAP request and response logs for the 2 client accounts that you've mentioned and wherein we can also see the campaign ID.

Please provide the requested details via Reply privately to author option. If this option is disabled, then you can send it to this email address googleadsa...@google.com.

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


ref:_00D1U1174p._5004Q277Uai:ref
Message has been deleted

Google Ads API Forum Advisor Prod

unread,
Nov 16, 2020, 2:16:50 AM11/16/20
to adwor...@googlegroups.com
Hi Moises,

Thank you for sending the logs. However, our team would once again delete your response and repost it below as it contained your account IDs. You may avoid exposing account information publicly to ensure security.

"client_customer_id: XXXXXXXXX


2020-11-13 11:53:12,638 - googleads.soap - INFO] Request made: Service: "DataService" Method: "getCampaignCriterionBidLandscape" URL: "https://adwords.google.com/api/adwords/cm/v201809/DataService"
[2020-11-13 11:53:12,639 - googleads.soap - DEBUG] Outgoing request: {'SOAPAction': '""', 'Content-Type': 'text/xml; charset=utf-8', 'authorization': 'REDACTED'}

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
  <soap-env:Header>
    <ns0:RequestHeader xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201809">
      <ns0:clientCustomerId>XXXXXXXXX</ns0:clientCustomerId>

      <ns0:developerToken>REDACTED</ns0:developerToken>
      <ns0:userAgent>unknown (AwApi-Python, googleads/25.0.0, Python/3.8.5, zeep)</ns0:userAgent>
      <ns0:validateOnly>false</ns0:validateOnly>
      <ns0:partialFailure>false</ns0:partialFailure>
    </ns0:RequestHeader>
  </soap-env:Header>
  <soap-env:Body>
    <ns0:getCampaignCriterionBidLandscape xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201809">
      <ns0:serviceSelector>
        <ns0:fields>CampaignId</ns0:fields>
        <ns0:predicates>
          <ns0:field>CampaignId</ns0:field>
          <ns0:operator>IN</ns0:operator>
          <ns0:values>XXXXXXXXX</ns0:values>

        </ns0:predicates>
        <ns0:paging>
          <ns0:startIndex>0</ns0:startIndex>
          <ns0:numberResults>100</ns0:numberResults>
        </ns0:paging>
      </ns0:serviceSelector>
    </ns0:getCampaignCriterionBidLandscape>
  </soap-env:Body>
</soap-env:Envelope>

[2020-11-13 11:53:13,934 - googleads.soap - DEBUG] Incoming response: 
b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">\n  <soap:Header>\n    <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809">\n      <requestId>XXXXXXXXX</requestId>\n      <serviceName>DataService</serviceName>\n      <methodName>getCampaignCriterionBidLandscape</methodName>\n      <operations>1</operations>\n      <responseTime>85</responseTime>\n    </ResponseHeader>\n  </soap:Header>\n  <soap:Body>\n    <getCampaignCriterionBidLandscapeResponse xmlns="https://adwords.google.com/api/adwords/cm/v201809">\n      <rval>\n        <totalNumEntries>0</totalNumEntries>\n        <Page.Type>CriterionBidLandscapePage</Page.Type>\n      </rval>\n    </getCampaignCriterionBidLandscapeResponse>\n  </soap:Body>\n</soap:Envelope>\n'

{
    'totalNumEntries': 0,
    'Page.Type': 'CriterionBidLandscapePage',
    'entries': []
}



client_customer_id: XXXXXXXXX

[2020-11-13 11:54:19,097 - googleads.soap - INFO] Request made: Service: "DataService" Method: "getCampaignCriterionBidLandscape" URL: "https://adwords.google.com/api/adwords/cm/v201809/DataService"

[2020-11-13 11:54:19,098 - googleads.soap - DEBUG] Outgoing request: {'SOAPAction': '""', 'Content-Type': 'text/xml; charset=utf-8', 'authorization': 'REDACTED'}

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
  <soap-env:Header>
    <ns0:RequestHeader xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201809">
      <ns0:clientCustomerId>XXXXXXXXX</ns0:clientCustomerId>

      <ns0:developerToken>REDACTED</ns0:developerToken>
      <ns0:userAgent>unknown (AwApi-Python, googleads/25.0.0, Python/3.8.5, zeep)</ns0:userAgent>
      <ns0:validateOnly>false</ns0:validateOnly>
      <ns0:partialFailure>false</ns0:partialFailure>
    </ns0:RequestHeader>
  </soap-env:Header>
  <soap-env:Body>
    <ns0:getCampaignCriterionBidLandscape xmlns:ns0="https://adwords.google.com/api/adwords/cm/v201809">
      <ns0:serviceSelector>
        <ns0:fields>CampaignId</ns0:fields>
        <ns0:predicates>
          <ns0:field>CampaignId</ns0:field>
          <ns0:operator>IN</ns0:operator>
          <ns0:values>XXXXXXXXX</ns0:values>

        </ns0:predicates>
        <ns0:paging>
          <ns0:startIndex>0</ns0:startIndex>
          <ns0:numberResults>100</ns0:numberResults>
        </ns0:paging>
      </ns0:serviceSelector>
    </ns0:getCampaignCriterionBidLandscape>
  </soap-env:Body>
</soap-env:Envelope>

[2020-11-13 11:54:20,496 - googleads.soap - DEBUG] Incoming response: 
b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">\n  <soap:Header>\n    <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809">\n      <requestId>XXXXXXXXX</requestId>\n      <serviceName>DataService</serviceName>\n      <methodName>getCampaignCriterionBidLandscape</methodName>\n      <operations>1</operations>\n      <responseTime>241</responseTime>\n    </ResponseHeader>\n  </soap:Header>\n  <soap:Body>\n    <getCampaignCriterionBidLandscapeResponse xmlns="https://adwords.google.com/api/adwords/cm/v201809">\n      <rval>\n        <totalNumEntries>0</totalNumEntries>\n        <Page.Type>CriterionBidLandscapePage</Page.Type>\n      </rval>\n    </getCampaignCriterionBidLandscapeResponse>\n  </soap:Body>\n</soap:Envelope>\n'

{
    'totalNumEntries': 0,
    'Page.Type': 'CriterionBidLandscapePage',
    'entries': []
}


i'll be waiting your help!"

That said, allow me to reach out to the rest of our team so we can investigate. We'll reach back to you once we have our findings.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q277Uai:ref

MOISES SAAVEDRA CACERES

unread,
Nov 16, 2020, 10:32:36 AM11/16/20
to adsapifor...@gmail.com, adwor...@googlegroups.com
Thanks you! I'll be waiting your good news!

Best regards,

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/Vs-dv0GKYKk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/k5bYa000000000000000000000000000000000000000000000QJVO7500tLY0dp9zRGCKY10nNHiX-Q%40sfdc.net.


--


Moisés Saavedra Cáceres
Estudiante Ingeniería Civil
Mayor Investigación Operativa Minor Tecnologías de Información
Pontificia Universidad Católica de Chile
(+56) 966323790  ||  mmsaa...@ing.puc.cl

Reply all
Reply to author
Forward
0 new messages