Strange behavior when get SITELINK from API

62 views
Skip to first unread message

Eduardo Cesar

unread,
May 30, 2018, 10:08:24 AM5/30/18
to AdWords API and Google Ads API Forum
We're getting the Campaign Sitelink Settings using 'CampaignExtensionSettingService'. The returned list of extensions is exactly the expected for almost all accounts in our mcc.
However, for some accounts, we are not receiving any SITELINK extension setting in returned list (In this same accounts, the returned CALL, CALLOUT, SNIPPET extensions returned are consistent comparing the AdWords state).
For this accounts, we have sitelink settings in campaign level, with impression, clicks and etc. Is there some bug in this endpoint that can explain it?

We're using the last version of API (201802).



Bharani Cherukuri (AdWords API Team)

unread,
May 30, 2018, 3:13:54 PM5/30/18
to AdWords API and Google Ads API Forum
Hello Eduardo, 

Could you share the complete SOAP request and response logs along with the client customer Id for the accounts where you're noticing the discrepancy? This information will help us troubleshoot the issue on our end. You can reply back via Reply privately to author option. 

Regards,
Bharani, AdWords API Team

Bharani Cherukuri (AdWords API Team)

unread,
Jun 11, 2018, 5:29:18 PM6/11/18
to AdWords API and Google Ads API Forum
Hello Cesar

Thank you for sharing the details privately. It looks like there are more than 500 feed extensions in your account. Can you try increasing the index range and retry the API request? If you continue to have an issue with this, can you try the API request for a specific campaign by filtering for the ExtensionType as Sitelink? Please find the sample request below:

Selector selector = new SelectorBuilder() 
.fields(CampaignExtensionSettingField.CampaignId, 
CampaignExtensionSettingField.ExtensionType, 
CampaignExtensionSettingField.Extensions) 
.equals(CampaignExtensionSettingField.CampaignId, Long.toString(campaignId)) 
.equals(CampaignExtensionSettingField.ExtensionType, FeedType.SITELINK.getValue()) 
.build();

Can you give this a try and let me know how it goes?

Eduardo Cesar

unread,
Jun 12, 2018, 10:12:37 AM6/12/18
to AdWords API and Google Ads API Forum
Tank you!

I tried both solutions, but i didn't get any result yet. I'm using pagination, but I'm checking if there is more pages when I call the API. This is my wrapper for get service API:

def get_from_adwords_account(adwords_client, service_name, fields,
                             predicates=None):
    adwords_service = adwords_client.GetService(service_name,
                                                version=settings.API_VERSION)
    items = []
    offset = 0
    PAGE_SIZE = settings.PAGE_SIZE
    selector = {
        'fields': fields,
        'paging': {
            'startIndex': str(offset),
            'numberResults': str(PAGE_SIZE)
        }
    }
    if predicates:
        selector['predicates'] = predicates
    more_pages = True
    while more_pages:
        page = adwords_service.get(selector)
        if 'entries' in page:
            for entry in page['entries']:
                items.append(entry)
        offset += PAGE_SIZE
        selector['paging']['startIndex'] = str(offset)
        more_pages = offset < int(page['totalNumEntries'])
    return items

However, I changed my PAGE_SIZE to 10000 to check if there is some problem in the pagination logic. I had the same result (with filter: The result is empty; without filter: The result does not contain any SITELINK).
Is there something that I can do to get the sitelink for this account? It is very strange, because this same code and logic works in others accounts in our MCC.

Best Regards.
Eduardo Cesar
  

Bharani Cherukuri (AdWords API Team)

unread,
Jun 12, 2018, 2:25:24 PM6/12/18
to AdWords API and Google Ads API Forum
Hello Cesar, 

I have shared this information with the team. Meanwhile, you will be able to use the Placeholder report or Placeholder Feed Item report to get these extensions through the reports. I will keep you posted if I have any new updates to share. 

Thanks,
Bharani, AdWords API Team

Eduardo Cesar

unread,
Jun 12, 2018, 4:43:11 PM6/12/18
to AdWords API and Google Ads API Forum
Hello Bharani,

I will wait for the team answer. If the report became the unique way to this task, we will rewrite the code and tests for this alternative method. 
How much time, we should wait for an answer about this strange condition?

Regards,
Eduardo Cesar 

Bharani Cherukuri (AdWords API Team)

unread,
Jun 12, 2018, 5:23:12 PM6/12/18
to AdWords API and Google Ads API Forum
Hello Cesar, 

Currently, we do not have an ETA of when this will be resolved. I will keep you posted, if I have any new updates from the team. 

Thanks,
Bharani, AdWords API Team

Bharani Cherukuri (AdWords API Team)

unread,
Aug 9, 2018, 9:07:41 AM8/9/18
to AdWords API and Google Ads API Forum
Hi Cesar, 

Our team was able to take a look at the issue. It looks the issue could be specific to the Python client library. Can you try posting your concern on the Python Github Issue tracker so that the library owners will be able to take a look?
Reply all
Reply to author
Forward
0 new messages