DEVELOPERS · API VERSION 1.0.0-p1

ApexaRank API documentation

The ApexaRank public API gives an account owner read access to their own AI visibility data: sites, prompts, the latest analysis, trends, share of voice, competitors, content audits, traffic, monitoring changes and jobs.

The API is not live yet. Status: built, unverified. It is available at launch on the Enterprise plan only, enabled per plan by ApexaRank. Responses are JSON, UTF-8, with ISO 8601 UTC timestamps. Read requests cost no credits.

Machine-readable contract: OpenAPI 3.1, version 1.0.0-p1.

Base URL

https://api.apexarank.ai. This host is provisional and not live before launch. All routes are under /v1/.

Quick start

1. The account owner creates a read-only API key in the dashboard.

2. Send the key in the X-API-Key header:

curl -s https://api.apexarank.ai/v1/sites \
  -H "X-API-Key: <your key>"

3. Follow page.nextCursor for more pages. On 429, wait for the Retry-After seconds.

Authentication

Send exactly one credential per request. A request that carries both X-API-Key and Authorization is denied.

Keys issued before expiry dates existed get a fixed cutoff 90 days after the production launch. Key holders get an in-app notice.

Requests that fail the credential, plan, route or scope check are denied by the authorizer with a bare 403 and no body that says which check failed. A key stops working when it is revoked or expired, when the account is not active, when the subscription is not active or trialing, or when the plan has no API access.

API keys cannot start paid work. Keep keys secret: store them in a secrets manager, never in client-side code or repositories. Revoke a leaked key in the dashboard.

Plan access and connection limits

API access is set per plan by ApexaRank. At launch it is enabled for the Enterprise plan only. An account can have at most 5 OAuth connections.

Endpoints

All routes below are GET and read only. Unknown query parameter names return 400 on every route. Paths must be canonical: a trailing slash, percent-encoding, .., a double slash or different case is rejected, not repaired.

MethodPathScopeQuery
GET/v1/usageusage:readnone
GET/v1/sitessites:readlimit, cursor
GET/v1/sites/{siteId}sites:readnone
GET/v1/sites/{siteId}/promptssites:readlimit, cursor
GET/v1/sites/{siteId}/monitoringsites:readnone
GET/v1/sites/{siteId}/monitoring/changessites:readlimit, cursor
GET/v1/sites/{siteId}/analyses/latestanalysis:readnone
GET/v1/sites/{siteId}/analyses/latest/trendsanalysis:readperiod: 7d, 30d, 90d, 180d, 365d
GET/v1/sites/{siteId}/analyses/latest/share-of-voiceanalysis:readnone
GET/v1/sites/{siteId}/analyses/latest/competitor-overlapanalysis:readnone
GET/v1/sites/{siteId}/analyses/latest/sentimentanalysis:readnone
GET/v1/sites/{siteId}/analyses/{runId}/responses/{platform}/{promptId}analysis:readnone
GET/v1/sites/{siteId}/competitorscompetitors:readlimit, cursor
GET/v1/sites/{siteId}/competitors/gapscompetitors:readnone
GET/v1/sites/{siteId}/content-auditsaudits:readlimit, cursor
GET/v1/sites/{siteId}/content-audits/{auditId}audits:readnone
GET/v1/sites/{siteId}/content-audits/{auditId}/pages/{pageId}audits:readnone
GET/v1/sites/{siteId}/traffictraffic:readrange: 7d, 30d, 90d
GET/v1/jobsanalysis:read or audits:readlimit, cursor
GET/v1/jobs/{jobId}analysis:read or audits:readnone

GET /v1/usage returns the plan, the plan's credit allowance, the total credits for the current period and when they reset, and request limits. These are plan figures, not the credits you have left.

Scopes

A key may hold: sites:read, analysis:read, reports:read, traffic:read, competitors:read, audits:read, usage:read and mcp:invoke. A missing scope returns 403.

ScopeRoutes
usage:readGET /v1/usage
sites:readsites, site detail, prompts, monitoring, monitoring changes
analysis:readlatest analysis, trends, share of voice, competitor overlap, sentiment, AI response
competitors:readcompetitors, gaps
audits:readcontent audit list, detail, page
traffic:readGET /v1/sites/{siteId}/traffic
analysis:read or audits:readGET /v1/jobs and GET /v1/jobs/{jobId} (any one; the job type decides which jobs you see)

