Developer docs

API & MCP reference

All endpoints require Clerk auth (or ?bypass=1 in local dev). MCP tokens are issued from the Team page and sent via Authorization: Bearer.

Run keyword research

POST

Expand and cluster a list of seed keywords. Returns clusters, SERP data, AI Overview presence, and a draft brief.

/api/research/run
{
  "projectId": "uuid",
  "keywords": ["content marketing", "b2b seo", "content brief"]
}

Trigger a competitor monitor run

POST

Detect ranking changes for active competitors. Requires Pro or higher.

/api/monitor/run
{
  "projectId": "uuid",
  "competitorIds": ["uuid"]
}

Generate a content gap matrix

POST

Compare your rank vs a competitor for a list of seed keywords.

/api/gap/analyze
{
  "projectId": "uuid",
  "competitorDomain": "notion.so",
  "seedKeywords": ["content calendar", "saas seo"]
}

Export a brief as white-label PDF

GET

Returns a PDF (SVG-rendered) with outline, competitor analysis, and AI Overview flag.

/api/briefs/{id}/pdf
GET /api/briefs/123e4567-e89b-12d3-a456-426614174000/pdf

Manage team seats

POST

Add or remove seats and adjust roles. Pro grants 3, Agency 10, Enterprise 50.

/api/team/seats
{
  "memberUserId": "user_xxx",
  "role": "editor"
}

MCP server

Mounted at /api/mcp. Use JSON-RPC 2.0 over HTTP POST, or open a Server-Sent Events stream with Accept: text/event-stream for keep-alive pings.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "serp.lookup",
    "arguments": { "keyword": "content marketing for b2b saas" }
  }
}

serp.lookup

Fetch the top 10 SERP results for a keyword plus AI Overview sources.

{ "keyword": "b2b saas seo", "location": "United States" }

audit.domain

Run a Tech Audit Lite (cheerio) on a domain.

{ "domain": "acme.com", "maxPages": 6 }