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

# Table Search

> Server-side search filtering for all Google Ads data table endpoints

<Note>
  This page is also available in [Ukrainian](/guides/table-search-uk).
</Note>

## Overview

All Google Ads data table endpoints now support an optional `search` query
parameter. When provided, the API filters results server-side using
**case-insensitive substring matching** across designated text fields for each
table.

This is designed for the search bar in each data table on the frontend.

***

## How to use

Add `?search=<term>` to any data table GET endpoint:

```
GET /api/v1/google-ads/{customer_id}/campaigns?search=brand
GET /api/v1/google-ads/{customer_id}/ad-groups?search=shoes
GET /api/v1/google-ads/{customer_id}/keywords?search=buy+shoes
```

The same parameter works on CSV export endpoints:

```
GET /api/v1/google-ads/{customer_id}/campaigns/csv?search=brand
```

### Parameter rules

| Property   | Value                 |
| ---------- | --------------------- |
| Name       | `search`              |
| Type       | `string` (optional)   |
| Min length | 1                     |
| Max length | 200                   |
| Default    | `None` (no filtering) |

Omitting `search` (or sending an empty value) returns the full dataset — fully
backward compatible.

***

## Search behavior

* **Case-insensitive**: `"brand"` matches `"Brand Campaign"`, `"BRAND"`, etc.
* **Substring match**: `"shoe"` matches `"buy shoes online"`
* **OR logic across fields**: a row matches if **any** of its searchable fields
  contains the search term
* **Post-fetch filtering**: search is applied after data is fetched from Google
  Ads, so it works on all fields including resolved names and RSA headlines

***

## Searchable fields per table

| Endpoint                  | Searchable fields                                                                |
| ------------------------- | -------------------------------------------------------------------------------- |
| `/campaigns`              | `name`                                                                           |
| `/ad-groups`              | `name`, `campaign_name`                                                          |
| `/ads`                    | headline texts, description texts, `final_url`, `campaign_name`, `ad_group_name` |
| `/keywords`               | `text`, campaign name, ad group name                                             |
| `/search-terms`           | `search_term`, `matched_keyword`, `campaign_name`, `ad_group_name`               |
| `/ad-schedule`            | `campaign_name`, `day_of_week`                                                   |
| `/locations`              | `campaign_name`, `location_name`                                                 |
| `/user-locations`         | `campaign_name`, `most_specific_location`, `city`, `region`                      |
| `/geographic-performance` | `location_name`, `campaign_name`                                                 |

***

## Examples

### Filter campaigns by name

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.cattix.com/api/v1/google-ads/1234567890/campaigns?search=brand" \
    -H "Authorization: Bearer $TOKEN"
  ```

  ```python Python theme={null}
  import httpx

  resp = httpx.get(
      "https://api.cattix.com/api/v1/google-ads/1234567890/campaigns",
      params={"search": "brand", "start_date": "2025-01-01", "end_date": "2025-01-31"},
      headers={"Authorization": f"Bearer {token}"},
  )
  ```
</CodeGroup>

### Search ads by headline text

```
GET /api/v1/google-ads/1234567890/ads?search=free+shipping
```

Returns only ads where any headline or description contains "free shipping".

### Search keywords across campaign and ad group

```
GET /api/v1/google-ads/1234567890/keywords?search=shoes
```

Returns keywords where the keyword text, campaign name, **or** ad group name
contains "shoes".
