Skip to content
Documentation menu

API reference

Site health

What AI crawlers get when they fetch your site, and how your pages compare with the pages engines cite.

GET /brands/{brandId}/crawl-truth

What AI crawlers get when they fetch your site.

About this routeDetail
ReturnscapturedAt; probes: per AI crawler user agent, what your site served it next to a normal visitor; readability: per page, the words a crawler reads without running JavaScript against the rendered page; robots: the robots.txt rule for each crawler.
SeatAny seat's key, a viewer's included.
PlanEvery plan.
Rate limitNone on this route.
Engine budgetNothing this route does is metered.
ParameterTypeWhat it is
brandId (path, required)uuidA brand id from GET /brands.
curl "https://api.ansengine.co/brands/{brandId}/crawl-truth" \
  -H "Authorization: Bearer ak_your_key"
StatusWhen
200capturedAt; probes: per AI crawler user agent, what your site served it next to a normal visitor; readability: per page, the words a crawler reads without running JavaScript against the rendered page; robots: the robots.txt rule for each crawler.
400An id in the path is not a valid id.
401No valid API key was sent.
404No such brand for this key. A brand in another workspace and a client outside this seat's view answer the same way, so a 404 never confirms that an id exists.

POST /brands/{brandId}/crawl-truth

Queue the crawler probe and the readability capture.

About this routeDetail
Returnsqueued: true and jobId. The work runs in the background; read the matching GET route for the result.
SeatA key on a member seat or above. A viewer's key is refused with 403.
PlanEvery plan.
Rate limit30 requests a minute for the workspace, counted across every write that takes this limit, the console's included. A seat limited to named clients gets 15 of its own.
Engine budgetChecked before the work starts: 429 once the workspace's spend safety limit is reached.
ParameterTypeWhat it is
brandId (path, required)uuidA brand id from GET /brands.
curl -X POST "https://api.ansengine.co/brands/{brandId}/crawl-truth" \
  -H "Authorization: Bearer ak_your_key"
StatusWhen
200queued: true and jobId. The work runs in the background; read the matching GET route for the result.
400An id in the path is not a valid id.
401No valid API key was sent.
403The key belongs to a viewer seat, which can read and cannot write.
404No such brand for this key. A brand in another workspace and a client outside this seat's view answer the same way, so a 404 never confirms that an id exists.
429Over the rate limit: 30 requests a minute for the workspace, counted across every write that takes this limit, the console's included. A seat limited to named clients gets 15 of its own. The Retry-After header says how many seconds to wait. Or the workspace's spend safety limit is reached: the body says so as budget_cap_reached, and spend resumes next cycle.

GET /brands/{brandId}/content/drafts/{draftId}/content-score

A Studio draft's content score: how it covers what the pages AI cited for its brief's prompt cover.

Note

A comparison with the pages AI cited for this prompt, not a forecast of whether a page gets cited. Built from stored answers and stored page reads: a page not read yet is said to be unread and is never fetched for this. Fewer than 3 read pages give no score.

About this routeDetail
Returnsstate (scored, no_prompt or too_few_pages) and sentence; score: total from 0 to 100, each part with its weight, points, count and lines, and the shared topics with whether the draft covers each; reference: the pages cited in the last 30 days, each with its models, answer count and read state; weights; revisions, each scored on read.
SeatAny seat's key, a viewer's included.
PlanEvery plan.
Rate limitNone on this route.
Engine budgetNothing this route does is metered.
ParameterTypeWhat it is
brandId (path, required)uuidA brand id from GET /brands.
draftId (path, required)uuidThe draft id.
curl "https://api.ansengine.co/brands/{brandId}/content/drafts/{draftId}/content-score" \
  -H "Authorization: Bearer ak_your_key"
StatusWhen
200state (scored, no_prompt or too_few_pages) and sentence; score: total from 0 to 100, each part with its weight, points, count and lines, and the shared topics with whether the draft covers each; reference: the pages cited in the last 30 days, each with its models, answer count and read state; weights; revisions, each scored on read.
400An id in the path is not a valid id.
401No valid API key was sent.
404No such brand or draft for this key.

GET /brands/{brandId}/content/briefs/{briefId}/cited-pages

What the pages AI cited for a brief's prompt cover.

About this routeDetail
ReturnsbriefId; reference (null when the brief names no prompt): the pages cited in the last 30 days with their models, answer counts and read state, and the topics two or more read pages share; sentence when there is nothing to compare.
SeatAny seat's key, a viewer's included.
PlanEvery plan.
Rate limitNone on this route.
Engine budgetNothing this route does is metered.
ParameterTypeWhat it is
brandId (path, required)uuidA brand id from GET /brands.
briefId (path, required)uuidThe brief id.
curl "https://api.ansengine.co/brands/{brandId}/content/briefs/{briefId}/cited-pages" \
  -H "Authorization: Bearer ak_your_key"
StatusWhen
200briefId; reference (null when the brief names no prompt): the pages cited in the last 30 days with their models, answer counts and read state, and the topics two or more read pages share; sentence when there is nothing to compare.
400An id in the path is not a valid id.
401No valid API key was sent.
404No such brand or brief for this key.

GET /brands/{brandId}/onpage

The site retrievability report, findings ordered by the traffic of the page each sits on.

About this routeDetail
Returnsreport (null before the first crawl), weighted and headline. Findings are ordered by the Search Console traffic of their page when Search Console is connected; a page with no measured traffic reads null, never zero.
SeatAny seat's key, a viewer's included.
PlanEvery plan.
Rate limitNone on this route.
Engine budgetNothing this route does is metered.
ParameterTypeWhat it is
brandId (path, required)uuidA brand id from GET /brands.
curl "https://api.ansengine.co/brands/{brandId}/onpage" \
  -H "Authorization: Bearer ak_your_key"
