Generate Forecast Metrics returns Quite different response than AdWords API

558 views
Skip to first unread message

Aqeel Ashraf

unread,
Feb 8, 2022, 9:31:04 AM2/8/22
to Google Ads API and AdWords API Forum
Hi,

We were using AdWords API's Estimate Keyword Traffic from last few years. Now while upgrading to Google Ads API, I am using Generate Forecast Metrics. I found too much result difference in both the APIs. Could you please confirm if it is normal or do I need to send any specific value that will return the same result for both the APIs. Thanks 

Google Ads API Forum Advisor

unread,
Feb 8, 2022, 9:19:17 PM2/8/22
to aqeel...@gmail.com, adwor...@googlegroups.com
Hi Aqeel,

Thank you for reaching out to our API support team.

This should be expected since the Google Ads API's planning services should now mirror more what is available in the UI's Keyword Planner feature.

We recommend that you instead compare the Google Ads API and Keyword Planner and write back to us in the event that you observe discrepancies, even after applying similar filters or parameters.

For this scenario, you may provide our team with your complete request and response logs, with the request-id, and also the complete Keyword Planner screenshot with the filters and results. 

You may then send these information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W5LON:ref

Aqeel Ashraf

unread,
Feb 9, 2022, 11:14:33 AM2/9/22
to Google Ads API and AdWords API Forum
In Old AdWords API, CPC values are far different then in New Google Ads API. I am using GenerateForecastMetrics example and update values as stated below:

Keywords:
garde meuble paris
location stockage paris
location garde meuble paris

Location: France
Language: French
Match Type: Exact

Result:
                                                                            AdWords API                             Google Ads API              
KEYWORDS                                                   CPC  -  CLICKS                               CPC  -   CLICKS
garde meuble paris                                      50.08 -    283.5                               3.56 -   204.64
location stockage paris                               43.21 -      39.6                               3.84 -     30.12
location garde meuble paris                       52.77 -      29.1                               3.80 -     23.2

Please have a look on the above difference and let me know if anything I did wrong. Thanks

Google Ads API Forum Advisor

unread,
Feb 10, 2022, 4:16:03 AM2/10/22
to aqeel...@gmail.com, adwor...@googlegroups.com
Hi Aqeel,

Thank you for raising your concern.

To further investigate the issue, could you provide the following details?
I would also suggest comparing the results of the 2 APIs in the UI and see which APIs returned closer value. Please provide the screenshot of the UI as well.

You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W5LON:ref

Aqeel Ashraf

unread,
Feb 15, 2022, 10:04:20 AM2/15/22
to Google Ads API and AdWords API Forum
Hi,

I sent the reply using Reply to Author button but didn't received any response. I am sending again here. Please have a look on the log files and let me know what I need to update. Thanks

adsapi_php.log
google_ads_api.log

Google Ads API Forum Advisor

unread,
Feb 16, 2022, 12:42:37 AM2/16/22
to aqeel...@gmail.com, adwor...@googlegroups.com
Hi Aqeel,

I work along with Ernie and Aryeh. 

As per checking with the attached file, it appears that you've provided a different log. As mentioned by my colleague, Aryeh, in the Ads API, the request and response appears similar to the JSON Mappings in our REST documentation with additional information such as  request ID . Our client libraries have loggers with logging instructions, to see these instructions you can click on the client library you use in the sidebar of our client library guide and click on "Logging”.

In the AdWords API , a request looks like the 3rd section in request and a response looks similar to response. Logging instructions are in the read.me on Github of each client library.

On the other hand, could you kindly share as well a screenshot of your Google Ads UI showing the data discrepancy on your API response?

Regards,
Google Logo
Teejay Wennie
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W5LON:ref
Message has been deleted

Google Ads API Forum Advisor

unread,
Apr 7, 2022, 2:33:45 AM4/7/22
to aqeel...@gmail.com, adwor...@googlegroups.com
Hi Aqeel,

Thank you for providing more details to your concern.

I would like to inform you that I deleted your latest post as it contains generated logs.

Moving forward, I can see that the Google Ads API request is not properly mapped with the AdWords API request. I can see that you've set the network in the Google Ads API but not in the AdWords API. With this, please ensure on your end that the parameters you've set to both APIs should be the same, specifically the network.

As for your concern in the UI, I am afraid that this is outside of our scope already and would not be able to provide support here. With this, I would suggest reaching out to the product team via this link to know the equivalent UI of the said API request.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W5LON:ref

Aqeel Ashraf

unread,
Apr 13, 2022, 9:04:18 AM4/13/22
to Google Ads API and AdWords API Forum
Hi Ernie,

Thanks for the message. For adwards api, I used EstimateKeywordTraffic.php, available in examples and get the results. For Ads API, again I used the examples AddKeywordPlan.php and after creating the plan, then GenerateForecastMetrics.php to get the results.

As you mentioned about network, Google Ads API example uses GOOGLE_SEARCH as network, I tried to set UNKNOWN OR UNSPECIFIED but that didn't work. So the keep using the  GOOGLE_SEARCH, but in Adwords API, how can I set the network? because I didn't find any possibility in EstimateKeywordTraffic.php.

Could you please help me in migration from Adwords API's  EstimateKeywordTraffic.php to Goole Ads API, that returns similar results. If you want, I will send the files as well. Thanks

Google Ads API Forum Advisor

unread,
Apr 14, 2022, 2:47:37 PM4/14/22
to aqeel...@gmail.com, adwor...@googlegroups.com
Hi Aqeel, 

