Features How it works Integrations Pricing FAQ Sign in Get Started

REST API v1

Read your Ranki.io projects and articles from any HTTP client. Stateless, JSON, X-API-Key auth, 60 requests per minute per key.

Base URL

https://app.ranki.io/api/v1

Authentication

Every request needs an X-API-Key header. Generate a key at app.ranki.io/developer.

curl -H "X-API-Key: rk_live_..." https://app.ranki.io/api/v1/me
const res = await fetch('https://app.ranki.io/api/v1/me', {
  headers: { 'X-API-Key': process.env.RANKI_API_KEY },
});
const me = await res.json();
import os, requests
r = requests.get(
    "https://app.ranki.io/api/v1/me",
    headers={"X-API-Key": os.environ["RANKI_API_KEY"]},
)
me = r.json()
$ch = curl_init('https://app.ranki.io/api/v1/me');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['X-API-Key: '.getenv('RANKI_API_KEY')],
]);
$me = json_decode(curl_exec($ch), true);
Never commit your API key. Treat it like a password — store it in a secret manager (1Password, Bitwarden, Doppler) or your .env. Regenerate immediately if it leaks.

Rate limits

  • Authenticated: 60 requests/minute/key. Returns 429 with Retry-After header when exceeded.
  • Public /scan: 30 requests/minute/IP + per-day cap inside the scanner itself.

Endpoints

GET /me

GET /api/v1/me

Account snapshot — plan, limits, current usage. Use as the canonical "is my key valid" probe.

{
  "id": "99SF91YX5",
  "email": "[email protected]",
  "name": "You",
  "plan": "builder",
  "on_trial": false,
  "subscription_status": "active",
  "limits": {
    "projects": 3,
    "posts_per_day": 3,
    "posts_per_month": 90
  },
  "usage": {
    "projects": 1,
    "posts_this_month": 10
  }
}
curl -H "X-API-Key: rk_live_..." https://app.ranki.io/api/v1/me

GET /projects

GET /api/v1/projects?per_page=25

Paginated list of projects you own. per_page 1–50 (default 25).

{
  "data": [
    {
      "id": "A4630Q9IW",
      "name": "example.com",
      "url": "https://example.com",
      "is_active": true,
      "writing_language": "English",
      "posts_per_day": 1,
      "posts_per_month": 30,
      "created_at": "2026-05-01T12:00:00+00:00",
      "updated_at": "2026-05-31T09:30:00+00:00"
    }
  ],
  "meta": { "current_page": 1, "per_page": 25, "total": 1, "last_page": 1 }
}

GET /projects/{nano_id}

GET /api/v1/projects/A4630Q9IW

Full project detail — includes tone, style, audiences, competitors, generation stats, integration settings.

GET /projects/{nano_id}/articles

GET /api/v1/projects/A4630Q9IW/articles?per_page=25&status=published

Paginated article index for a project. Each row carries everything an agent needs to pick one to fetch in full: id (nano_id), project_id (nano_id), title, slug, status, language, focus_keyword[], parsed toc[], word_count, seo_score, thumbnail_url, scheduled/published/created/updated timestamps. Optional ?status=published|drafted|needs_review|scheduled|title_ready|ready.

GET /projects/{nano_id}/keywords

GET /api/v1/projects/A4630Q9IW/keywords?per_page=50&sort=clicks&dir=desc&min_impressions=10

Paginated Google Search Console keyword list (28-day window). Sort by clicks, impressions, position or ctr; filter via min_impressions. Returns keyword, clicks, impressions, ctr, position, data_date. Requires the project to have GSC connected at app.ranki.io/projects/{id}/gsc.

GET /projects/{nano_id}/gsc

GET /api/v1/projects/A4630Q9IW/gsc

Google Search Console summary for a project: 28-day totals (clicks, impressions, keyword count), top 20 keywords by clicks, top 20 opportunity keywords (position > 10, impressions ≥ 10 — easy wins), and the GSC connection state. Returns gsc_connected, gsc_property, last_synced_at, totals, top_keywords[], opportunities[].

GET /projects/{nano_id}/ai-visibility

GET /api/v1/projects/A4630Q9IW/ai-visibility?per_page=50&cited_only=1&since=2026-05-01

Recorded AI-citation snapshots — which of your tracked topics appeared in ChatGPT, Claude, Perplexity and Google AI Overview SERPs at capture time. Returns keyword, position, source (e.g. gsc, jina), ai_cited (boolean), captured_at, plus a summary { cited, total }.

GET /articles/{nano_id}

GET /api/v1/articles/LISQJJOGF

Full article — content_html, parsed toc, extracted images, normalized focus_keyword array, seo_checklist.

{
  "data": {
    "id": "LISQJJOGF",
    "project_id": "A4630Q9IW",
    "title": "How to get cited by ChatGPT",
    "slug": "how-to-get-cited-by-chatgpt",
    "status": "published",
    "word_count": 1850,
    "seo_score": 87,
    "thumbnail_url": "https://...",
    "language": "en",
    "content_html": "<article>…</article>",
    "focus_keyword": ["AEO", "ChatGPT citation", "answer engine"],
    "image_keyword": "ai search",
    "toc": [
      { "level": 2, "text": "What is AEO", "anchor": "what-is-aeo" },
      { "level": 3, "text": "Why it matters", "anchor": "why-it-matters" }
    ],
    "images": ["https://images.pexels.com/..."],
    "seo_checklist": { "...": "..." },
    "published_at": "2026-05-20T14:00:00+00:00"
  }
}

POST /scan (public, no key)

POST /api/v1/scan

Same scanner the marketing tool uses. IP-rate-limited (no key needed). Body: { "url": "example.com" }.

Errors

401 — missing_api_key

No X-API-Key header on a keyed endpoint.

401 — invalid_api_key

Key is unknown or has been revoked. Generate a new one.

404

Resource doesn't exist or you don't own it. The API never reveals projects/articles owned by other users.

429

Rate limit hit. Wait for Retry-After seconds.