StatusWhen
200report (null before the first crawl), weighted and headline. Findings are ordered by the Search Console traffic of their page when Search Console is connected; a page with no measured traffic reads null, never zero.
400An id in the path is not a valid id.
401No valid API key was sent.
404No such brand for this key. A brand in another workspace and a client outside this seat's view answer the same way, so a 404 never confirms that an id exists.

POST /brands/{brandId}/onpage

Queue the site crawl.

Note

The page cap is set before the crawl starts, and it is the cost cap.

About this routeDetail
Returnsqueued: true and jobId. The work runs in the background; read the matching GET route for the result.
SeatA key on a member seat or above. A viewer's key is refused with 403.
PlanEvery plan.
Rate limit30 requests a minute for the workspace, counted across every write that takes this limit, the console's included. A seat limited to named clients gets 15 of its own.
Engine budgetChecked before the work starts: 429 once the workspace's spend safety limit is reached.
ParameterTypeWhat it is
brandId (path, required)uuidA brand id from GET /brands.
curl -X POST "https://api.ansengine.co/brands/{brandId}/onpage" \
  -H "Authorization: Bearer ak_your_key"
StatusWhen
200queued: true and jobId. The work runs in the background; read the matching GET route for the result.
400An id in the path is not a valid id.
401No valid API key was sent.
403The key belongs to a viewer seat, which can read and cannot write.
404No such brand for this key. A brand in another workspace and a client outside this seat's view answer the same way, so a 404 never confirms that an id exists.
429Over the rate limit: 30 requests a minute for the workspace, counted across every write that takes this limit, the console's included. A seat limited to named clients gets 15 of its own. The Retry-After header says how many seconds to wait. Or the workspace's spend safety limit is reached: the body says so as budget_cap_reached, and spend resumes next cycle.

POST /page-audits/{auditId}/share

Make a link to one page's audit that anyone with it can open, replacing the link it had.

Note

auditId is a page's id from the site audit. One live link per audit: sharing again ends the old link. expiresInDays is 7, 30 or 90, or null for a link that never expires. An admin revokes a link in the console.

About this routeDetail
Returnstoken (shown once and never stored: only its hash is kept), path (the link's path on the report site, /report/page/{token}) and share (prefix, createdAt, expiresAt, expired, lastOpenedAt). The link opens that page's audit under the workspace's white label, and nothing else of the workspace.
SeatA key on a member seat or above. A viewer's key is refused with 403.
PlanEvery plan.
Rate limit30 requests a minute for the workspace, counted across every write that takes this limit, the console's included. A seat limited to named clients gets 15 of its own.
Engine budgetNothing this route does is metered.
ParameterTypeWhat it is
auditId (path, required)uuidThe audit id.

The body is JSON. Its schema, taken from the route's own validation:

{
  "type": "object",
  "properties": {
    "expiresInDays": {
      "anyOf": [
        {
          "type": "number",
          "const": 7
        },
        {
          "type": "number",
          "const": 30
        },
        {
          "type": "number",
          "const": 90
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "expiresInDays"
  ],
  "additionalProperties": false
}
curl -X POST "https://api.ansengine.co/page-audits/{auditId}/share" \
  -H "Authorization: Bearer ak_your_key" \
  -H "Content-Type: application/json" \
  --data @body.json
StatusWhen
200token (shown once and never stored: only its hash is kept), path (the link's path on the report site, /report/page/{token}) and share (prefix, createdAt, expiresAt, expired, lastOpenedAt). The link opens that page's audit under the workspace's white label, and nothing else of the workspace.
400auditId is not a valid id, or the body does not match the schema.
401No valid API key was sent.
403The key belongs to a viewer seat, which can read and cannot write.
404No such page audit for this key. An audit of a client outside this seat's view answers the same way.
429Over the rate limit: 30 requests a minute for the workspace, counted across every write that takes this limit, the console's included. A seat limited to named clients gets 15 of its own. The Retry-After header says how many seconds to wait.

POST /brands/{brandId}/onpage/benchmark

Compare one of your pages with the pages engines were seen citing, on the same checks.

Note

The page must be on one of the brand's own domains. Fetching pages costs no engine budget, so the route is rate limited instead.

About this routeDetail
Returnsbenchmark (your score, the cited pages' median score, and the gaps and strengths found) and headline.
SeatA key on a member seat or above. A viewer's key is refused with 403.
PlanEvery plan.
Rate limit30 requests a minute for the workspace, counted across every write that takes this limit, the console's included. A seat limited to named clients gets 15 of its own.
Engine budgetNothing this route does is metered.
ParameterTypeWhat it is
brandId (path, required)uuidA brand id from GET /brands.

The body is JSON. Its schema, taken from the route's own validation:

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "maxLength": 500,
      "format": "uri"
    },
    "limit": {
      "type": "integer",
      "minimum": 3,
      "maximum": 8
    }
  },
  "required": [
    "url"
  ]
}
curl -X POST "https://api.ansengine.co/brands/{brandId}/onpage/benchmark" \
  -H "Authorization: Bearer ak_your_key" \
  -H "Content-Type: application/json" \
  --data @body.json
StatusWhen
200benchmark (your score, the cited pages' median score, and the gaps and strengths found) and headline.
400An id in the path is not valid, the body has no valid url, or the url is not on one of the brand's domains.
401No valid API key was sent.
403The key belongs to a viewer seat, which can read and cannot write.
404No such brand for this key. A brand in another workspace and a client outside this seat's view answer the same way, so a 404 never confirms that an id exists.
429Over the rate limit: 30 requests a minute for the workspace, counted across every write that takes this limit, the console's included. A seat limited to named clients gets 15 of its own. The Retry-After header says how many seconds to wait.
502Your page could not be fetched.