Hi team,

We are using campaign_search_term_insight
<https://developers.google.com/google-ads/api/fields/v18/campaign_search_term_insight>
report
to pull Performance Max campaign search term insights. We observed that the
API call time has doubled from January 2025. Here are some details on what
and how we are. making API calls:

   -

   Number of performance max campaigns: ~50
   -

   Number of search categories pulled per campaign: 3000
   -

   Number of API calls: ~50*3000 = 1,50,000
   -

   Number of parallel threads - 10
   -

   Average API call time taken to pull Search term insights per each search
   category: ~3.5 seconds
   -

   Total time: 1,50,000 * 3.5 = 5,25,000 seconds / 60*60 = ~145.8333 hours
   / 10 = ~14.5 hours

Hence, our tool takes ~15 hours every day to pull the data we intended to.
I would like to understand why the API call is taking so long and whether
there is a way to optimize the API call times. Here are the API calls that
we make:

Query to pull performance max campaigns for a given date range:

"SELECT \n" +                "  campaign.id, \n" +                "
campaign.name, \n" +                "
campaign.advertising_channel_type, \n" +                "
segments.date \n" +                "FROM campaign \n" +
"WHERE \n" +                "  metrics.impressions > 0 \n" +
     "  AND campaign.advertising_channel_type = 'PERFORMANCE_MAX' \n"
+                "  AND segments.date BETWEEN '" +
dateRange.getStartDate().toString() + "' AND '" +
dateRange.getEndDate().minusDays(1) + "' ";

Query to pull search categories for each performance max campaigns:

"SELECT \n" +                "  metrics.clicks, \n" +                "
 metrics.impressions, \n" +                "
campaign_search_term_insight.id \n" +                "FROM
campaign_search_term_insight \n" +                "WHERE \n" +
       "  campaign_search_term_insight.campaign_id = " + campaignId +
" \n" +                "  AND segments.date  = '" + date.toString() +
"' \n" +                "  AND metrics.impressions > 0 \n" +
     "ORDER BY \n" +                "  metrics.impressions DESC, \n" +
               "  metrics.clicks DESC \n" +                "LIMIT =
3000 ";

Query to pull search term insights for each search category:

"SELECT \n" +                "
campaign_search_term_insight.category_label, \n" +                "
metrics.clicks, \n" +                "  metrics.ctr, \n" +
   "  metrics.impressions, \n" +                "
segments.search_term, \n" +                "
segments.search_subcategory, \n" +                "  segments.date \n"
+                "FROM campaign_search_term_insight \n" +
  "WHERE \n" +                "  segments.date BETWEEN '" +
dateRange.getStartDate().toString() + "' AND '" +
dateRange.getEndDate().minusDays(1) + "' \n" +                "  AND
campaign_search_term_insight.id  = " + searchCategoryId + " \n" +
          "  AND campaign_search_term_insight.campaign_id = " +
campaignId + " ";

We are looking to understand why API calls are taking longer time and how
to reduce the API call time.


ThanksSiva Deepthi Badam

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/adwords-api/CAL4HPpEqB7YZShKt05TE7Decha3q%3D96QQainv3yyWWxoTTfS-A%40mail.gmail.com.
  • Hi... 'Shiva Deepthi Badam' via Google Ads API and AdWords API Forum
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to