pql
Query Google Ad Manager reporting tables using Publisher Query Language for ad-hoc data extraction not covered by standard reports.
Instructions
Execute PQL (Publisher Query Language) queries against GAM reporting tables.
MODE: read-only AUTH: OAuth 2.0 required CREDITS: 0 (free) OUTPUT: Returns a ResultSet with column definitions and rows. Each row is an array of values matching the column order. WHEN TO USE: Use pql for ad-hoc data extraction not covered by the reporting tool's structured reports. LIMITATIONS: Not all PQL tables are available on all networks (some require beta features). The Language and Device_Category tables have known limitations. For structured delivery/inventory reports, use reporting instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Sub-operation to perform: • run_query: Execute a PQL SELECT statement. Example: SELECT Id, Name FROM Order WHERE Status = 'DELIVERING'. Returns rows up to 1000 per call. | |
| network_code | No | GAM network code (e.g. 12345678). Required for all network-scoped operations. Obtain via select_gam_network or list_accessible_networks. | |
| pql_query | No | PQL SELECT statement. Supported tables: Order, LineItem, Creative, AdUnit, Placement, Company, User, and others. Max 1000 rows returned. |