Get search keywords and cost from Google ads API

163 views
Skip to first unread message

Timothy Nguyen

unread,
Jul 29, 2025, 5:15:22 AMJul 29
to Google Ads API and AdWords API Forum
Is it possible to get search keywords and cost from Google ads API, our tech said it cant fetch both with single API

Ảnh màn hình 2025-07-29 lúc 16.10.09.png

Google Ads API Forum Advisor

unread,
Jul 29, 2025, 8:47:10 AMJul 29
to adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Yes, you can get the search keywords and cost using the keyword_view report. I would suggest you try the below sample GAQL query : 
SELECT ad_group_criterion.keyword.text,
  campaign.name,
  ad_group.name,
  ad_group_criterion.system_serving_status,
  ad_group_criterion.keyword.match_type,
  ad_group_criterion.approval_status,
  ad_group_criterion.final_urls,
  metrics.clicks,
  metrics.impressions,
  metrics.ctr,
  metrics.average_cpc,
  metrics.cost_micros
FROM keyword_view
WHERE segments.date DURING LAST_7_DAYS  
You can check this Query Cookbook to replicate the Google Ads UI screens via the Google Ads API.  

Additionally, you can utilize the Query Builder and Query Validator to build and validate your queries. To retrieve Google Ads API entities and reporting data, you can use one of these methods like GoogleAdsService.SearchStream or GoogleAdsService.Search.

I hope this helps! Let us know if you have any further questions. 

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-07-29 12:46:03Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01sx4fM:ref" (ADR-00320980)



Timothy Nguyen

unread,
Jul 30, 2025, 6:44:33 AMJul 30
to Google Ads API and AdWords API Forum
thank you for replying, but to be sure, i can get search keywords and cost fields together with a single API key is that correct?

Google Ads API Forum Advisor

unread,
Jul 30, 2025, 8:34:30 AMJul 30
to adwor...@googlegroups.com

Hi,

Yes, from the query we provided earlier, you can get the search keywords and cost fields together with a single API call.

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-07-30 12:33:24Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01sx4fM:ref" (ADR-00320980)



Timothy Nguyen

unread,
Aug 1, 2025, 12:17:30 AMAug 1
to Google Ads API and AdWords API Forum
thank you so much
Reply all
Reply to author
Forward
0 new messages