Gaql
Execute a GAQL (Google Ads Query Language) query
AI Agents CLInpm · v0.2.0·Node.js 18+
Query and manage 45 marketing platforms from the terminal. Built for Claude Code, Codex, OpenClaw and any agent that can run a shell command.
$ npm install -g insightfulpipeRuns wherever your agent runs
$ insightfulpipe auth
You need Node.js 18 or later and an InsightfulPipe workspace with at least one connected account. Four steps, about two minutes.
Install insightfulpipe globally from npm. It adds the insightfulpipe command to your PATH.
# Node.js 18 or later$ npm install -g insightfulpipeIn the InsightfulPipe app, open Settings > API Keys and create a key. Keys start with ip_sk_ and belong to one workspace.
Workspace API keys
Keys belong to this workspace only.
ip_sk_live_9f3a••••••••••••4c1eCopyip_sk_live_72bd••••••••••••a0f73 days agoShown once. Paste it into insightfulpipe auth in the next step.
Run insightfulpipe auth and paste the key. It is stored in your operating system keyring, or in ~/.insightfulpipe/config.json if you pass --insecure-storage.
$ insightfulpipe auth? Paste your API key (ip_sk_...): ********✓ Saved to keyringRun insightfulpipe doctor to check the token, API URL and connectivity, then insightfulpipe whoami to see your workspaces.
$ insightfulpipe doctor✓ token · api url · connectivity$ insightfulpipe whoami[email protected] · 2 workspacesPull the last 30 days of Google Ads campaigns. Every read follows the same pattern: a platform slug plus a JSON body, JSON back. Use action instead of query for writes such as creating or pausing a campaign.
$ insightfulpipe query google-ads -b '{ "action": "get_campaigns", "workspace_id": 123, "brand_id": 456, "account_id": "1234567890", "date_range": "LAST_30_DAYS" }'{ "status": "success", "data": [ { "campaign": "Brand - Shoes", "clicks": 1840, "cost": 7580.80 }, { "campaign": "Search - Sale", "clicks": 3120, "cost": 7425.60 } ] }$ insightfulpipe action --help
The CLI gets no extra permissions. Every call goes through the same checks as the MCP servers, configured per connected account in the InsightfulPipe app. Flip a switch below and watch the terminal follow.
In the app · try the switches
Action controls
account 1234567890 · workspace 123
Connection
Read-only connections can enable read actions only.
Actions exposed to agents
3 of 12 enabled
gaqlRun a GAQL reportonpause_adPause an adonremove_keyworddestructiveDelete a keywordoff9 more actions not shown
In the terminal · what the agent gets
# Reads work on any connection$ insightfulpipe query google-ads -b '{"action":"gaql", …}'{ "status": "success", "data": [ … ], "meta": { … } }# A write asks before it runs$ insightfulpipe action google-ads -f pause-ad.json? Execute write action "pause_ad" on "google-ads"? [y/N] y✓ pause_ad applied · ad 987654 is now PAUSED# Agents and scripts confirm with --yes$ insightfulpipe action google-ads -f remove-keyword.json --yes✗ remove_keyword is disabled for account 1234567890 (exit 1)Use query for reports and listings. Use action for creates, updates and deletes; it asks for confirmation unless you pass --yes.
Owners, admins and operators choose which actions each connected account exposes to agents. Disabled actions are hidden from helper and blocked if called.
Accounts connect as Read-only or Read & Write. On a Read-only connection, only read actions can be enabled.
Actions flagged as destructive, such as deletes, stay off until an owner, admin or operator turns them on for the account.
Restricted team members can only use the accounts they are granted, and only the read actions enabled on them.
Each API key belongs to a single workspace, so an agent using it cannot reach accounts in another workspace.
1929 actions available across all 45 connected platforms.
Select a platform to view its actions
87 actions available·google-ads
Execute a GAQL (Google Ads Query Language) query
Generate keyword ideas from seed keywords or URL using Keyword Planner
Customer account information and settings
Ad group bidding strategy information
Ad group label associations
Ad group performance data and configuration
Ad group ad label associations
Ad creative performance data and policy information
Audience targeting and demographic performance data
Target a user list (remarketing audience) with an ad group
Add a phone call asset to the account (shows phone number with ads)
Add callout text snippets to a campaign (e.g., 'Free Shipping', '24/7 Support')
Add age and/or gender demographic targeting to an ad group
Add a webpage-targeting criterion to a DSA ad group (incl. page-feed label targeting)
Add keywords to an ad group
Create a new label for organizing campaigns, ad groups, and ads
Add a lead form to a campaign (users submit info directly from the ad)
Add geographic location targeting to a campaign (countries, cities, postal codes, regions)
$ insightfulpipe --help
Twelve commands cover setup, discovery and execution. Pick one to see its usage, options and an example.
Setup
Discover
Run
Defaults
$ insightfulpipe auth --help
Usage
insightfulpipe auth [--insecure-storage]
Prompts for an API key and stores it in your OS keyring. When INSIGHTFULPIPE_TOKEN is set, the CLI uses it instead and you can skip this step.
Options
Example
$ insightfulpipe auth? Paste your API key (ip_sk_...): ********✓ Saved to keyringJoin hundreds of agencies and brands using InsightfulPipe to connect marketing data to AI.
Start a free trial today.