Skip to content

API Reference

Fresh

Source: BIBLE.md (API Routes section, server.mjs route count 704)

Ghost Engine exposes 704 HTTP routes on port 4700.

Breakdown

GroupCount
Core routes (server.mjs)71
Plugin routes (auto-registered)630
Event routes (SSE)3
Total704

Authentication

All endpoints require:

x-api-key: ghost-engine-key

Configure via GHOST_ENGINE_API_KEY env var.

Base URL

http://localhost:4700

Discover all routes

bash
curl -s http://localhost:4700/routes

Returns the full route list with method, path, and source plugin.

Most-used endpoints

MethodEndpointWhat it does
GET/healthEngine status
GET/routesAll 704 routes
POST/browser/launchLaunch browser with fingerprint
GET/browserList active browsers
POST/ctr/runSingle CTR session
POST/ctr/batchBatch CTR sessions
POST/schedulesCreate scheduled job
GET/schedulesList all schedules
POST/ranks/checkCheck keyword ranking
GET/ranks/reportHistorical rank trend
POST/cascade/runDeploy article across 9 platforms
GET/accounts/army-statusAccount health overview

Sections

  • Browser: launch, navigate, click, type, scroll, vision
  • CTR: run, batch, campaigns
  • Ranks: check, batch, report, history
  • Schedules: CRUD plus autopilot
  • Cascade: run, plan, status
  • Accounts: list, lock, mark, phase, import
  • Health: engine health checks

Response format

All routes return JSON with this shape:

json
{
  "success": true,
  "data": { ... },
  "error": null
}

On error:

json
{
  "success": false,
  "data": null,
  "error": {
    "code": "ROUTE_ERROR",
    "message": "Description",
    "details": { ... }
  }
}

SSE event stream

Real-time events at:

bash
curl http://localhost:4700/events/stream

Emits browser launches, CTR fires, errors, phase advances. Replaces 10-second polling on the dashboard.