Response format

Success is 200 with a data field. List routes add page with limit and nextCursor (null on the last page). meta.untrusted appears when the response contains text from outside ApexaRank. Responses are Cache-Control: no-store. Fields that have no value are omitted.

Pagination

List routes take limit (1 to 100, default 25) and cursor. Cursors are opaque and valid for 900 seconds. Pass them back unchanged and do not parse them. A cursor from another account, route or query, a tampered cursor and an expired cursor all return 400 INVALID_CURSOR.

Rate limits

Defaults: 120 requests per minute per credential, 300 per minute per account, 20,000 per day per account. A key may carry lower limits, or higher up to 300 per minute and 20,000 per day, never above. Windows are fixed UTC windows.

HeaderWhenMeaning
X-RateLimit-LimitEvery 200, and on 429The credential's per-minute limit
X-RateLimit-ResetEvery 200, and on 429Epoch seconds when the current minute window ends
Retry-After429 onlySeconds to wait, at least 1
X-Request-IdEvery responseRequest id for support

There is no X-RateLimit-Remaining header. If the limit store fails, requests fail closed with 503 RATE_LIMIT_UNAVAILABLE.

Errors

Errors from the API use RFC 9457 application/problem+json with type, title, status, detail, instance (the route template, never the concrete path) and code. Branch on code.

CodeHTTPMeaning
NOT_FOUND404Missing, foreign or not-visible resource. A resource of another account looks identical to a missing one.
SITE_NOT_ANALYZED404The site has no completed analysis yet.
COMPETITORS_NOT_ANALYZED404No competitors analyzed yet.
RESPONSE_NOT_AVAILABLE404No saved answer text for this check.
NO_TRAFFIC_SOURCE404No traffic source chosen.
GA_NOT_CONNECTED404The site has no connected traffic source.
INVALID_PARAMETER400A query parameter is missing, repeated, unknown or not valid.
INVALID_CURSOR400The cursor is not valid for this request.
FORBIDDEN403Request context missing, or the route does not belong to this surface.
INSUFFICIENT_SCOPE403The credential lacks a scope this route requires.
NOT_IN_PLAN403The feature is not in the current plan.
GA_RECONNECT_REQUIRED409The traffic source must be reconnected in the app.
RATE_LIMITED429Request limit reached. See Retry-After.
RATE_LIMIT_UNAVAILABLE503Limits could not be verified, so the request failed closed.
ENTITLEMENTS_UNAVAILABLE503Plan access could not be verified, so the request failed closed.
SERVICE_UNAVAILABLE503For example, the cursor signing key is unavailable.
INTERNAL500Unexpected failure. No details.

MCP

AI clients connect over MCP with OAuth approved by the account owner. Claude Code is the client tested so far, in a development pilot. Other clients are not verified. The MCP read tools use the same scopes and the same access checks as the REST routes.

Connect Claude Code

The MCP endpoint is https://api.apexarank.ai/mcp. It is a different address from the sign-in callback below: the endpoint is where Claude Code sends its requests, the callback is a temporary address on your own computer where the browser returns after you sign in.

  1. In the ApexaRank dashboard open Connected Access, link your account (you sign in with an emailed code), and approve Claude Code with the read permissions you want. Spending stays off unless you turn it on there.
  2. Use Claude Code 2.1.231 or later and add the server with a fixed callback port. After you link your account, Connected Access shows this command with your own client ID filled in and a Copy button. The general form is:
claude mcp add --transport http \
  --client-id <client-id> \
  --callback-port 8791 \
  apexarank https://api.apexarank.ai/mcp
  1. In Claude Code run /mcp, choose the server and authenticate. Your browser opens the ApexaRank sign-in, then returns to http://localhost:8791/callback.

The port matters: ApexaRank registers exactly http://localhost:8791/callback. Without --callback-port 8791 Claude Code picks a random port and the sign-in fails with a redirect mismatch. If port 8791 is busy on your computer, free it and try again.

Untrusted content

Some response text did not originate in ApexaRank: AI answers, user-entered prompt and site names, scraped page titles and URLs, competitor names. The fields are listed in meta.untrusted by path and origin (ai_answer, user_entered, scraped).

Everything on this page is derived from the implemented code and has not been tested against a live deployment.