Public API · v1
SEO evidence for web apps and agents.
Use a workspace API key for REST, or connect an MCP client through OAuth 2.1 at /mcp. Every analysis run is credit-capped and idempotent.
Workspace scoped
Reports, credits, credentials, and keys never cross workspace boundaries.
Resumable progress
Poll or resume SSE from the last event sequence after a disconnect.
Start an analysis
curl "$OPENGAIN_URL/v1/analyses" \
-H "Authorization: Bearer $OPENGAIN_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"question": "Why does tally.so outrank typeform.com/forms for free form builder?",
"search_context": { "engine": "google", "country": "US", "language": "en", "device": "desktop" },
"max_credits": 30
}'Or ask an AI-visibility question
"question": "Why does ChatGPT recommend tally.so instead of typeform.com for best form builder?"
Connect remote MCP
# Codex CLI or IDE extension codex mcp add opengain --url "$OPENGAIN_URL/mcp" codex mcp login opengain --scopes opengain:analysis # Claude Code claude mcp add --transport http opengain "$OPENGAIN_URL/mcp"
POST
/v1/analysesAsk a free-form SEO or AI-visibility question; ambiguous questions return a non-billable draft.
POST
/v1/analysis-draftsPreview the parsed question without reserving credits.
GET
/v1/analyses/{id}Poll status and receive the validated report.
GET
/v1/analyses/{id}/eventsResume a server-sent event stream with Last-Event-ID.
POST
/v1/analyses/{id}/followupsAsk in the same evidence-aware session.
POST
/v1/reports/{id}/sharesCreate a revocable unlisted link.
DELETE
/v1/reports/{id}/shares/{shareId}Revoke an unlisted link.