APIAI InsightsAI visibility API
AI visibility API. Match the pages AI answers cite to the visits and revenue they bring in.
Pull ChatGPT and Gemini answers with their cited sources, AI referral visits from GA4, and Google AI Overviews on your tracked keywords. Call the JSON endpoints from your code or use the same eight tools through our MCP server. Both come with every MarketingTracer plan at no extra cost.
Prompt answers
Full ChatGPT and Gemini answers with the pages they cite in order and 12 weeks of status.
AI referral visits
GA4 sessions, key events and euro revenue per AI assistant and landing page.
Google AI Overviews
Whether a tracked keyword shows an AI Overview, with your place in its sources next to organic rank.
REST and MCP
60 calls a minute in every plan, over plain HTTP or in Claude Code and Cursor.
Endpoints for prompt citations, GA4 AI traffic and AI Overviews
Call any endpoint under /rest/v1/ on app.marketingtracer.com with a JSON POST or a GET query string. Send your personal API key from the app's MCP page in the Authorization: Bearer header. Every call takes a site_id from the app URL or the list_sites MCP tool. Responses come back as {"data": …, "meta": {…}}. All eight endpoints are read-only, so a key cannot change prompts or site settings. The rate limit is 60 calls a minute per key across REST and MCP.
| REST endpoint | MCP tool | What it returns |
|---|---|---|
aiinsights.summary | get_aiinsights_summary | Mention and link share in current answers against the previous period, in total and per AI, with GA4 and Rank tracker connection flags. |
aiinsights.prompts | get_aiinsights_prompts | Every prompt on the site with its latest status and source position per AI, a 12-week history and the other domains named. |
aiinsights.prompt | get_aiinsights_prompt | One prompt in full, with the latest answer text and ordered sources per AI alongside 28-day GA4 AI visits to your cited pages. |
aiinsights.competitors | get_aiinsights_competitors | Mentions and links against 28 days earlier for your site and other domains in the answers, including followed competitors and the eight most-cited external URLs. |
aiinsights.traffic_summary | get_aiinsights_traffic_summary | GA4 sessions, engaged sessions, key events and euro revenue from AI assistants against the previous period, in total and per AI. |
aiinsights.traffic_pages | get_aiinsights_traffic_pages | Landing pages ordered by GA4 visits from AI assistants, with key events and euro revenue per page and how many prompts cite each URL. |
aiinsights.traffic_monthly | get_aiinsights_traffic_monthly | Sixteen months of GA4 visits per AI assistant with monthly key events and euro revenue, flagging an incomplete current month. |
aiinsights.ai_overviews | get_aiinsights_ai_overviews | Whether each Rank tracker keyword shows a Google AI Overview, with your place in its sources and up to three other cited domains next to organic position. |
Pulling a prompt and the sources it cites
Send site_id and a prompt_id from aiinsights.prompts to pull one prompt in full. The response includes the latest ChatGPT and Gemini answers with ordered source URLs and any cited pages on your own site.
curl -s https://app.marketingtracer.com/rest/v1/aiinsights.prompt \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id": "YOUR_SITE_ID", "prompt_id": "6ae4bb24c906bf28bc7fa65e"}'
{
"data": {
"id": "6ae4bb24c906bf28bc7fa65e",
"prompt": "Waar koop ik accessoires voor een BYD Seal U DM-i?",
"country": "nl",
"language": "nl",
"engines": ["chatgpt", "gemini"],
"brand_terms": ["Example Shop"],
"created_at": "2026-10-30T15:43:32Z",
"per_engine": [
{
"key": "chatgpt",
"label": "ChatGPT",
"weeks": [
{"date": "2026-10-19", "status": null, "position": null},
{"date": "2026-10-26", "status": "linked", "position": 2},
…
],
"answer": {
"date": "2026-10-30",
"status": "linked",
"position": 2,
"text": "Voor het aanschaffen van accessoires voor uw BYD Seal U DM-i in Nederland zijn er diverse opties beschikbaar:\n\n1. **Mardexo**: Deze Nederlandse webshop biedt specifieke accessoires voor de BYD Seal U DM-i …",
"sources": [
{
"position": 1,
"url": "https://mardexo.nl/collections/byd-seal-u-accessoires/products/opbergbak-bagageruimte-byd-seal-u-dm-i",
"domain": "mardexo.nl",
"own": false
},
{
"position": 2,
"url": "https://www.example-shop.com/byd-seal-u",
"domain": "example-shop.com",
"own": true
}
],
"other_sites": [
{"domain": "mardexo.nl", "mentioned": true, "position": 1},
{"domain": "broditnederland.nl", "mentioned": true, "position": 3}
]
}
},
{
"key": "gemini",
"label": "Gemini",
…
}
],
"own_pages": [
{
"url": "https://www.example-shop.com/byd-seal-u",
"path": "/byd-seal-u",
"cited_by": [{"key": "chatgpt", "position": 2}],
"ai_sessions": null,
"conversions": null,
"revenue_eur": null
}
]
},
"meta": {
"site_id": "YOUR_SITE_ID"
}
}
With GA4 connected, own_pages fills in 28-day ai_sessions, conversions and revenue_eur; otherwise those three stay null.
AI citations and real visits on the same client report
In a client review the first question is whether the site shows up in ChatGPT and Gemini. Five seconds later the client asks if anyone actually clicked through or bought anything.
Pull aiinsights.summary for the mention and link share against the previous period. Pair it with aiinsights.traffic_pages to put GA4 sessions, key events and revenue_eur next to cited_by_prompts on every landing page. Any page with ChatGPT visits and cited_by_prompts at zero flags a topic you have not added as a prompt yet.
{
"data": [
{
"url": "https://example-blog.com/names/josiah",
"path": "/names/josiah",
"sessions": 4,
"sessions_previous": 0,
"engaged_sessions": 2,
"conversions": 0,
"revenue_eur": 0,
"per_engine": [
{"key": "chatgpt", "label": "ChatGPT", "sessions": 4}
],
"cited_by_prompts": 0
},
{
"url": "https://example-blog.com/forum/first-symptoms",
"path": "/forum/first-symptoms",
"sessions": 3,
"sessions_previous": 1,
…
}
],
"meta": {
"site_id": "YOUR_SITE_ID",
"next_cursor": "2",
"total": 49
}
}
Hand your writer the competing URL that took the source slot
Telling a writer that AI visibility sits at 17 percent gives them nothing to rewrite on Monday morning. Even knowing a prompt came back mentioned leaves open why another site won the link.
Feed cited_pages from aiinsights.competitors into your content tool to show the exact external URLs ChatGPT and Gemini cite most often. Combine it with aiinsights.prompt so the writer sees the full answer text and the ordered sources list. After the updated page goes live, the 12-week status history shows when it picks up the link.
{
"data": {
"answers": 58,
"own": {
"domain": "example-shop.com",
"answers": 58,
"mentioned": 10,
"linked": 9,
"mentioned_previous": 0,
…
},
"cited_pages": [
{
"url": "https://www.leapmotor.net/nl-nl/andere-producten/b10-accessoires",
"domain": "leapmotor.net",
"citations": 2,
"prompts": 1
},
{
"url": "https://www.car-blaze.com/collections/leapmotor-b10",
"domain": "car-blaze.com",
"citations": 2,
"prompts": 1
}
],
…
},
"meta": {
"site_id": "YOUR_SITE_ID"
}
}
Google AI Overviews right next to organic position
Position 2 looks great on a plain ranking table. That number reads differently when a Google AI Overview sits above your result and cites three other sites.
Call aiinsights.ai_overviews to add an AI Overview column to your ranking table, or ask Claude Code to filter your keywords through get_aiinsights_ai_overviews. Every tracked keyword comes back with ai_overview, your position in its sources, also_cited and organic_position.
Endpoints, arguments and field descriptions
Every endpoint is a POST with a JSON body; reading endpoints also take a GET with the same arguments in the query string. Send your API key as Authorization: Bearer YOUR_API_KEY. Every answer is {"data": …, "meta": {…}}: meta.site_id always, meta.next_cursor and meta.total for a list, meta.period where the endpoint covers a period. An error is {"error": {"code", "message"}} with the HTTP status: 400 invalid_argument, unknown_argument or missing_argument; 401 not_authenticated; 403 no_access or tool_off; 404 not_found; 429 rate_limited. The machine-readable version is openapi.json.
aiinsights.summary
POST /rest/v1/aiinsights.summary · MCP tool get_aiinsights_summary
Returns the AI visibility of one site: of the current answers (per prompt and AI the latest answer, if it is at most 62 days old), how many mention the site (name it or link to it) and how many link to it (cite one of its pages as a source), as a share now against the last day of the previous period, also per AI (ChatGPT, Gemini); plus the prompts, the measuring package and what is connected. One measurement is one prompt asked to one AI; one round asks every prompt once, at the package's frequency.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
from | string, YYYY-MM-DD | First day of the period, YYYY-MM-DD; give it together with to. Without from and to, the period is the last 28 days up to yesterday, against the 28 days before. |
to | string, YYYY-MM-DD | Last day of the period, YYYY-MM-DD (at most yesterday); give it together with from. The previous period is then the same days one month earlier. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/aiinsights.summary \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID"}'
Example response · A real answer, anonymised and shortened to two items per list.
{
"data": {
"prompts": 6,
"prompts_measured": 6,
"last_measured_date": "2026-10-27",
"engines": [{"key": "chatgpt", "label": "ChatGPT"}, {"key": "gemini", "label": "Gemini"}],
"answers": 9,
"mentioned": 8,
"linked": 0,
"mentioned_pct": {"value": 88.89, "previous": 66.67, "change": 22.22, "change_pct": 33.3},
"linked_pct": {"value": 0, "previous": 16.67, "change": -16.67, "change_pct": -100},
"per_engine": [
{"key": "chatgpt", "label": "ChatGPT", "answers": 6, "mentioned": 5, "linked": 0},
{"key": "gemini", "label": "Gemini", "answers": 3, "mentioned": 3, "linked": 0}
],
"brand_terms": ["Example"],
"competitors": [],
"ga4_connected": true,
"search_console_connected": true,
"rank_tracker_keywords": 10,
"package": {"frequency": "monthly", "measurements": 30},
"included": {"frequency": "monthly", "measurements": 30},
"measurements_used": 12,
"can_write": true,
"can_set_plan": true,
"can_buy": false
},
"meta": {
"site_id": "YOUR_SITE_ID",
"period": {
"from": "2026-10-02",
"to": "2026-10-29",
"compare_from": "2026-09-04",
"compare_to": "2026-10-01"
}
}
}
Response fields · in data:
| Field | Type | What it is |
|---|---|---|
prompts | integer | Prompts of the site. |
prompts_measured | integer | Prompts with at least one current answer. |
last_measured_date | string or null | The day of the site's newest answer, YYYY-MM-DD; null before the first answer. |
engines | array | The AIs the prompts are asked to. |
engines[].key | string | chatgpt or gemini. |
engines[].label | string | The name to show. |
answers | integer | Current answers: per prompt and AI the latest answer, if it is at most 62 days old. |
mentioned | integer | Current answers that mention the site (name it or link to it). |
linked | integer | Current answers that link to the site (cite one of its pages as a source). |
mentioned_pct | object | The share of current answers that mention the site, 0-100, on the last day of the period, against the last day of the previous period. |
mentioned_pct.value | number or null | Now (or on to); null without answers. |
mentioned_pct.previous | number or null | The previous period; null when there was nothing to compare with. |
mentioned_pct.change | number or null | value minus previous (for a _pct field: percentage points). |
mentioned_pct.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
linked_pct | object | The share of current answers that link to the site, 0-100, on the last day of the period, against the last day of the previous period. |
linked_pct.value | number or null | Now (or on to); null without answers. |
linked_pct.previous | number or null | The previous period; null when there was nothing to compare with. |
linked_pct.change | number or null | value minus previous (for a _pct field: percentage points). |
linked_pct.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
per_engine | array | The same counts per AI. |
per_engine[].key | string | chatgpt or gemini. |
per_engine[].label | string | The name to show. |
per_engine[].answers | integer | Current answers of this AI. |
per_engine[].mentioned | integer | Answers that mention the site. |
per_engine[].linked | integer | Answers that link to the site. |
brand_terms | array<string> | The names we look for in the answers. |
competitors | array<string> | The followed competitors (the list shared with the Rank tracker). |
ga4_connected | boolean | Whether GA4 is connected; the traffic endpoints need it. |
search_console_connected | boolean | Whether Search Console is connected. |
rank_tracker_keywords | integer | Tracked keywords in the Rank tracker; aiinsights.ai_overviews needs them. |
package | object | The measuring package of the site. |
package.frequency | string | monthly, biweekly or weekly: how often a round runs. |
package.measurements | integer | Measurements per round. |
included | object | The package that comes with every site. |
included.frequency | string | monthly, biweekly or weekly: how often a round runs. |
included.measurements | integer | Measurements per round. |
measurements_used | integer | Measurements the prompts take per round; above the package, the newest prompts are paused. |
can_write | boolean | Whether the caller may add and change prompts. |
can_set_plan | boolean | Whether the caller may set a package for the site (white label admins). |
can_buy | boolean | Whether the caller may buy a bigger package. |
aiinsights.prompts
POST /rest/v1/aiinsights.prompts · MCP tool get_aiinsights_prompts
Returns the prompts of one site, oldest first, with per AI the status of the current answer (linked: the site is a source; mentioned: named, not linked; none: not named; nosearch: the AI answered without sources and did not name the site; null: no answer from the last 62 days), the site's place among the sources, the other sites that appear in the answers, and the best status per week over the last 12 weeks.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/aiinsights.prompts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID"}'
Example response · A real answer, anonymised and shortened to two items per list (weeks: the first two of the twelve).
{
"data": [
{
"id": "6a38ed0ec1b8515f372efd22",
"prompt": "welke webshop verkoopt de beste dakdragers?",
"engines": ["chatgpt", "gemini"],
"brand_terms": ["Example Shop"],
"paused": false,
"errors": [],
"created_at": "2026-06-22T08:06:38Z",
"per_engine": [
{
"key": "chatgpt",
"label": "ChatGPT",
"asked": true,
"status": "none",
"position": null,
"date": "2026-10-26"
},
{
"key": "gemini",
"label": "Gemini",
"asked": true,
"status": null,
"position": null,
"date": null
}
],
"also_mentioned": ["google.com"],
"weeks": [{"date": "2026-08-10", "status": "none"}, {"date": "2026-08-17", "status": "none"}]
},
{
"id": "6a38ed0ec1b851609b415f32",
"prompt": "ik zoek een hondenrek voor mijn audi a3",
"engines": ["chatgpt", "gemini"],
"brand_terms": ["Example Shop"],
"paused": false,
"errors": [],
"created_at": "2026-06-22T08:06:38Z",
"per_engine": [
{
"key": "chatgpt",
"label": "ChatGPT",
"asked": true,
"status": "none",
"position": null,
"date": "2026-10-26"
},
{
"key": "gemini",
"label": "Gemini",
"asked": true,
"status": null,
"position": null,
"date": null
}
],
"also_mentioned": ["dogguards.co.uk", "bol.com"],
"weeks": [
{"date": "2026-08-10", "status": "none"},
{"date": "2026-08-17", "status": "linked"}
]
}
],
"meta": {"site_id": "YOUR_SITE_ID", "next_cursor": null, "total": 30}
}
Response fields · data is a list; each item has:
| Field | Type | What it is |
|---|---|---|
id | string | The prompt id; prompt_id in aiinsights.prompt. |
prompt | string | The question as asked. |
engines | array<string> | The AIs this prompt is asked to. |
brand_terms | array<string> | Extra names looked for in the answers to this prompt. |
paused | boolean | Whether the prompt is above the package and not asked. |
errors | array<string> | Keys of the AIs (chatgpt, gemini) whose latest attempt failed. |
created_at | string or null | When the prompt was added, ISO 8601 UTC. |
per_engine | array | The latest answer per AI. |
per_engine[].key | string | chatgpt or gemini. |
per_engine[].label | string | The name to show. |
per_engine[].asked | boolean | Whether this prompt is asked to this AI. |
per_engine[].status | string or null | linked, mentioned, none or nosearch for the current answer; null when there is no answer from the last 62 days. |
per_engine[].position | integer or null | The site's first place among the answer's sources; null when the answer does not link to the site. |
per_engine[].date | string or null | The day of the answer, YYYY-MM-DD; null without a current answer. |
also_mentioned | array<string> | The other domains that appear most often in the current answers (cited or named), at most 3. |
weeks | array | The best status over the AIs per week, oldest first, 12 weeks. |
weeks[].date | string | The Monday of the week, YYYY-MM-DD. |
weeks[].status | string or null | linked, mentioned, none, nosearch, or null without an answer that week. |
aiinsights.prompt
POST /rest/v1/aiinsights.prompt · MCP tool get_aiinsights_prompt
Returns one prompt up close: per AI its status per week over the last 12 weeks, and its latest answer with the text, the sources it cited (the site's own pages marked) and the other sites in it; plus the site's own pages the AIs cite, with their visits from AI over the last 28 days (GA4).
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
prompt_id (required) | string | The id from aiinsights.prompts. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/aiinsights.prompt \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","prompt_id":"6ae4bb24c906bf28bc7fa65e"}'
Example response · A real answer, anonymised and shortened to two items per list.
{
"data": {
"id": "6ae4bb24c906bf28bc7fa65e",
"prompt": "Waar koop ik accessoires voor een BYD Seal U DM-i?",
"country": "nl",
"language": "nl",
"engines": ["chatgpt", "gemini"],
"brand_terms": ["Example Shop"],
"created_at": "2026-10-30T15:43:32Z",
"per_engine": [
{
"key": "chatgpt",
"label": "ChatGPT",
"weeks": [
{"date": "2026-10-19", "status": null, "position": null},
{"date": "2026-10-26", "status": "linked", "position": 2}
],
"answer": {
"date": "2026-10-30",
"status": "linked",
"position": 2,
"text": "Voor het aanschaffen van accessoires voor uw BYD Seal U DM-i in Nederland zijn er diverse opties beschikbaar:\n\n1. **Mardexo**: Deze Nederlandse webshop biedt specifieke accessoires voor de BYD Seal U DM-i …",
"sources": [
{
"position": 1,
"url": "https://mardexo.nl/collections/byd-seal-u-accessoires/products/opbergbak-bagageruimte-byd-seal-u-dm-i",
"domain": "mardexo.nl",
"own": false
},
{
"position": 2,
"url": "https://www.example-shop.com/byd-seal-u",
"domain": "example-shop.com",
"own": true
}
],
"other_sites": [
{"domain": "mardexo.nl", "mentioned": true, "position": 1},
{"domain": "broditnederland.nl", "mentioned": true, "position": 3}
]
}
},
{
"key": "gemini",
"label": "Gemini",
"weeks": [
{"date": "2026-10-19", "status": null, "position": null},
{"date": "2026-10-26", "status": "linked", "position": 3}
],
"answer": {
"date": "2026-10-30",
"status": "linked",
"position": 3,
"text": "Voor accessoires en onderdelen voor de **BYD Seal U DM-i** kun je op verschillende plekken terecht …",
"sources": [
{
"position": 1,
"url": "https://www.topbyd.com/collections/byd-sealion-6-seal-u-accessoriess",
"domain": "topbyd.com",
"own": false
},
{
"position": 2,
"url": "https://www.shop4ev.com/en/collections/byd-seal-u",
"domain": "shop4ev.com",
"own": false
}
],
"other_sites": [
{"domain": "topbyd.com", "mentioned": true, "position": 1},
{"domain": "shop4ev.com", "mentioned": true, "position": 2}
]
}
}
],
"own_pages": [
{
"url": "https://www.example-shop.com/byd-seal-u",
"path": "/byd-seal-u",
"cited_by": [{"key": "chatgpt", "position": 2}],
"ai_sessions": null,
"conversions": null,
"revenue_eur": null
}
]
},
"meta": {"site_id": "YOUR_SITE_ID"}
}
Response fields · in data:
| Field | Type | What it is |
|---|---|---|
id | string | The prompt id. |
prompt | string | The question as asked. |
country | string or null | Two-letter code of the country the prompt is asked for; null when not set. |
language | string or null | Two-letter language code; null when not set. |
engines | array<string> | The AIs this prompt is asked to. |
brand_terms | array<string> | Extra names looked for in the answers to this prompt. |
created_at | string or null | When the prompt was added, ISO 8601 UTC. |
per_engine | array | Per AI. |
per_engine[].key | string | chatgpt or gemini. |
per_engine[].label | string | The name to show. |
per_engine[].weeks | array | 12 weeks, oldest first. |
per_engine[].weeks[].date | string | The Monday of the week, YYYY-MM-DD. |
per_engine[].weeks[].status | string or null | linked, mentioned, none or nosearch; null without an answer that week. |
per_engine[].weeks[].position | integer or null | The site's first place among the sources; null when that answer does not link to the site. |
per_engine[].answer | object or null | The current answer (the latest, at most 62 days old); null when there is none. |
per_engine[].answer.date | string | The day of the answer, YYYY-MM-DD. |
per_engine[].answer.status | string | linked, mentioned, none or nosearch. |
per_engine[].answer.position | integer or null | The site's first place among the sources; null when the answer does not link to the site. |
per_engine[].answer.text | string | The answer as the AI gave it (usually Markdown), cut at 6,000 characters. |
per_engine[].answer.sources | array | The pages the answer cites, in order. |
per_engine[].answer.sources[].position | integer | The place among the sources. |
per_engine[].answer.sources[].url | string | The page. |
per_engine[].answer.sources[].domain | string | Its domain. |
per_engine[].answer.sources[].own | boolean | Whether it is a page of the site itself. |
per_engine[].answer.other_sites | array | The other sites in the answer. |
per_engine[].answer.other_sites[].domain | string | The domain. |
per_engine[].answer.other_sites[].mentioned | boolean | Whether the text names it. |
per_engine[].answer.other_sites[].position | integer or null | Its first place among the sources; null when only named. |
own_pages | array | The site's own pages the current answers cite. |
own_pages[].url | string | The page. |
own_pages[].path | string | Its path. |
own_pages[].cited_by | array | Which AI cites it, and where. |
own_pages[].cited_by[].key | string | chatgpt or gemini. |
own_pages[].cited_by[].position | integer or null | This page's place among that answer's sources. |
own_pages[].ai_sessions | integer or null | Visits from AI assistants to this page, last 28 days; null without GA4. |
own_pages[].conversions | number or null | Key events of those visits, last 28 days (GA4); null without GA4. |
own_pages[].revenue_eur | number or null | Revenue of those visits in euro, last 28 days (GA4); null without GA4. |
aiinsights.competitors
POST /rest/v1/aiinsights.competitors · MCP tool get_aiinsights_competitors
Returns who appears in the current answers to the site's prompts (named or cited), against 28 days earlier: the site itself, the other sites (the 15 that appear most, plus every followed competitor), the pages of other sites the AIs cite most often, and the followed competitors.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/aiinsights.competitors \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID"}'
Example response · A real answer, anonymised and shortened to two items per list.
{
"data": {
"answers": 58,
"own": {
"domain": "example-shop.com",
"answers": 58,
"mentioned": 10,
"linked": 9,
"mentioned_previous": 0,
"per_engine": [
{"key": "chatgpt", "label": "ChatGPT", "mentioned": 4},
{"key": "gemini", "label": "Gemini", "mentioned": 6}
]
},
"cited_pages": [
{
"url": "https://www.leapmotor.net/nl-nl/andere-producten/b10-accessoires",
"domain": "leapmotor.net",
"citations": 2,
"prompts": 1
},
{
"url": "https://www.car-blaze.com/collections/leapmotor-b10",
"domain": "car-blaze.com",
"citations": 2,
"prompts": 1
}
],
"sites": [
{
"domain": "youtube.com",
"answers": 8,
"mentioned": 6,
"linked": 8,
"answers_previous": 0,
"followed": false,
"per_engine": [
{"key": "chatgpt", "label": "ChatGPT", "answers": 6},
{"key": "gemini", "label": "Gemini", "answers": 2}
]
},
{
"domain": "google.com",
"answers": 7,
"mentioned": 6,
"linked": 7,
"answers_previous": 0,
"followed": false,
"per_engine": [
{"key": "chatgpt", "label": "ChatGPT", "answers": 6},
{"key": "gemini", "label": "Gemini", "answers": 1}
]
}
],
"competitors": []
},
"meta": {"site_id": "YOUR_SITE_ID"}
}
Response fields · in data:
| Field | Type | What it is |
|---|---|---|
answers | integer | Current answers (per prompt and AI the latest, at most 62 days old). |
own | object | The site itself. |
own.domain | string | The site's domain. |
own.answers | integer | The same as answers. |
own.mentioned | integer | Current answers that mention the site. |
own.linked | integer | Current answers that link to it. |
own.mentioned_previous | integer or null | Answers that mentioned it 28 days earlier; null when there were no answers then. |
own.per_engine | array | Mentions per AI. |
own.per_engine[].key | string | chatgpt or gemini. |
own.per_engine[].label | string | The name to show. |
own.per_engine[].mentioned | integer | Answers that mention the site. |
sites | array | Other sites in the current answers (cited or named): the 15 that appear most, then every other followed competitor (with 0 when absent). |
sites[].domain | string | The domain. |
sites[].answers | integer | Answers it appears in (named or as a source). |
sites[].mentioned | integer | Answers whose text names it. |
sites[].linked | integer | Answers that cite it as a source. |
sites[].answers_previous | integer or null | Answers it appeared in 28 days earlier; null when there were no answers then. |
sites[].followed | boolean | Whether it is a followed competitor. |
sites[].per_engine | array | Answers per AI. |
sites[].per_engine[].key | string | chatgpt or gemini. |
sites[].per_engine[].label | string | The name to show. |
sites[].per_engine[].answers | integer | Answers it appears in. |
cited_pages | array | Pages of other sites the AIs cite most, at most 8. |
cited_pages[].url | string | The page. |
cited_pages[].domain | string | Its domain. |
cited_pages[].citations | integer | In how many current answers it is a source. |
cited_pages[].prompts | integer | For how many prompts. |
competitors | array<string> | The followed competitors (the list shared with the Rank tracker). |
aiinsights.traffic_summary
POST /rest/v1/aiinsights.traffic_summary · MCP tool get_aiinsights_traffic_summary
Returns the visits from AI assistants (ChatGPT, Perplexity, Gemini, Copilot, Claude and others) in Google Analytics 4 for the period: sessions, engaged sessions, key events and revenue against the previous period, the share of all visits, and the same per AI. Without GA4 data, ga4_connected is false, the figures are null and per_engine is empty.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
from | string, YYYY-MM-DD | First day of the period, YYYY-MM-DD; give it together with to. Without from and to, the period is the last 28 days up to yesterday, against the 28 days before. |
to | string, YYYY-MM-DD | Last day of the period, YYYY-MM-DD (at most yesterday); give it together with from. The previous period is then the same days one month earlier. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/aiinsights.traffic_summary \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID"}'
Example response · A real answer, anonymised and shortened to two items per list.
{
"data": {
"ga4_connected": true,
"sessions": {"value": 59, "previous": 26, "change": 33, "change_pct": 126.9},
"engaged_sessions": {"value": 46, "previous": 17, "change": 29, "change_pct": 170.6},
"conversions": {"value": 0, "previous": 0, "change": 0, "change_pct": null},
"revenue_eur": {"value": 0, "previous": 0.06, "change": -0.06, "change_pct": -100},
"all_sessions": 26226,
"ai_share_pct": 0.22,
"per_engine": [
{
"key": "chatgpt",
"label": "ChatGPT",
"sessions": 59,
"engaged_sessions": 46,
"conversions": 0,
"revenue_eur": 0
}
]
},
"meta": {
"site_id": "YOUR_SITE_ID",
"period": {
"from": "2026-10-02",
"to": "2026-10-29",
"compare_from": "2026-09-04",
"compare_to": "2026-10-01"
}
}
}
Response fields · in data:
| Field | Type | What it is |
|---|---|---|
ga4_connected | boolean | Whether GA4 data came back (false when GA4 is not connected or did not answer). |
sessions | object or null | Sessions from AI assistants in the period, against the previous period. |
sessions.value | number or null | This period. |
sessions.previous | number or null | The previous period; null when there was nothing to compare with. |
sessions.change | number or null | value minus previous (for a _pct field: percentage points). |
sessions.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
engaged_sessions | object or null | Engaged sessions from AI assistants in the period, against the previous period. |
engaged_sessions.value | number or null | This period. |
engaged_sessions.previous | number or null | The previous period; null when there was nothing to compare with. |
engaged_sessions.change | number or null | value minus previous (for a _pct field: percentage points). |
engaged_sessions.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
conversions | object or null | Key events of those sessions in the period, against the previous period. |
conversions.value | number or null | This period. |
conversions.previous | number or null | The previous period; null when there was nothing to compare with. |
conversions.change | number or null | value minus previous (for a _pct field: percentage points). |
conversions.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
revenue_eur | object or null | Revenue of those sessions in euro in the period, against the previous period. |
revenue_eur.value | number or null | This period. |
revenue_eur.previous | number or null | The previous period; null when there was nothing to compare with. |
revenue_eur.change | number or null | value minus previous (for a _pct field: percentage points). |
revenue_eur.change_pct | number or null | The change in percent of previous; null when previous is 0 or null. |
all_sessions | integer or null | All sessions of the site in the period. |
ai_share_pct | number or null | Sessions from AI as a share of all sessions, 0-100. |
per_engine | array | Per AI, most sessions first. |
per_engine[].key | string | chatgpt, perplexity, gemini, copilot, claude, deepseek, meta, grok, mistral, you, phind or poe. |
per_engine[].label | string | The name to show. |
per_engine[].sessions | integer | Sessions. |
per_engine[].engaged_sessions | integer | Engaged sessions. |
per_engine[].conversions | number | Key events. |
per_engine[].revenue_eur | number | Revenue in euro. |
aiinsights.traffic_pages
POST /rest/v1/aiinsights.traffic_pages · MCP tool get_aiinsights_traffic_pages
Returns the visits from AI assistants per landing page in the period (GA4), most first: per AI, engaged sessions, key events, revenue, the sessions in the previous period, and for how many prompts a current answer cites the page. Empty without GA4 data.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
from | string, YYYY-MM-DD | First day of the period, YYYY-MM-DD; give it together with to. Without from and to, the period is the last 28 days up to yesterday, against the 28 days before. |
to | string, YYYY-MM-DD | Last day of the period, YYYY-MM-DD (at most yesterday); give it together with from. The previous period is then the same days one month earlier. |
limit | integer, 1 to 5,000, default 500 | Pages per call. |
cursor | string | meta.next_cursor of the previous call, for the next page. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/aiinsights.traffic_pages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID","limit":2}'
Example response · A real answer, anonymised and shortened to two items per list.
{
"data": [
{
"url": "https://example-blog.com/names/josiah",
"path": "/names/josiah",
"sessions": 4,
"sessions_previous": 0,
"engaged_sessions": 2,
"conversions": 0,
"revenue_eur": 0,
"per_engine": [{"key": "chatgpt", "label": "ChatGPT", "sessions": 4}],
"cited_by_prompts": 0
},
{
"url": "https://example-blog.com/forum/first-symptoms",
"path": "/forum/first-symptoms",
"sessions": 3,
"sessions_previous": 1,
"engaged_sessions": 1,
"conversions": 0,
"revenue_eur": 0,
"per_engine": [{"key": "chatgpt", "label": "ChatGPT", "sessions": 3}],
"cited_by_prompts": 0
}
],
"meta": {"site_id": "YOUR_SITE_ID", "next_cursor": "2", "total": 49}
}
Response fields · data is a list; each item has:
| Field | Type | What it is |
|---|---|---|
url | string or null | The landing page; null for GA4's (not set). |
path | string | Its path with the query string, without tracking parameters (utm_*, gclid, fbclid, msclkid, srsltid); (not set) as GA4 gives it. |
sessions | integer | Sessions from AI assistants. |
sessions_previous | integer | The same in the previous period. |
engaged_sessions | integer | Engaged sessions. |
conversions | number | Key events. |
revenue_eur | number | Revenue in euro. |
per_engine | array | Sessions per AI, most first. |
per_engine[].key | string | chatgpt, perplexity, … |
per_engine[].label | string | The name to show. |
per_engine[].sessions | integer | Sessions. |
cited_by_prompts | integer | For how many prompts a current answer cites this page. |
aiinsights.traffic_monthly
POST /rest/v1/aiinsights.traffic_monthly · MCP tool get_aiinsights_traffic_monthly
Returns the visits from AI assistants per month for the 16 months up to the month of to (GA4): sessions per AI, plus key events and revenue for the month. The last month is incomplete until it ends (complete false). Empty without GA4 data.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
to | string, YYYY-MM-DD | Last day, YYYY-MM-DD (at most yesterday). Defaults to yesterday. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/aiinsights.traffic_monthly \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID"}'
Example response · A real answer, anonymised and shortened to two items per list.
{
"data": [
{
"month": "2025-07",
"sessions": 19,
"per_engine": [
{"key": "chatgpt", "label": "ChatGPT", "sessions": 15},
{"key": "perplexity", "label": "Perplexity", "sessions": 4}
],
"conversions": 0,
"revenue_eur": 0.01,
"complete": true
},
{
"month": "2025-08",
"sessions": 32,
"per_engine": [
{"key": "chatgpt", "label": "ChatGPT", "sessions": 31},
{"key": "grok", "label": "Grok", "sessions": 1}
],
"conversions": 0,
"revenue_eur": 0,
"complete": true
}
],
"meta": {"site_id": "YOUR_SITE_ID", "next_cursor": null, "total": 16}
}
Response fields · data is a list; each item has:
| Field | Type | What it is |
|---|---|---|
month | string | YYYY-MM. |
sessions | integer | Sessions from AI assistants. |
per_engine | array | Sessions per AI, most first. |
per_engine[].key | string | chatgpt, perplexity, … |
per_engine[].label | string | The name to show. |
per_engine[].sessions | integer | Sessions. |
conversions | number | Key events. |
revenue_eur | number | Revenue in euro. |
complete | boolean | Whether the month is over (false for the month of to, unless to is its last day). |
aiinsights.ai_overviews
POST /rest/v1/aiinsights.ai_overviews · MCP tool get_aiinsights_ai_overviews
Returns Google's AI Overview at the site's Rank tracker keywords, one item per keyword with an AI Overview reading (its latest measurement): whether Google showed an AI Overview, the site's place among its sources, the other sites it cites, and the organic position. Keywords with an AI Overview come first, then by the site's place, then by keyword. Needs keywords in the Rank tracker.
Arguments
| Argument | Type | What it does |
|---|---|---|
site_id (required) | string | The site: its id from list_sites, or the id in the app’s address. |
Example request
curl -X POST https://app.marketingtracer.com/rest/v1/aiinsights.ai_overviews \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"site_id":"YOUR_SITE_ID"}'
Example response · A real answer, anonymised and shortened to two items per list.
{
"data": [
{
"keyword_id": "6ae0d00f1a123fbf9d03c6d2",
"keyword": "auto zonnescherm",
"country": "nl",
"device": "desktop",
"ai_overview": false,
"position": null,
"also_cited": [],
"organic_position": 2,
"measured_at": "2026-10-29T23:06:31Z"
},
{
"keyword_id": "6ae0d00f1a123fbf9d03c6d4",
"keyword": "automatten",
"country": "nl",
"device": "desktop",
"ai_overview": false,
"position": null,
"also_cited": [],
"organic_position": null,
"measured_at": "2026-10-29T23:06:31Z"
}
],
"meta": {"site_id": "YOUR_SITE_ID", "next_cursor": null, "total": 10}
}
Response fields · data is a list; each item has:
| Field | Type | What it is |
|---|---|---|
keyword_id | string | The keyword id in the Rank tracker. |
keyword | string | The keyword. |
country | string | Two-letter country code. |
device | string | desktop or mobile. |
ai_overview | boolean | Whether Google showed an AI Overview. |
position | integer or null | The site's place among the AI Overview's sources; null when not cited. |
also_cited | array<string> | Other domains among its sources, at most 3. |
organic_position | integer or null | The site's best organic position in the same measurement; null when not in the measured top. |
measured_at | string | When it was measured, ISO 8601 UTC. |
White-label AI visibility API. Pull ChatGPT and Gemini citations from your hostname.
If your agency uses our white-label dashboard, the REST API and MCP server answer on your own domain under your name. Your personal API key reads AI Insights for every client site your account can access. You decide whether your clients also get the API and the MCP.
Free 14-day trial
MarketingTracer smart A.I. tool shows you what you need to rank. Then we'll help you get it done.
- No credit card required
- No installation needed
- No strings attached
FAQ
Something else? Ask us.
Is the AI visibility API included in my plan?
Yes. Every MarketingTracer plan includes the AI Insights REST endpoints and MCP tools at no extra cost. Compare plans on our pricing page.
Which AI assistants do the prompt and traffic endpoints cover?
The prompt endpoints track answers in ChatGPT and Gemini. For referral traffic, the GA4 endpoints count visits from ChatGPT, Perplexity, Gemini, Copilot, Claude, DeepSeek, Meta AI, Grok, Mistral, You.com, Phind and Poe. Google AI Overviews are checked on the keywords you track in the Rank tracker.
Where do I get my API key, and what is the rate limit?
Copy your personal API key from the MCP page in the app and send it in the Authorization: Bearer header. Each key allows 60 calls a minute across the REST API and MCP server. To generate a typed client, use the OpenAPI specification.
How do I connect these tools to ChatGPT, Claude or Cursor?
Connect to /rest/mcp/server on app.marketingtracer.com to use all eight get_aiinsights_* tools. In ChatGPT, Claude.ai, Claude Desktop and Claude Code, you sign in with your MarketingTracer account. Cursor and config files use your personal API key in the Authorization: Bearer header. Copy the setup steps from the SEO MCP page.
Can I add prompts or change site settings through the API?
No. Both the REST API and the MCP server are read-only. You add or edit prompts and competitors in the MarketingTracer app, then read the results with your API key.
What comes back if GA4 or the Rank tracker is not set up yet?
When Google Analytics 4 is not connected, ga4_connected is false and traffic totals come back null. aiinsights.traffic_pages and aiinsights.traffic_monthly return empty lists. Before a site has measured Rank tracker keywords, including during the free trial, aiinsights.ai_overviews returns an empty list too.
How do date ranges and pagination work?
By default, endpoints that take from and to return the last 28 days up to yesterday, compared with the 28 days before. Pass your own YYYY-MM-DD dates and the comparison shifts to the same days one month earlier. List endpoints return meta.total, and aiinsights.traffic_pages takes limit (up to 5,000) and cursor from meta.next_cursor to step through pages.