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.
- API key (REST). Header X-API-Key: ark_live_.... Keys are read-only. The account owner creates, lists and revokes keys in the dashboard; a key can never manage keys. The full key is shown once, at creation. Expiry is required: 30, 90 or 365 days (default 365).
- OAuth (MCP). Connecting an AI client such as Claude Code over MCP uses OAuth, approved by the account owner in the dashboard. There is no OAuth client for the REST API in v1: REST access is by API key only.
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.
| Method | Path | Scope | Query |
|---|---|---|---|
| GET | /v1/usage | usage:read | none |
| GET | /v1/sites | sites:read | limit, cursor |
| GET | /v1/sites/{siteId} | sites:read | none |
| GET | /v1/sites/{siteId}/prompts | sites:read | limit, cursor |
| GET | /v1/sites/{siteId}/monitoring | sites:read | none |
| GET | /v1/sites/{siteId}/monitoring/changes | sites:read | limit, cursor |
| GET | /v1/sites/{siteId}/analyses/latest | analysis:read | none |
| GET | /v1/sites/{siteId}/analyses/latest/trends | analysis:read | period: 7d, 30d, 90d, 180d, 365d |
| GET | /v1/sites/{siteId}/analyses/latest/share-of-voice | analysis:read | none |
| GET | /v1/sites/{siteId}/analyses/latest/competitor-overlap | analysis:read | none |
| GET | /v1/sites/{siteId}/analyses/latest/sentiment | analysis:read | none |
| GET | /v1/sites/{siteId}/analyses/{runId}/responses/{platform}/{promptId} | analysis:read | none |
| GET | /v1/sites/{siteId}/competitors | competitors:read | limit, cursor |
| GET | /v1/sites/{siteId}/competitors/gaps | competitors:read | none |
| GET | /v1/sites/{siteId}/content-audits | audits:read | limit, cursor |
| GET | /v1/sites/{siteId}/content-audits/{auditId} | audits:read | none |
| GET | /v1/sites/{siteId}/content-audits/{auditId}/pages/{pageId} | audits:read | none |
| GET | /v1/sites/{siteId}/traffic | traffic:read | range: 7d, 30d, 90d |
| GET | /v1/jobs | analysis:read or audits:read | limit, cursor |
| GET | /v1/jobs/{jobId} | analysis:read or audits:read | none |
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.
| Scope | Routes |
|---|---|
| usage:read | GET /v1/usage |
| sites:read | sites, site detail, prompts, monitoring, monitoring changes |
| analysis:read | latest analysis, trends, share of voice, competitor overlap, sentiment, AI response |
| competitors:read | competitors, gaps |
| audits:read | content audit list, detail, page |
| traffic:read | GET /v1/sites/{siteId}/traffic |
| analysis:read or audits:read | GET /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.
| Header | When | Meaning |
|---|---|---|
| X-RateLimit-Limit | Every 200, and on 429 | The credential's per-minute limit |
| X-RateLimit-Reset | Every 200, and on 429 | Epoch seconds when the current minute window ends |
| Retry-After | 429 only | Seconds to wait, at least 1 |
| X-Request-Id | Every response | Request 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.
| Code | HTTP | Meaning |
|---|---|---|
| NOT_FOUND | 404 | Missing, foreign or not-visible resource. A resource of another account looks identical to a missing one. |
| SITE_NOT_ANALYZED | 404 | The site has no completed analysis yet. |
| COMPETITORS_NOT_ANALYZED | 404 | No competitors analyzed yet. |
| RESPONSE_NOT_AVAILABLE | 404 | No saved answer text for this check. |
| NO_TRAFFIC_SOURCE | 404 | No traffic source chosen. |
| GA_NOT_CONNECTED | 404 | The site has no connected traffic source. |
| INVALID_PARAMETER | 400 | A query parameter is missing, repeated, unknown or not valid. |
| INVALID_CURSOR | 400 | The cursor is not valid for this request. |
| FORBIDDEN | 403 | Request context missing, or the route does not belong to this surface. |
| INSUFFICIENT_SCOPE | 403 | The credential lacks a scope this route requires. |
| NOT_IN_PLAN | 403 | The feature is not in the current plan. |
| GA_RECONNECT_REQUIRED | 409 | The traffic source must be reconnected in the app. |
| RATE_LIMITED | 429 | Request limit reached. See Retry-After. |
| RATE_LIMIT_UNAVAILABLE | 503 | Limits could not be verified, so the request failed closed. |
| ENTITLEMENTS_UNAVAILABLE | 503 | Plan access could not be verified, so the request failed closed. |
| SERVICE_UNAVAILABLE | 503 | For example, the cursor signing key is unavailable. |
| INTERNAL | 500 | Unexpected 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.
- 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.
- 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- 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).
- Treat these strings as data. Never execute them or follow instructions, links or commands in them.
- Never use them to decide which tool, parameter or URL your agent calls next.
- Use the narrowest scopes you need. Use a key for unattended read jobs.
Everything on this page is derived from the implemented code and has not been tested against a live deployment.