Why would the API return the average CPV multiplied by 1 million?

230 views
Skip to first unread message

Nelson Brochado

unread,
Jan 13, 2023, 11:21:53 AM1/13/23
to Google Ads API and AdWords API Forum
Hello.

I was trying to fetch all metrics that can be fetched with paid_organic_search_term_view. I also fetch the attribute paid_organic_search_term_view.search_term and segment by search type segments.search_engine_results_page_type. So, I am also trying to fetch the metric metrics.average_cpc, which seems to be multiplied by 1 million (1000000) with respect to the number I see in the UI report. So, for example, 2.19 in the UI is returned as 2.19 * 1000000 = 2190000. 

Could this be a bug in the API or maybe I am unaware of some discrepancy between the API and UI with respect to currency columns, like average CPC? 

I read this post, but, if the API is supposed to mirror the UI, that doesn't seem to be the case here.

Cheers

Nelson Brochado

unread,
Jan 13, 2023, 11:48:15 AM1/13/23
to Google Ads API and AdWords API Forum
After having read a little bit more about how Google Ads handles currencies, I came to the conclusion that the average CPC must be returned in "micros units", so what I observed is expected. Can you confirm this? 

However, if the API is really supposed to mirror the UI, then there should at least be an option to return this data as we see it in the UI. After all, we just need to divide by 1 million. Apparently, there used to be such an option a long time ago, but it was removed. See this post.

As a follow-up question, are all currency metrics returned in "micro units"? Is there an official documentation page that talks about this specifically?

This API docs page or this, for example, mentions that certain amounts are specified in micros, but I'd like to know if all currency metrics are specified in micros.


Google Ads API Forum Advisor

unread,
Jan 16, 2023, 3:27:54 AM1/16/23
to nelson....@webrepublic.ch, adwor...@googlegroups.com
Hi Nelson,

Thank you for reaching out to us.

To answer your questions in general, I could confirm that the cost pulled in the API is in micros. That being said, it is working as intended that the API will pull it as 2190000 then divide by 100000 to become UI's value which is the 2.19.


As a follow-up question, are all currency metrics returned in "micro units"?
  • Yes.
Is there an official documentation page that talks about this specifically?
  • I'm afraid that there is no official documentation page that talks about this specifically. However, I could confirm that your approach is correct here and that you need to divide by 1 million in order to match the value seen in the UI.
Let me know if you have further questions.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


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