Difference between the Records When 'SEARCH_QUERY_PERFORMANCE_REPORT' in Adwords API to Google Ads API

72 views
Skip to first unread message

Toprak Ucar

unread,
Mar 10, 2022, 11:16:11 AM3/10/22
to Google Ads API and AdWords API Forum
Dear Sir or Madame,

When I try to migrate 'SEARCH_QUERY_PERFORMANCE_REPORT' in Adwords API to Google Ads API, I face some inconsistincies. I tried for 2 queries and there are more records in the report by Google Ads API.

Query in Adwords API:

report_query = {
    'reportName': 'campaign_report',
    'dateRangeType': 'CUSTOM_DATE',
    'reportType': 'SEARCH_QUERY_PERFORMANCE_REPORT',
    'downloadFormat': 'CSV',
    'selector': {
        'fields': ['KeywordTextMatchingQuery', 'CampaignId', 'Query', 'QueryMatchTypeWithVariant'],
        'dateRange': {'min': start_date_string, 'max': end_date_string}
    }
}

report_query['selector']['predicates'] = {'field': 'CampaignId',
                                          'operator': 'IN',
                                          'values': campaign_list}

report_downloader.DownloadReport(report_query,
                                    output,
                                    client_customer_id=client_customer_id_input,
                                    skip_report_header=True,
                                    skip_column_header=False,
                                    skip_report_summary=True,
                                    include_zero_impressions=False)
output.seek(0)
report = pd.read_csv(output)

Query in Google Ads API:

client = GoogleAdsClient.load_from_dict(credentials, version='v10')

ga_service = client.get_service("GoogleAdsService")

query = f"""
    SELECT segments.keyword.info.text,
    campaign.id,
    search_term_view.search_term,
    segments.search_term_match_type
    FROM search_term_view
    WHERE campaign.id in {tuple(entity_ids)}
    AND segments.date between start_date and end_date """

search_request = client.get_type("SearchGoogleAdsStreamRequest")
search_request.customer_id = customer_id
search_request.query = query

stream = ga_service.search_stream(search_request)

I also tried to filter by (end_date - 1) but there is still a difference.

Can you please help me to remove this difference? 

Cheers

Google Ads API Forum Advisor

unread,
Mar 10, 2022, 10:56:15 PM3/10/22
to top...@armis.tech, adwor...@googlegroups.com
Hi,

Thank you for reaching out to our API support team.

Our team would like to take a closer look at the results of the reports you generated. To do so, could you also provide the complete request and response logs, with the request-id, generated when you called the search_term_view report? You may also send the login-customer-id used in your request.

If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.

You may then send the requested 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
Google Ads API Team
 


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