API Documentation

REST JSON API. No auth required for the public endpoints. Built for programmatic access to LeanForge keyword data.

11

Endpoints

JSON

Content type

100/15m

Free rate limit (per IP)

Base URL

https://lean-forge.net/api/v1

Endpoints

GET
/api/v1/keywords

List all keywords with pagination

GET
/api/v1/keywords/trending

Trending keywords (rising direction)

GET
/api/v1/keywords/:slug

Get a single keyword with trend data

GET
/api/v1/categories

List all categories

GET
/api/v1/categories/:slug

Get a single category with its keywords

GET
/api/v1/trends

List trend data points, filterable

GET
/api/v1/trends/daily

Google Trends daily trends

GET
/api/v1/trends/compare

Compare 2-5 keywords side by side

GET
/api/v1/trends/:keywordId/timeline

90-day timeline for a keyword

GET
/health

Liveness probe (Railway healthcheck)

GET
/health/deep

Deep probe: DB + Redis + uptime

Example: fetch trending

curl https://lean-forge.net/api/v1/keywords/trending?limit=10

{
  "data": [
    {
      "id": "...",
      "term": "AI code review",
      "slug": "ai-code-review",
      "category": "ai",
      "trendScore": 87,
      "velocity": 23.4,
      "direction": "rising",
      "searchVolume": 12400,
      "difficulty": 42,
      "cpc": 1.85,
      "source": "google_trends",
      "isActive": true
    }
  ],
  "_meta": {
    "total": 80,
    "limit": 10,
    "offset": 0,
    "regent_cta": {
      "headline": "Ready to rank for this keyword?",
      "url": "https://seo-ai-regent.com/?ref=keyword-trend-api"
    }
  }
}

Rate limiting

The public API is rate-limited to 100 requests per 15 minutes per IP. Response headers include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. If you need a higher limit, the Starter and Growth plans raise it to 1,000 and 10,000 requests per 15 minutes.