Web analytics
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
GET | |
PATCH | |
GET | |
GET | |
PATCH | |
DELETE | |
GET | |
GET | |
GET | |
POST | |
GET | |
GET | |
POST | |
GET | |
GET | |
POST | |
GET |
List all aeo brands
Lists the project's brand catalog by domain: the project itself, competitors, publishers and domains nobody has labeled yet. Each daily run adds the domains its answers cited for the first time.
Required API key scopes
web_analytics:readQuery parameters
- kindstringOne of:
"own""competitor""publisher""unknown" - limitinteger
- offsetinteger
- statusstringOne of:
"suggested""confirmed""ignored"
Response
Example request
GET /api /projects /:project_id /aeo_brandsExample response
Status 200
Retrieve aeo brands
Gets one brand from the project's brand catalog.
Required API key scopes
web_analytics:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /aeo_brands /:idExample response
Status 200
Update aeo brands
Renames, relabels, confirms or ignores a brand, or replaces its other names. The daily run keeps these edits; it only adds newly cited domains.
Required API key scopes
web_analytics:writePath parameters
- idstring
Request parameters
- namestring
- kind
- status
- aliasesarray
Response
Example request
PATCH /api /projects /:project_id /aeo_brands /:idExample response
Status 200
List all aeo prompts
Lists the project's AEO prompt set, ordered by topic and then rank, one page at a time. Filter by topic, by on/off state, or to the prompts that need improvement. Archived prompts are left out unless include_archived is true. Each prompt carries its latest check per answer engine.
Required API key scopes
web_analytics:readQuery parameters
- activeboolean | null
- include_archivedbooleanDefault:
false - limitinteger
- needs_improvementbooleanDefault:
false - offsetinteger
- topicstring
Response
Example request
GET /api /projects /:project_id /aeo_promptsExample response
Status 200
Retrieve aeo prompts
Gets one prompt from the project's AEO prompt set, archived ones included, with its latest check per answer engine.
Required API key scopes
web_analytics:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /aeo_prompts /:idExample response
Status 200
Update aeo prompts
Turns a prompt on or off, changes its topic, archives or restores it, or changes its text. A text change adds the next version and makes it current, and current_version moves back to an earlier one. The prompt keeps its id, and past checks are always kept.
Required API key scopes
web_analytics:writePath parameters
- idstring
Request parameters
- activeboolean | null
- topicstring
- promptstring
- version_descriptionstring
- current_versioninteger | null
- archivedboolean | null
Response
Example request
PATCH /api /projects /:project_id /aeo_prompts /:idExample response
Status 200 The updated prompt.
Status 400 The edit is invalid, the version does not exist, or the prompt is archived and must be restored first.
Status 409 Another prompt in the set already has the new text.
Delete aeo prompts
Archives a prompt: it is turned off and never runs again. Nothing is deleted, and its versions and checks are kept. Restore it with a PATCH of archived=false.
Required API key scopes
web_analytics:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /aeo_prompts /:idExample response
Status 204 The prompt is archived.
Retrieve aeo prompts
Lists every check of one prompt, newest first, one page at a time. Filter by engine, by prompt version, or with since to see only checks from a point in time on. Each check has the engine's answer, the URLs it cited, the searches it ran and the prompt version it ran. Set include_answer_text=false to leave the answers out and page through history with smaller responses.
Required API key scopes
web_analytics:readPath parameters
- idstring
Query parameters
- enginestring
- include_answer_textbooleanDefault:
true - limitinteger
- offsetinteger
- sincestring
- versioninteger
Response
Example request
GET /api /projects /:project_id /aeo_prompts /:id /checksExample response
Status 200
Retrieve aeo prompts
Gets citation and brand-mention totals per answer engine for one prompt, plus, for the last 30 days in the project's timezone, per-day counts, which engines cite which domains, brand sentiment per engine, and the words of the web searches the engines ran.
Required API key scopes
web_analytics:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /aeo_prompts /:id /statsExample response
Status 200
Retrieve aeo prompts
Lists every version of a prompt's text, newest first. A text edit adds a version, and one of them is current.
Required API key scopes
web_analytics:readPath parameters
- idstring
Example request
GET /api /projects /:project_id /aeo_prompts /:id /versionsExample response
Status 200
Create aeo prompts bulk
Adds prompts to the project's AEO prompt set, or updates the topic and visibility of prompts that already exist. Existing prompts keep their active state. Prompts whose text matches an archived prompt are skipped.
Required API key scopes
web_analytics:writeRequest parameters
- promptsarray
Response
Example request
POST /api /projects /:project_id /aeo_prompts /bulk_importExample response
Status 200
Retrieve aeo prompts
Gets an overview of the project's whole AEO prompt set for the last 'days' days (default 30) in the project's timezone: how many prompts are tracked, how many checks ran, the citation rate and the brand-mention rate, the same counts for the window before it, the current window split per answer engine (Claude, ChatGPT/OpenAI, Exa) and per topic, and the domains the engines cited most.
Required API key scopes
web_analytics:readQuery parameters
- daysintegerDefault:
30
Response
Example request
GET /api /projects /:project_id /aeo_prompts /overviewExample response
Status 200
Retrieve aeo prompts
Gets how often AI answers named the project against its competitors over the last 'days' days (default 30) in the project's timezone, with the same share for the window before, a daily series, and the domains and pages the engines cited most. Competitors are derived from the cited domains.
Required API key scopes
web_analytics:readQuery parameters
- daysintegerDefault:
30
Response
Example request
GET /api /projects /:project_id /aeo_prompts /rankingsExample response
Status 200
Create aeo prompts
Suggests prompts to track for a site. Requires AI data processing approved for the organization. Claude reads the site with web search and writes questions a buyer would ask an AI assistant, each labeled with a topic, a circle, a funnel stage and whether it names the brand. Nothing is saved: import the prompts you keep with bulk_import. Prompts the project already tracks are left out. Returns a pending job right away; poll GET aeo_prompts/suggest/<id>/ until it completes, which takes up to a few minutes.
Required API key scopes
web_analytics:writeRequest parameters
- domainstring
- brandstring
- descriptionstring
- competitorsarray
- topicsarray
- countintegerDefault:
20
Response
Example request
POST /api /projects /:project_id /aeo_prompts /suggestExample response
Status 202
Retrieve aeo prompts suggestion
Gets a prompt suggestion job started with POST aeo_prompts/suggest/. status is pending while Claude works, then completed with the suggestions or failed with an error. Jobs expire an hour after their last update.
Required API key scopes
web_analytics:readPath parameters
- job_idstring
Response
Example request
GET /api /projects /:project_id /aeo_prompts /suggest /:job_idExample response
Status 200
Retrieve aeo prompts
Lists the topics in the project's AEO prompt set, with the number of prompts in each.
Required API key scopes
web_analytics:readExample request
GET /api /projects /:project_id /aeo_prompts /topicsExample response
Status 200
Create web analytics fetch llms
Loads an llms.txt file from a public URL for coverage analysis without saving it.
Required API key scopes
web_analytics:readRequest parameters
- urlstring
Response
Example request
POST /api /projects /:project_id /web_analytics /llms_txtExample response
Status 200
Status 400 The URL is invalid, inaccessible, or does not return an llms.txt file.
Create web analytics fetch llms
Loads an llms.txt file from a public URL for coverage analysis without saving it.
Required API key scopes
web_analytics:readRequest parameters
- urlstring
Response
Example request
POST /api /projects /:project_id /web_analytics /llms_txtExample response
Status 200
Status 400 The URL is invalid, inaccessible, or does not return an llms.txt file.
Retrieve web analytics
The 'Wrapped'-style weekly recap: everything in the weekly digest (visitors, pageviews, sessions, bounce rate, average session duration with period-over-period comparisons, top pages, top sources, and goals) plus a single derived weekly persona and a short list of screenshot-worthy highlights for the period.
Required API key scopes
web_analytics:readQuery parameters
- comparebooleanDefault:
true - daysintegerDefault:
7
Response
Example request
GET /api /projects /:project_id /web_analytics /recapExample response
Status 200
Retrieve web analytics
The 'Wrapped'-style weekly recap: everything in the weekly digest (visitors, pageviews, sessions, bounce rate, average session duration with period-over-period comparisons, top pages, top sources, and goals) plus a single derived weekly persona and a short list of screenshot-worthy highlights for the period.
Required API key scopes
web_analytics:readQuery parameters
- comparebooleanDefault:
true - daysintegerDefault:
7
Response
Example request
GET /api /projects /:project_id /web_analytics /recap




