What is the GAQL query to retrieve a campaign's or ad group's keywords?

25 views
Skip to first unread message

MS

unread,
Aug 27, 2025, 9:03:22 AM (9 days ago) Aug 27
to Google Ads API and AdWords API Forum
I know, keywords are an Assets feature. Yet, I'm struggling to compose a GAQL query that's retrieving a text campaign's or ad group's keywords and their keyword matching option.

Can someone please enlighten me and provide me with a sample GAQL query that's retrieving campaigns and their corresponding keywords and keyword matching options?

Your answer is appreciated.

Google Ads API Forum Advisor

unread,
Aug 28, 2025, 7:26:02 AM (8 days ago) Aug 28
to axe...@axeldahmen.de, adwor...@googlegroups.com

Hi,

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

Based on the provided information, I understand that you are trying to retrieve campaigns and their corresponding keywords and keyword matching options. You can retrieve the requested data using the keyword_view resource. Also, you can refer to this sample query to retrieve the same.

SELECT campaign.id, keyword_view.resource_name, campaign.keyword_match_type, ad_group_criterion.keyword.match_type, ad_group_criterion.keyword.text FROM keyword_view.

You can try making a request using the Search or SearchStream by passing the customer Id. Also, you can use Query Builder to create your query and Query Validator to validate your query.

I hope it helps!

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-08-28 11:25:13Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01u5HMJ:ref" (ADR-00331139)



MS

unread,
Aug 29, 2025, 10:38:20 AM (7 days ago) Aug 29
to Google Ads API and AdWords API Forum
Excellent answer! The provided GAQL query works like a charm. Thank you!
Reply all
Reply to author
Forward
0 new messages