read
ads

Run an arbitrary read-only Google Ads Query Language (GAQL) query against the store's Google Ads account and get rows ba

Changed on

Run an arbitrary read-only Google Ads Query Language (GAQL) query against the store's Google Ads account and get rows back. Covers the whole reporting surface: campaigns, ad_group, keyword_view, search_term_view, ad_group_ad, asset, geographic_view, campaign_criterion, change_event, etc., and Local Services Ads (local_services_lead, local_services_lead_conversation). Example: "SELECT campaign.name, metrics.clicks, metrics.cost_micros FROM campaign WHERE segments.date DURING LAST_7_DAYS ORDER BY metrics.clicks DESC". The answer stops at limit rows; pass include_truncation: true to get { rows, truncated, limit } and narrow the query when truncated is true. Queries the Google Ads API, see https://developers.google.com/google-ads/api/docs/query/overview

post/api/v1/tools/ads_run_gaql

Request

  • Base URL
    https://app.magistry.io
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://app.magistry.io/api/oauth/authorize
      Token URLhttps://app.magistry.io/api/oauth/token
      Scopesads:read

Request body

object required
query, string required

A GAQL SELECT query.

limit, integer

Max rows returned (default 500).

include_truncation, boolean

Answer { rows, truncated, limit } instead of the bare row array; truncated is true when the account held more rows than limit.

Response

Tool result

object required
ok, boolean required
result, unknown required

Changes

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    11 more changes in this revision