Skip to content

Ranks API

Fresh

Source: BIBLE.md (Phase 10 rank-tracker routes), bible/campaigns.md (Tracking rankings)

Rank tracking endpoints: check, batch, report, history.

Routes

MethodRouteBody
GET/ranks-
POST/ranks/check{ keyword, domain, state }
POST/ranks/batch{ checks: [...], state }
GET/ranks/report?keyword=...&domain=...&days=30

Single rank check

bash
curl -X POST http://localhost:4700/ranks/check \
  -H "Content-Type: application/json" \
  -H "x-api-key: ghost-engine-key" \
  -d '{
    "keyword": "junk removal dallas",
    "domain": "journeyjunkremoval.com",
    "state": "TX"
  }'

Response:

json
{
  "success": true,
  "keyword": "junk removal dallas",
  "domain": "journeyjunkremoval.com",
  "locations": [
    { "location": "Dallas, TX", "rank": 7 },
    { "location": "Fort Worth, TX", "rank": 12 },
    { "location": "Plano, TX", "rank": 9 }
  ],
  "summary": {
    "totalLocations": 3,
    "ranked": 3,
    "unranked": 0,
    "avgRank": 9.3,
    "bestRank": 7,
    "worstRank": 12,
    "bestLocation": "Dallas, TX"
  }
}

Batch check

bash
curl -X POST http://localhost:4700/ranks/batch \
  -H "Content-Type: application/json" \
  -d '{
    "checks": [
      { "keyword": "junk removal dallas", "domain": "client.com" },
      { "keyword": "junk hauling dallas", "domain": "client.com" }
    ],
    "state": "TX"
  }'

Historical report

bash
curl "http://localhost:4700/ranks/report?keyword=junk+removal+dallas&domain=client.com&days=30"

Response:

json
{
  "keyword": "junk removal dallas",
  "domain": "client.com",
  "trend": "improving",
  "delta": -3,
  "from": 10,
  "to": 7,
  "dataPoints": 28,
  "periodDays": 30
}

Trend: improving, declining, stable.