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: impressions, clicks, spend, CTR, CPC, CPM. 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); fields[] to project specific columns; filters[] (IN/GREATER_THAN/LESS_THAN); sort[]; includes[] for zero-impression expansion; and limit/after pagination.

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', or 'device'.
fieldsarray optionalProject specific columns, e.g. ['campaign.clicks','campaign.spend','campaign.name']. Omit for defaults.
filtersarray optionalRow filters: [{field, operator, value}] with operator 'IN' (array value), 'GREATER_THAN', or 'LESS_THAN' (numeric). E.g. {'field':'campaign.spend','operator':'GREATER_THAN','value':1000000}.
sortarray optionalOrdering: [{field, direction}] with direction 'asc'|'desc'. E.g. {'field':'campaign.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.

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