You may try in Ads API to set the KeywordPlanNetwork field to GOOGLE_SEARCH_AND_PARTNERS, or use the network settings in AdWords API and then multiply the results from AdWords API by the amount of days in one quarter of a year to match your next quarter setting as close as possible. For PHP samples you may reach out to the issue tracker of each library.

Regards,

Google Logo
Aryeh
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W5LON:ref

Aqeel Ashraf

unread,
Apr 29, 2022, 9:32:50 AM4/29/22
to Google Ads API and AdWords API Forum
Hi Aryeh,

Thanks for your help and support and I manage to make it work. Now I found one more issue. I create a KeywordPlanCampaign with one location, it worked fine. I need to create a KeywordPlanCampaign with multiple locations, how can I send multiple locations. Below you can see the code to set one location:

$keywordPlanCampaign->setGeoTargets([
                new KeywordPlanGeoTarget([
                    'geo_target_constant' => ResourceNames::forGeoTargetConstant(2250)
                ])
            ]);

Looking for quick help. Thanks

Google Ads API Forum Advisor

unread,
May 3, 2022, 5:47:46 AM5/3/22
to aqeel...@gmail.com, adwor...@googlegroups.com
Hi Aqeel,

Thank you for your reply.

The geo_targets should indeed accept a list with a max number allowed of 20.

However, if you are looking for a code implementation solution, and since it appears that you are using PHP, you can reach out to the PHP client library owners via this link, for further insight.

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W5LON:ref

Harshitha Moka

unread,
Jul 18, 2022, 6:06:36 PM7/18/22
to Google Ads API and AdWords API Forum
Hello Aqeel,

I'm on the same boat with the same problem of seeing discrepancies. I was wondering if you could share what you did to fix it, or what attributes did you add/remove from keyword plan or campaign keyword plan or adgroup keywod plan to get similar results?

Google Ads API Forum Advisor

unread,
Jul 18, 2022, 10:48:37 PM7/18/22
to harshit...@frequence.com, adwor...@googlegroups.com
Hi Harshitha,

I am Sherwin from Google Ads API. I hope that you are doing well today.

Moving forward to your concern, it is not advisable to compare Adwords API results to Google Ads API result because the Adwords API was already deprecated last April 27, 2022. Add to that, the Google Ads API is an improved version of Adwords API where all the results are match the UI. With that being said, it is best to compare the Google Ads API to the Google Ads UI instead.

If you have other concerns, feel free to reply in this thread.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W5LON:ref

Harshitha Moka

unread,
Jul 19, 2022, 6:41:59 PM7/19/22
to Google Ads API and AdWords API Forum
Hello,

We cloned the python github code to get forecast metrics for two keywords - furniture and home depot with 3$ max cpc and with region as santa clara county and language as english.
We saw huge discrepancies between the numbers we saw on google's keyword planner UI and when we ran the cloned code. We are using the same set of credentials and account details on both the keyword planner UI and also through code.

I've attached the screenshot of the keyword planner UI here and the total number of clicks is around 30k and cost is 19k.


These are the numbers I got when I ran the cloned forecast metrics code. This has the details of keyword plan resource name and other details - 

ip-192-168-0-13:google-ads-python harshithamoka$ python3 examples/planning/add_keyword_plan.py -c 1073673852

Created keyword plan with resource name: customers/1073673852/keywordPlans/452624110

Created keyword plan campaign with resource name: customers/1073673852/keywordPlanCampaigns/437668450

Created keyword plan ad group with resource name: customers/1073673852/keywordPlanAdGroups/446891077

Created keyword plan ad group keyword with resource name: customers/1073673852/keywordPlanAdGroupKeywords/947371640582

Created keyword plan ad group keyword with resource name: customers/1073673852/keywordPlanAdGroupKeywords/947371640585

ip-192-168-0-13:google-ads-python harshithamoka$ python3 examples/planning/generate_forecast_metrics.py -c 1073673852 -k 452624110

#1 Keyword ID: customers/1073673852/keywordPlanKeywords/947371640582

Estimated cost: 6687.222133

Estimated clicks: 3994.97

Estimated impressions: 56734.87

Estimated average cpc: 1673912.00


#2 Keyword ID: customers/1073673852/keywordPlanKeywords/947371640585

Estimated cost: 21743.151442

Estimated clicks: 62805.77

Estimated impressions: 136190.19

Estimated average cpc: 346197.00



And the total clicks is around 67k and total budget is around 28k for both the keywords. I've also attached the git diff patch file that I generated which shows the list of changes I've made before fetching the metrics. 

It would be great if we could get on a call to see the difference in numbers and understand what exactly is the google keyword planner UI doing behind the scenes. 


google-ads-ui-discrepancy.png

Google Ads API Forum Advisor

unread,
Jul 20, 2022, 2:14:59 AM7/20/22
to harshit...@frequence.com, adwor...@googlegroups.com
Hi Harshitha,

Thank you for getting back to us. Sad to say this but the Google Ads API support team is only available via email.

Moving forward to your concern, please note that there are differences when working with a keyword plan using the Google Ads API versus the UI. We also give some recommendations on how to avoid mismatches in historical metrics when mixing usage. For API behaviorKeywordPlan exposes only a forecast_period setting at the plan level. While the UI behavior exposes these settings at the plan level and doesn't expose the underlying KeywordPlanCampaign and KeywordPlanAdGroup objects. You may also check the the Consequence document to avoid misinterpreting the results.

If you have further concerns, please let us know.
Reply all
Reply to author
Forward
0 new messages