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

# LeadMagic: Google Ads Search

> Search for Google Ads run by a company to understand their advertising strategy. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Search for Google Ads run by a company to understand their advertising strategy.

> [!NOTE]
>
> Tool ID: `leadmagic_google_ads_search`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'leadmagic_google_ads_search',
  {
    "company_domain": "example.com",
    "company_name": "Example Corp",
    "limit": 100
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run leadmagic_google_ads_search --input '{
  "company_domain": "example.com",
  "company_name": "Example Corp",
  "limit": 100
}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "message": "Example message",
    "ads_count": 123,
    "ads": [
      {
        "advertiser_id": "advertiser_123",
        "creative_id": "creative_123",
        "original_url": "https://example.com"
      }
    ]
  }
}
```

Use `deepline describe leadmagic_google_ads_search --json` for the latest machine-readable contract.

## Input reference

Search for Google Ads run by a company to understand their advertising strategy.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.company_domain` | `string` | No | — | Company domain name |
| `payload.company_name` | `string` | No | — | Company name |
| `payload.limit` | `integer` | No | — | Maximum number of ads to return. Because you are charged 1 credit per ad returned, this also caps the credits spent on the request. Omit to return every ad found. Minimum: 1. Maximum: 100. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Search for Google Ads run by a company to understand their advertising strategy.",
    "properties": {
      "company_domain": {
        "type": "string",
        "description": "Company domain name"
      },
      "company_name": {
        "type": "string",
        "description": "Company name"
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of ads to return. Because you are charged 1 credit per ad returned, this also caps the credits spent on the request. Omit to return every ad found.",
        "minimum": 1,
        "maximum": 100
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.message` | `string` | No | — | — |
| `result.data.ads_count` | `integer` | No | — | — |
| `result.data.ads` | `array` | No | — | — |
| `result.data.ads[].advertiser_id` | `string` | No | — | — |
| `result.data.ads[].creative_id` | `string` | No | — | — |
| `result.data.ads[].original_url` | `string` | No | — | — |
| `result.data.ads[].variants` | `array` | No | — | — |
| `result.data.ads[].variants[].content` | `string` | No | — | — |
| `result.data.ads[].variants[].height` | `integer \| null` | No | — | — |
| `result.data.ads[].variants[].width` | `integer \| null` | No | — | — |
| `result.data.ads[].start` | `string` | No | — | — |
| `result.data.ads[].last_seen` | `string` | No | — | — |
| `result.data.ads[].advertiser_name` | `string` | No | — | — |
| `result.data.ads[].format` | `string` | No | — | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "message": {
            "type": "string"
          },
          "ads_count": {
            "type": "integer"
          },
          "ads": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "advertiser_id": {
                  "type": "string"
                },
                "creative_id": {
                  "type": "string"
                },
                "original_url": {
                  "type": "string"
                },
                "variants": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "content": {
                        "type": "string"
                      },
                      "height": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "width": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "start": {
                  "type": "string"
                },
                "last_seen": {
                  "type": "string"
                },
                "advertiser_name": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `per_result` (per result).
* Estimated Deepline credits: `0.34` per pricing unit.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.