API and MCP documentation

Opcit analyzes pages and sites for search engines (SEO), answer engines (AEO), generative AI (GEO), search experience (SXO) and AI agents (AIO). Use it from code through the REST API, or from an AI assistant through the MCP server. Both need an active plan.

Authentication and limits

REST API

Base URL: https://opcit.ai/v1. Machine-readable description: openapi.json (OpenAPI 3.1).

# Start a page analysis and wait up to 30 s for a summary
curl -X POST "https://opcit.ai/v1/analyses?wait=30&detail=summary" \
  -H "Authorization: Bearer $OPCIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/"}'

# Poll a running analysis
curl "https://opcit.ai/v1/analyses/$ID?detail=summary" -H "Authorization: Bearer $OPCIT_API_KEY"

POST /analyses Start an analysis

  • wait (query): Page analyses: wait up to this many seconds (0–30) and return the result inline if it finishes in time.
  • detail (query): How much of a finished report to return: `full` (default), `summary` (scores, summary, top fixes), `failing`, `category:<SEO|AEO|GEO|SXO|AIO>` or `metric:<ID>`.
  • Idempotency-Key (header): Retrying with the same key and body returns the analysis the first request started (24 hours).

GET /analyses/{id} Status, progress or result

While running: status and progress. When finished: the report (or the failure). The result is deleted 10 minutes after the first successful retrieval.

  • detail (query): How much of a finished report to return: `full` (default), `summary` (scores, summary, top fixes), `failing`, `category:<SEO|AEO|GEO|SXO|AIO>` or `metric:<ID>`.

DELETE /analyses/{id} Cancel a running analysis or delete its result now

    GET /usage Credits used this billing period

    Credits used since the period started, the included credits and the spend cap. Aggregates only.

    GET /metrics The metric catalog

    • q (query): Text in the ID, name or description

    GET /metrics/{id} One metric with its rubric

      Errors

      Errors are RFC 9457 problem details (application/problem+json). The type ends with one of these codes:

      invalid_request
      400: the body or a parameter is invalid; `errors` lists the fields.
      unauthorized
      401: missing, invalid or revoked API key.
      no_active_plan
      403: the account has no active plan.
      not_found
      404: unknown or expired analysis, or another account's.
      not_in_report
      404: the requested category or metric isn't in this report.
      spend_cap_reached
      402: the account reached its spend cap this billing period; raise it in the dashboard.
      request_in_progress
      409: a request with the same Idempotency-Key is still running.
      blocked_target
      422: the URL isn't a public http(s) address on port 80 or 443.
      idempotency_key_reused
      422: the Idempotency-Key was used with a different body.
      rate_limited
      429: more than the per-key request limit; see Retry-After.
      too_many_jobs
      429: the account already has the maximum analyses running.
      internal_error
      500: our side failed; retry.
      unavailable
      503: temporarily unavailable; retry after Retry-After.

      MCP server

      URL: https://opcit.ai/mcp (Streamable HTTP). Clients that support OAuth sign you in to Opcit; others can send an API key as a bearer token. Setup snippets for Claude, ChatGPT, Cursor and VS Code are in the dashboard.

      analyze_page
      Analyze one page (URL or HTML); waits about 50 seconds and returns scores, coverage, the summary and top fixes.
      analyze_site
      Start a site analysis; returns an analysisId and an estimate.
      get_analysis
      Progress or result. detail: summary (default), failing, category:<X>, metric:<ID> or full.
      list_metrics
      Search the metric catalog by category, phase or text.
      explain_metric
      One metric's rubric, why it matters, how to fix it and its source.

      Resource: opcit://ruleset/{version}, the full catalog. Prompt: fix_plan, which turns failing metrics into an implementation plan.