micros to dollar

755 views
Skip to first unread message

Oleg Disrupt

unread,
Oct 21, 2021, 10:45:48 PM10/21/21
to AdWords API and Google Ads API Forum
Hello
I got the
high_top_of_page_bid_micros using
getKeywordIdeaMetrics
api function.
It shows big number like 860000.
I can see it as $value as shown in google keywordplan.
How can I get this value?
Thanks

Google Ads API Forum Advisor

unread,
Oct 22, 2021, 12:55:38 PM10/22/21
to ol...@disrupt.social, adwor...@googlegroups.com
Hi Oleg,

Thanks for reaching out. I assume you are referring to either low_top_of_page_bid_micros or high_top_of_page_bid_micros fields in the KeywordPlanHistoricalMetrics. These fields can only return values in terms of micros, not account currency. Micros are defined as the account currency multiplied by 1,000,000. 

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2QEIU5:ref

Oleg Disrupt

unread,
Oct 22, 2021, 6:07:45 PM10/22/21
to AdWords API and Google Ads API Forum
Hi Matt,
Thank you for your help.
I have one thing to ask you.
when i call 
generateKeywordIdeas method
in this KeywordPlanIdeaServiceGrpcClient, it requires
geoTargetConstants (locations array).
I got the all locations from geotarget.csv and created the array.
It required max 10 value in array but I can see 60 locations id(Parent ID) so I created 6 vars in array. like this
private const LOC_IDS = array(
        array(21132,21133,21135,21136,21137,21138,21139,21140,21141),
        array(21142,21143,21144,21145,21146,21147,21148,21149,21150),
        array(21151,21152,21153,21154,21155,21156,21157,21158,21159),
        array(21160,21161,21162,21163,21164,21165,21166,21167,21168),
        array(21169,21170,21171,21172,21173,21174,21175,21176,21177),
        array(21178,21179,21180,21182,21183,21184)
    );
I run
generateKeywordIdeas
 function with above location ids, it shows a little different with google keywordideas.
for example when I enter the keyword("rare books"), google shows (avg month search: 6,600High bid $0.41)
but my app shows
avg month search :7390
, high bid: $6.24(micro value is 6248351)
I got the result after tried to sum each it's value from 6 times searching.
foreach ($response->iterateAllElements() as $result) {
                    $avg = (is_null($result->getKeywordIdeaMetrics()) ? 0 : $result->getKeywordIdeaMetrics()->getAvgMonthlySearches());
                    $bid = (is_null($result->getKeywordIdeaMetrics()) ? 0 : $result->getKeywordIdeaMetrics()->getHighTopOfPageBidMicros());
                    $comp = (is_null($result->getKeywordIdeaMetrics()) ? 0 : $result->getKeywordIdeaMetrics()->getCompetition());
       
                    if ($comp > 3 && $bid > 0) {
                        for ($j=0; $j<$cnt; $j++) {
                            if ($res[$j]["keyword"] == $result->getText()) {
                                $flag = true;
                                break;                  
                            }
                        }

                        if ($flag) {
                            $res[$j]["avgmonth"] += $avg;
                            $res[$j]["highbid"] += $bid;
                            $flag = false;
                        } else {
                            ...
                        }
                    }
                }
what is my issue?
Thanks

Oleg Disrupt

unread,
Oct 22, 2021, 9:36:23 PM10/22/21
to AdWords API and Google Ads API Forum
In google ads keywordplanner I tried to search with my keywords and customer id, language us(1000), location : united state
But as I mentioned above it was different result between my app and google keywordplans

Oleg Disrupt

unread,
Oct 24, 2021, 10:48:24 PM10/24/21
to AdWords API and Google Ads API Forum
I fixed it

Google Ads API Forum Advisor

unread,
Oct 25, 2021, 10:33:19 AM10/25/21
to ol...@disrupt.social, adwor...@googlegroups.com
Hi Oleg,

Glad to hear you found a solution. Please let us know if we can help with anything else. 
Message has been deleted

Google Ads API Forum Advisor

unread,
Dec 18, 2022, 10:29:02 PM12/18/22
to chai...@freshcodes.in, adwor...@googlegroups.com
Hi Chaitali,

Thank you for reaching out to our team.

Please note that we removed your message in the forum because it contains logs and screenshots which is prohibited for security reasons.

Moving forward to your concern, I understand you are encountering data discrepancies between UI and API. With this, in order for us to investigate the error, would you be able to provide the following data?
  • Screenshot of the UI where you downloaded the report and compared it to the API.
  • Complete request and response logs with request ID and request header generated on your end. 
  • Sample comparison of the screenshot of the UI and the API where we can see the discrepancies.
 
While gathering the data that we are requesting, I would like to specify first the following when comparing the value of the UI and API:
  • Comparing the API and UI on the same level as possible.
  • The segments and fields of the API and UI should be the same.
  • The date range is also the same.
 
The report of the API and UI should be generated at the same time. The reason for this is that both API and UI follow the data freshness whose statistics might be updated or adjusted. With this, if generated at different times, then one of them is updated and one is not so data discrepancies might occur.

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

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


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