RE: Differences in getAccountChanges between AdWords API and Google Ads API

69 views
Skip to first unread message
Message has been deleted

Google Ads API Forum Advisor

unread,
Mar 28, 2022, 9:19:04 AM3/28/22
to estanisla...@gmail.com, adwor...@googlegroups.com

Hi Estanislao,

Thanks for reaching out to the Google Ads API Forum.

I have checked your account and found the changes reflected in the field ‘lastChangeDateTime’ is "2022-03-25 05:12:44.063399". That said, you may try below GAQL to get said record in Google Ads API:

SELECT change_status.campaign, change_status.last_change_date_time, change_status.resource_status, change_status.resource_type, change_status.ad_group, change_status.ad_group_ad, change_status.ad_group_bid_modifier, change_status.ad_group_criterion, change_status.ad_group_feed, change_status.campaign, change_status.campaign_criterion, change_status.campaign_feed, change_status.feed, change_status.feed_item FROM change_status WHERE change_status.last_change_date_time >= \'2022-03-23\' AND change_status.last_change_date_time <= \'2022-03-26\' AND change_status.campaign = \'customers/8945945860/campaigns/1669008391\' ORDER BY change_status.resource_type LIMIT 10000

Let me know if you still don’t see said change with above query.

Also, I had to delete your post as posting complete log information on the forum is not recommended. You may refer to the more redacted below:

“Hello,

I'm trying to replicate the behaviour to getAccountChanges from AdWords API in Google Ads API but it seems there're some differences. For example, I'm getting changes in AdWords for an Ad and not getting any changes in GoogleAds. This change is later retrieved if you repeat the same request the following day. Is this delay in getting changes expected? I'll paste both requests here (without the clientCustomerId):

AdWords API request:

***********

SOAP response:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

    <soap:Header>

        <ns2:ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809" xmlns:ns2="https://adwords.google.com/api/adwords/ch/v201809">

            <requestId>0005db0d0b513dbe0803819470023da6</requestId>

            <serviceName>CustomerSyncService</serviceName>

            <methodName>get</methodName>

            <operations>1</operations>

            <responseTime>147</responseTime>

        </ns2:ResponseHeader>

    </soap:Header>

    <soap:Body>

        <ns2:getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201809" xmlns:ns2="https://adwords.google.com/api/adwords/ch/v201809">

            <ns2:rval>

                <ns2:changedCampaigns>

                    <ns2:campaignId>1669008391</ns2:campaignId>

                    <ns2:campaignChangeStatus>FIELDS_UNCHANGED</ns2:campaignChangeStatus>

                    <ns2:changedAdGroups>

                        <ns2:adGroupId>66118514298</ns2:adGroupId>

                        <ns2:adGroupChangeStatus>FIELDS_UNCHANGED</ns2:adGroupChangeStatus>

                        <ns2:changedAds>323051597968</ns2:changedAds>

                    </ns2:changedAdGroups>

                </ns2:changedCampaigns>

                <ns2:lastChangeTimestamp>20220325 081316 PST8PDT</ns2:lastChangeTimestamp>

            </ns2:rval>

        </ns2:getResponse>

    </soap:Body>

</soap:Envelope>

 

Google Ads API request:

Request

-------

MethodName: google.ads.googleads.v10.services.GoogleAdsService/Search

query: "SELECT change_status.campaign, change_status.last_change_date_time, change_status.resource_status, change_status.resource_type, change_status.ad_group, change_status.ad_group_ad, change_status.ad_group_bid_modifier, change_status.ad_group_criterion, change_status.ad_group_feed, change_status.campaign, change_status.campaign_criterion, change_status.campaign_feed, change_status.feed, change_status.feed_item FROM change_status WHERE change_status.last_change_date_time >= \'2022-03-23\' AND change_status.last_change_date_time <= \'2022-03-25\' AND change_status.campaign = \'customers/XXXXX/campaigns/1669008391\' ORDER BY change_status.resource_type LIMIT 10000"

Response

--------

Headers: Metadata(content-disposition=attachment,content-type=application/grpc,request-id=ZP_bm6wqUHzDyP65DiI8Qw,date=Fri, 25 Mar 2022 17:07:39 GMT,alt-svc=h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43")

Body: field_mask {

  paths: "change_status.campaign"

  paths: "change_status.last_change_date_time"

  paths: "change_status.resource_status"

  paths: "change_status.resource_type"

  paths: "change_status.ad_group"

  paths: "change_status.ad_group_ad"

  paths: "change_status.ad_group_bid_modifier"

  paths: "change_status.ad_group_criterion"

  paths: "change_status.ad_group_feed"

  paths: "change_status.campaign"

  paths: "change_status.campaign_criterion"

  paths: "change_status.campaign_feed"

  paths: "change_status.feed"

  paths: "change_status.feed_item"

}

 

Failure message: null

Status: Status{code=OK, description=null, cause=null}.

Thanks in advance,

Estanislao Ledesma

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2YrVtp:ref

Estanislao Ledesma

unread,
Mar 28, 2022, 12:11:22 PM3/28/22
to Google Ads API and AdWords API Forum
Hello Yasar,
Thanks for your answer, yes I was able to get it correctly changing the end date. Nevertheless, my question is: I get the change with AdWords API but not in Google Ads API if I put the same dates (for Google Ads I need to change the end date), is this an expected behaviour?
Thanks in advance.
Regards,
Estanislao Ledesma

Google Ads API Forum Advisor

unread,
Mar 29, 2022, 9:31:27 AM3/29/22
to estanisla...@gmail.com, adwor...@googlegroups.com
Hi Estanislao,

Thank you for the replies. I work with Yasar and allow me to provide support here.

With regard to your concern, the change_status service provides the last_change_date_time field to indicate when the most recent change to any given resource occurred. Thus the freshness of locally cached data can be compared with this field's value to help determine whether local data is out of date and its working as expected. For more information please check this document.

Best regards,
Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2YrVtp:ref

Estanislao Ledesma

unread,
Mar 29, 2022, 10:19:59 AM3/29/22
to Google Ads API and AdWords API Forum
Hi Jinky,
Yes I already understood that. What I'm asking is why I'm getting a change with the AdWords API and not with the Google Ads API using the same date lapse. Has the API changed its behaviour? Are changes delayed in the new API? 
Thanks again.

Regards,
Estanislao

Google Ads API Forum Advisor

unread,
Mar 30, 2022, 6:50:44 AM3/30/22
to estanisla...@gmail.com, adwor...@googlegroups.com

Hi Estanislao,

In the Google Ads API, the field last_change_date_time is used for the time at which the most recent change has occurred on given resource. However, allow me to raise your request to my team. We will reach out to you once we have updates.

Regards,

Google Logo
Yasar
Google Ads API Team
 

 



ref:_00D1U1174p._5004Q2YrVtp:ref

Google Ads API Forum Advisor

unread,
Jun 1, 2022, 9:51:25 AM6/1/22
to estanisla...@gmail.com, adwor...@googlegroups.com
Hi Estanislao,

Thank you for your patience.

Upon team checking, we can see that this is working as intended. Please note that when the user setups filter with change_status.last_change_date_time <= '2022-03-25' condition, they only could pull out change records that happen earlier than or equals '2022-03-25 00:00:00

Best regards,
Google Logo
Heidi
Google Ads API Team
 


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