get_chatgpt_insights

ChatGPT Ads Read

Full performance reporting at any scope: ad_account, campaign, ad_group, or ad (pass scope + scope_id)

Endpoint

POST https://api.adspirer.ai/api/v1/tools/get_chatgpt_insights/execute

Headers

Description

Full performance reporting at any scope: ad_account, campaign, ad_group, or ad (pass scope + scope_id). Metrics you can project via fields[]: impressions, clicks, spend, ctr, cpc, cpm, conversions, post_click_cvr, cpa, click_through_conversions, view_through_conversions, order_created_roas, order_created_attributed_sales, carousel_product_card_impressions/clicks. Controls: lookback_days or explicit start/end; time breakdown none/hourly/daily/monthly; aggregation_level for per-entity rows (e.g. ad_account scope + campaign level = per-campaign rows); ONE segment (product/country/device/platform — platform splits by ChatGPT surface); filters[] (IN/GREATER_THAN/LESS_THAN); sort[]; includes[] for zero-impression expansion; limit/after pagination. Money renders in the account currency; set raw_data=true for full JSON.

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
scopestring optional'ad_account', 'campaign', 'ad_group', or 'ad'. default: "ad_account"
scope_idstring optionalRequired for campaign/ad_group/ad scopes — the cmpn_/adgrp_/ad_ id.
lookback_daysinteger optionalHow many days back to report (used unless start/end are given). default: 30
startinteger optionalExplicit window start (unix seconds, floored to the hour). Use with end instead of lookback_days.
endinteger optionalExplicit window end (unix seconds, floored to the hour).
breakdownstring optionalTime granularity: 'none', 'hourly', 'daily', or 'monthly'. (hourly not allowed with segments.) default: "none"
aggregation_levelstring optionalRow entity within the scope: 'ad_account', 'campaign', 'ad_group', or 'ad' (e.g. ad_account scope + campaign level = per-campaign rows).
segmentsarray optionalAt most ONE breakdown: 'product', 'country', 'device', or 'platform'. 'platform' splits by ChatGPT surface (android_app / android_web / desktop_web / ios_app / ios_web / web). Hourly granularity is not allowed together with a segment.
fieldsarray optionalProject specific metric columns (the API only returns a metric when asked). Available: impressions, clicks, spend, ctr, cpc, cpm, conversions, post_click_cvr, cpa, click_through_conversions, view_through_conversions, order_created_roas, order_created_attributed_sales, carousel_product_card_impressions, carousel_product_card_clicks. Omit for the default set (impressions + row name).
filtersarray optionalRow filters: [{field, operator, value}] with operator 'IN' (array value), 'GREATER_THAN', or 'LESS_THAN' (numeric). E.g. {'field':'spend','operator':'GREATER_THAN','value':100}.
sortarray optionalOrdering: [{field, direction}] with direction 'asc'|'desc'. E.g. {'field':'clicks','direction':'desc'}.
includesarray optionalZero-impression expansion: 'zero_impression_items' (no segments) or 'zero_impression_products' (with product segment).
limitinteger optionalMax rows per page (1–2000). default: 200
afterstring optionalPagination cursor — pass the prior response's last_id to get the next page.
beforestring optionalPagination cursor — pass the prior response's first_id to page backward.
raw_databoolean optionalReturn the full raw insights JSON instead of the formatted table. default: false

Example request

{
  "arguments": {
    "scope": "ad_account",
    "scope_id": "string",
    "lookback_days": 30,
    "start": 1,
    "end": 1,
    "breakdown": "none"
  }
}

Example responses

200 — Success

{
  "success": true,
  "data": {
    "text": "(tool-specific textual output for get_chatgpt_insights)",
    "quota": {
      "used": 42,
      "limit": 150,
      "tier": "plus",
      "period_end": "2026-05-01"
    }
  },
  "tool": "get_chatgpt_insights"
}

400 — Tool-level error (bad arguments / multi-account selection)

{
  "success": false,
  "error": "You have 25 meta_ads accounts connected. Please specify which account to use by passing the ad_account_id parameter:\n  - Acme Holdings (ad_account_id=\"act_123456789\")\n  - Acme EU (ad_account_id=\"act_987654321\")",
  "is_error": true,
  "tool": "get_chatgpt_insights"
}

402 — Quota exhausted

{
  "success": false,
  "error": "\ud83d\udea8 Monthly limit reached (150/150 tool calls on Plus tier).\nUpgrade to Pro at https://adspirer.ai to keep building.",
  "is_error": true,
  "tool": "get_chatgpt_insights",
  "quota": {
    "used": 150,
    "limit": 150,
    "tier": "plus",
    "period_end": "2026-05-01",
    "upgrade_url": "https://adspirer.ai"
  }
}

Try it live


Adspirer REST API — get an API key at adspirer.ai/keys · adspirer.ai