Search Google Ads
searchQueries Google Ads resources and metrics via GAQL, returning flattened rows for selected fields with filters, ordering, and limits.
Instructions
Fetches data from the Google Ads API using the search method.
Rows come back flattened: one object per row, keyed by the field names you selected.
Language grammar: https://developers.google.com/google-ads/api/docs/query/grammar All resources and descriptions: https://developers.google.com/google-ads/api/fields/latest/overview If the query fails, the error from the API is returned with its request id.
To find out which fields (including compatible metrics and segments) you can select, filter by, or sort by for a resource, you MUST use the get_resource_metadata tool. Do not guess the fields. Use the whole field name (e.g. 'campaign.id', not just 'id'). Wildcards and partial fields are not allowed.
All dates are YYYY-MM-DD and must include the dashes. Date ranges must be finite and include a start and an end date.
Status fields (campaign.status, ad_group.status, ad_group_criterion.status, ad_group_ad.status) hold the current status, not the status during the date range. When selecting metrics over a date range, do not filter on status (e.g. campaign.status = 'ENABLED' or campaign.status != 'REMOVED'): entities paused or removed during the range would drop out and totals would understate cost and conversions. To leave out removed entities with no activity, drop rows with zero impressions after the query instead. Filter on status only when asking what is live now.
Cost and bid fields ending in _micros are in millionths of the account currency.
At most 10000 rows are returned per call; "truncated": true means there were more. Use limit, a narrower date range or more conditions. Requests to resource change_event must specify a LIMIT of at most 10000.
For conversion upload issues, look in offline_conversion_upload_conversion_action_summary (https://developers.google.com/google-ads/api/docs/conversions/upload-summaries).
Resources that can be queried: accessible_bidding_strategy account_budget account_budget_proposal account_link ad ad_group ad_group_ad ad_group_ad_asset_combination_view ad_group_ad_asset_view ad_group_ad_label ad_group_asset ad_group_asset_set ad_group_audience_view ad_group_bid_modifier ad_group_criterion ad_group_criterion_customizer ad_group_criterion_label ad_group_criterion_simulation ad_group_customizer ad_group_label ad_group_simulation ad_parameter ad_schedule_view age_range_view ai_max_search_term_ad_combination_view android_privacy_shared_key_google_ad_group android_privacy_shared_key_google_campaign android_privacy_shared_key_google_network_type app_top_combination_view applied_incentive asset asset_field_type_view asset_group asset_group_asset asset_group_listing_group_filter asset_group_product_group_view asset_group_signal asset_group_top_combination_view asset_set asset_set_asset asset_set_type_view audience batch_job bidding_data_exclusion bidding_seasonality_adjustment bidding_strategy bidding_strategy_simulation billing_setup call_view campaign campaign_aggregate_asset_view campaign_asset campaign_asset_set campaign_audience_view campaign_bid_modifier campaign_budget campaign_conversion_goal campaign_criterion campaign_customizer campaign_draft campaign_goal_config campaign_group campaign_label campaign_search_term_insight campaign_search_term_view campaign_shared_set campaign_simulation carrier_constant cart_data_sales_view change_event change_status channel_aggregate_asset_view click_view combined_audience content_criterion_view conversion_action conversion_custom_variable conversion_goal_campaign_config conversion_value_rule conversion_value_rule_set currency_constant custom_audience custom_conversion_goal custom_interest customer customer_asset customer_asset_set customer_client customer_client_link customer_conversion_goal customer_customizer customer_label customer_manager_link customer_negative_criterion customer_search_term_insight customer_user_access customer_user_access_invitation customizer_attribute data_link detail_content_suitability_placement_view detail_placement_view detailed_demographic display_keyword_view distance_view domain_category dynamic_search_ads_search_term_view expanded_landing_page_view experiment experiment_arm final_url_expansion_asset_view gender_view geo_target_constant geographic_view goal group_content_suitability_placement_view group_placement_view hotel_group_view hotel_performance_view hotel_reconciliation income_range_view keyword_plan keyword_plan_ad_group keyword_plan_ad_group_keyword keyword_plan_campaign keyword_plan_campaign_keyword keyword_theme_constant keyword_view label landing_page_view language_constant lead_form_submission_data life_event local_services_employee local_services_lead local_services_lead_conversation local_services_verification_artifact location_interest_view location_view managed_placement_view matched_location_interest_view media_file mobile_app_category_constant mobile_device_constant multi_party_auth_review offline_conversion_upload_client_summary offline_conversion_upload_conversion_action_summary offline_user_data_job operating_system_version_constant paid_organic_search_term_view parental_status_view per_store_view performance_max_placement_view product_category_constant product_group_view product_link product_link_invitation qualifying_question recommendation recommendation_subscription remarketing_action search_term_view shared_criterion shared_set shopping_performance_view shopping_product smart_campaign_search_term_view smart_campaign_setting targeting_expansion_view third_party_app_analytics_link topic_constant topic_view travel_activity_group_view travel_activity_performance_view user_interest user_list user_list_customer_type user_location_view video video_enhancement webpage_view you_tube_video_upload
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"customer_id": "<customer_id>",
"fields": "<fields>",
"resource": "<resource>"
},
"name": "search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | The maximum number of rows to return. | |
| fields | Yes | The fields to fetch, e.g. ['campaign.name', 'metrics.clicks']. | |
| resource | Yes | The resource to return fields from, e.g. 'campaign'. | |
| orderings | No | How the data is ordered, e.g. 'metrics.clicks DESC'. | |
| conditions | No | Conditions to filter the data, combined using AND, e.g. "segments.date BETWEEN '2026-01-01' AND '2026-01-31'". | |
| customer_id | Yes | The customer id: digits only. If given as 123-456-7890, remove the hyphens and use 1234567890. | |
| login_customer_id | No | Optional manager customer ID to use as the login-customer-id header. |