> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search GAQL Resources

> Optional discovery helper for Google Ads GAQL metadata

Optional discovery helper for Google Ads GAQL metadata. Use this when building a custom GAQL query and you are unsure which FROM resource, metric, segment, attribute, or field compatibility is valid. Do not call this for simple GAQL queries you can write confidently. This returns metadata for query building, not account performance data.

|                      |                              |
| -------------------- | ---------------------------- |
| **App**              | Google Ads                   |
| **Operation ID**     | `gads_search_gaql_resources` |
| **Type**             | Action                       |
| **Connection**       | `gads` (required)            |
| **Credits per run**  | Free                         |
| **Agent / MCP tool** | Yes                          |

## Inputs

| Field                     | Type                                                       | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------- | ---------------------------------------------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search`                  | string                                                     | No       | -       | Search Google Ads GAQL resources, fields, metrics, or segments by name. Search values must be GAQL-style field fragments, usually lowercase snake\_case with dots for prefixes. Do not use spaces: use 'impression\_share' or 'metrics.search\_impression\_share' instead of 'impression share'; Use without resource to discover metadata rows: \{'search':'conversion','category':'METRIC'} finds conversion-related metrics; \{'search':'impression\_share','category':'METRIC'} finds impression-share metrics; \{'search':'campaign','category':'RESOURCE'} finds campaign resources. Use with resource to check compatibility against a GAQL FROM resource: \{'resource':'campaign','search':'segments.device'} checks whether the device segment is compatible with FROM campaign. For a broad compatibility lookup, leave search empty and set resource only. |
| `category`                | enum (`ALL`, `RESOURCE`, `ATTRIBUTE`, `SEGMENT`, `METRIC`) | No       | `ALL`   | Filter by GoogleAdsField category. Use RESOURCE to find valid FROM resources, METRIC to find metrics such as metrics.cost\_micros, SEGMENT to find segments such as segments.date, ATTRIBUTE to find selectable attributes, and ALL when inspecting a specific resource.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `resource`                | string                                                     | No       | -       | Optional GAQL FROM resource to inspect, such as campaign, ad\_group, customer, or ad\_group\_ad. When provided, returns compatible metrics, segments, and attribute resources for that FROM resource. Examples: \{'resource':'campaign'} returns the full campaign compatibility list.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `include_selectable_with` | boolean                                                    | No       | `False` | Include the selectable\_with compatibility list. This can be large, so leave it false unless you specifically need field-level compatibility details for a returned metric, segment, or attribute.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `limit`                   | integer                                                    | No       | `50`    | Maximum number of metadata rows to return for broad searches. Resource-only and resource-plus-search checks usually return one row.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

## Output

**Type**: `List[Dict]`

Returns GAQL resource and field metadata for building valid Google Ads queries.

**Fields**: dynamic (depend on the inputs)
