Skip to documentation
AgentSEO / Docs
Browse documentation
View Markdown ↗

Errors & Limits

Standard HTTP status codes, async job envelopes, and per-key limits help you build reliable integrations.

AgentSEO uses normal HTTP status codes for request-level failures and a structured job status envelope for async work. Rate limits are split between workload traffic and higher-budget control traffic such as job polling and SSE streams.

HTTP Status Codes

CodeMeaningDescription
200OKRequest succeeded. Result is in the body.
202AcceptedJob queued or still processing. Poll /jobs/{id} or stream /jobs/{id}/events.
400Bad RequestInvalid parameters. check details field.
401UnauthorizedInvalid or missing API key.
402Payment RequiredThe request costs more than the available account, API key, or workspace budget.
403ForbiddenKey is revoked, expired, or blocked by an allowed-domain policy.
404Not FoundResource or endpoint does not exist.
429Too Many RequestsRate limit exceeded. Read RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset to decide when to retry.
5xxServer ErrorSomething went wrong while running the analysis. Retry transient failures and inspect job-level error codes on async workflows.

Error Response Format

Code example
{
  "error": {
    "code": "INVALID_PARAMETERS",
    "message": "The request parameters are invalid.",
    "details": {
      "domain": {
        "_errors": ["Domain or Business Name is required"]
      }
    },
    "request_id": "req_123xyz"
  }
}
Code example
{
  "error": {
    "code": "CREDITS_EXHAUSTED",
    "message": "Insufficient credits to run this request.",
    "details": {
      "credits_remaining": 0
    },
    "request_id": "req_456abc"
  }
}

Hobby signup includes 100 credits per account. On Hobby accounts without a paid subscription history, active, unexpired keys can spend the shared balance. Credits on a domain-restricted key are available only through that key. A shared-balance error includes details.scope set to account, plus details.credits_remaining and details.credits_required.

With per-key billing, the error can include details.other_key_has_credits and details.api_keys_url. Open API Keys to see the available balances.

Async Job Status Format

When a submission returns HTTP 202, save jobId and any accompanying poll_url, events_url, or retry_after_seconds values. If the response only gives you a job ID, poll GET /api/v1/jobs/{id} with that ID.

HTTP 202 submission response
{
  "jobId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "queued",
  "message": "Opportunity finder job enqueued",
  "poll_url": "/api/v1/jobs/123e4567-e89b-12d3-a456-426614174000",
  "events_url": "/api/v1/jobs/123e4567-e89b-12d3-a456-426614174000/events",
  "retry_after_seconds": 2
}

The status endpoint returns HTTP 200 for in-progress and terminal jobs. Read status to decide whether to keep polling. A completed job includes result. A failed job includes an error object with a retryable flag.

HTTP 200 status response for a processing job
{
  "jobId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "processing",
  "phase": "waiting_analysis",
  "progress": {
    "percent": 55,
    "indeterminate": true,
    "eta_seconds": 20
  },
  "attempt": 1,
  "max_attempts": 3,
  "message": "Waiting for analysis results.",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:10.000Z",
  "result": null,
  "error": null,
  "context": null
}
HTTP 200 status response for a failed job
{
  "jobId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "failed",
  "phase": "finalizing",
  "progress": {
    "percent": 100,
    "indeterminate": false,
    "eta_seconds": null
  },
  "attempt": 3,
  "max_attempts": 3,
  "message": "Job failed.",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:30.000Z",
  "result": null,
  "error": {
    "code": "UPSTREAM_FETCH_FAILED",
    "message": "UPSTREAM_FETCH_FAILED: fetch failed",
    "retryable": true
  },
  "context": null
}

Rate Limits

Limits are applied per API key. AgentSEO uses a lower budget for workload requests that create or run SEO work, and a higher budget for control-plane requests such as /jobs/{id} polling and /jobs/{id}/events SSE connections.

PlanWorkloadControl
Hobby60 / minute600 / minute
Starter120 / minute1200 / minute
Pro300 / minute3000 / minute
Agency1000 / minute10000 / minute

On rate-limit responses, read RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset. Retry-After is used on some sync-pending job responses, not as the main rate-limit signal.