Ranktracker.id API Gateway
Get API Key

Ranktracker.id API Gateway Documentation

Official developer, CMS, and AI Agent reference for the Ranktracker.id API Gateway. Seamlessly integrate structured web search scraping, automated bulk article creation, local GEO article generation & synchronization, and Google Maps B2B lead harvesting into your external systems and autonomous AI agents.

🔌 Import to AI Agent: OpenAPI Schema (openapi.json) Manage Keys in Dashboard

Introduction & Architecture

Ranktracker.id provides a unified API Gateway designed specifically for modern automated workflows: from WordPress blog automation and CMS sync to autonomous AI agents (LangChain, CrewAI, AutoGPT, and custom agents).

💡 AI & CMS Optimized: All endpoints return clean, structured JSON and clean Markdown without bloated HTML tag wrappers. This saves up to 80% on prompt token consumption and enables direct ingestion by LLMs and content publishing pipelines.

Authentication

All API requests must pass your API key as a Bearer token in the standard HTTP Authorization header:

Authorization: Bearer rt_live_YOUR_API_KEY

API Keys can be generated in your API Gateway Dashboard. Each key begins with rt_live_. Treat this token with the same confidentiality as a password.

API Scopes & Granular Access Control

To uphold the Principle of Least Privilege, every API key created in Ranktracker.id is bound to specific service scopes. When you distribute an API key to an external website (such as a client WordPress site) or an AI agent, you can limit exactly what that key can access.

Scope IDService NameEndpoints UnlockedPrimary Use Case
geoGEO AI Article/api/v1/geo/*WordPress plugin & external CMS to generate and sync localized GEO articles.
bulkBulk Article Creator/api/v1/bulk/articlesAutomated bulk content creation, auto-blogging pipelines, and content scheduling.
searchSearch Engine AI/api/v1/searchAI search engines, autonomous research agents, and real-time SERP crawlers.
mapsGoogle Maps & Leads/api/v1/maps/*B2B lead generation, local business scraping, and website contact discovery.
allFull AccessAll Endpoints (*)Primary developer key with unrestricted access across all gateway services.
403 Forbidden Enforcement: If an API key configured only for geo attempts to call /api/v1/search, the Gateway immediately denies the request with:
{
  "success": false,
  "error": {
    "message": "This API key does not have permission for 'search'.",
    "code": "FORBIDDEN_PERMISSION"
  }
}

Billing & Credit System

API Gateway uses your unified account Credit Balance. Every successful request deducts credits automatically from your user account. Read operations and key management endpoints are always free.

EndpointRequired ScopeDescriptionCredit Cost
/api/v1/searchsearchStructured Google search results for AI2 credits
/api/v1/geo/articlesgeoSingle researched GEO-optimized SEO articleDynamic (100 - 300 credits)
/api/v1/bulk/articlesbulkBulk article creation via automated outline pipelineDynamic (25 - 50+ credits/art)
/api/v1/geo/projectsgeoList user projects for WordPress dropdownsFree
/api/v1/geo/articles/syncgeoSync ready/draft articles to WordPress or CMSFree
/api/v1/maps/scrapemapsScrape business details from Google Maps6 credits
/api/v1/maps/emailmapsExtract emails & phone numbers from website5 credits
/api/v1/usageanyCheck credit balance & API call statisticsFree

Rate Limiting

To ensure cluster reliability, active API keys are rate-limited to **120 requests per minute**. Exceeding this limit returns HTTP `429 Too Many Requests` with a `Retry-After` header.

POST

/api/v1/geo/articles

Scope: geo

Generates a highly researched SEO article targeting local and search intent. Under the hood, this endpoint crawls Google reference articles for live context, then prompts the selected model to construct a clean Markdown article.

Request Body Parameters

  • keyword (string, required): Focus keyword of the article.
  • language (string, optional): Language of generation. Default: `Indonesia`.
  • aiModel (string, optional): Choose `"Claude Sonnet 4.6"`, `"Claude Opus 5"`, or `"Gemini Flash 3.5"`. Default: `"Gemini Flash 3.5"`.
  • wordCount (number, optional): Target length (500, 1000, 2000, 3000). Default: `1000`.
  • customInstructions (string, optional): Formatting/tone guidelines.

cURL Sample

curl -X POST https://ranktracker.id/api/v1/geo/articles \
  -H "Authorization: Bearer rt_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "keyword": "rekomendasi laptop programming 2026",
    "language": "Indonesia",
    "aiModel": "Gemini Flash 3.5",
    "wordCount": 1000,
    "customInstructions": "Casual tone, bullet points comparison."
  }'
POST

/api/v1/bulk/articles

Scope: bulk

Generates multiple SEO articles in bulk via automated topic outline planning and live search intelligence. Ideal for auto-blogging pipelines, scheduled content distribution, and programmatic SEO.

Request Body Parameters

  • keywords (string[], required): Array of target keywords (e.g. `["jasa seo jakarta", "belajar seo pemula"]`). Single `keyword` string also accepted.
  • articleCount (number, optional): Maximum articles to generate in this batch (clamped 1-5 per request). Default: `1`.
  • wordCount (number, optional): Target word count per article (500, 1000, 1500, 2000). Default: `1000`.
  • language (string, optional): Language of generation. Default: `"Indonesia"`.
  • toneOfVoice (string, optional): Content style (e.g. `"Casual Educational"`, `"Professional Informative"`, `"Authoritative"`).
  • spintaxEnabled (boolean, optional): Whether to generate nested spin syntax. Default: `false`.
  • sectionCount (number, optional): Target number of H2 sections. Default: `5`.
  • aiModel (string, optional): AI model to use (default: `"Claude Opus 5"`).

cURL Sample

curl -X POST https://ranktracker.id/api/v1/bulk/articles \
  -H "Authorization: Bearer rt_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "keywords": ["jasa seo jakarta", "belajar seo pemula"],
    "articleCount": 2,
    "wordCount": 1000,
    "language": "Indonesia",
    "toneOfVoice": "Casual Educational",
    "spintaxEnabled": false,
    "aiModel": "Claude Opus 5"
  }'
GET

/api/v1/geo/articles/sync & /api/v1/geo/projects

Scope: geo

Used by external CMS integrations and the official Ranktracker WordPress Plugin to list connected projects and automatically pull newly generated articles for instant publishing.

1. Fetch Connected Projects

curl -X GET https://ranktracker.id/api/v1/geo/projects \
  -H "Authorization: Bearer rt_live_YOUR_API_KEY"

2. Poll & Synchronize Articles Ready for Publishing

curl -X GET "https://ranktracker.id/api/v1/geo/articles/sync?status=ready&limit=10" \
  -H "Authorization: Bearer rt_live_YOUR_API_KEY"
POST

/api/v1/maps/scrape

Scope: maps

Searches and extracts localized business listings from Google Maps, including coordinates, categories, ratings, addresses, and website links.

Request Body Parameters

  • keyword (string, required): Search query (e.g. `bengkel mobil bekasi`).
  • gl (string, optional): Country code filter. Default: `id`.
  • hl (string, optional): Language code filter. Default: `id`.
  • page (number, optional): Page offset for pagination. Default: `1`.

cURL Sample

curl -X POST https://ranktracker.id/api/v1/maps/scrape \
  -H "Authorization: Bearer rt_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "keyword": "bengkel mobil bekasi",
    "gl": "id",
    "hl": "id",
    "page": 1
  }'
POST

/api/v1/maps/email

Scope: maps

Extracts email addresses and telephone/WhatsApp numbers from a business website using rotating web scraping with automatic Firecrawl fallback.

Request Body Parameters

  • websiteUrl (string, required): Domain or full URL of the business website.
  • hasPhone (boolean, optional): If `true`, skips extracting phones and only harvests emails. Default: `false`.

cURL Sample

curl -X POST https://ranktracker.id/api/v1/maps/email \
  -H "Authorization: Bearer rt_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "websiteUrl": "https://bengkelspesialis-audi.com",
    "hasPhone": false
  }'
GET

/api/v1/usage

Scope: any

Retrieves remaining credit balance, today's API call statistics, and recent gateway call logs.

cURL Sample

curl -X GET https://ranktracker.id/api/v1/usage \
  -H "Authorization: Bearer rt_live_YOUR_API_KEY"

Multi-Language Implementation Examples

Python Integration

import requests

url = "https://ranktracker.id/api/v1/search"
headers = {
    "Authorization": "Bearer rt_live_YOUR_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "query": "best coffee shop jakarta",
    "gl": "id",
    "hl": "id",
    "maxResults": 10
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

JavaScript / Node.js Integration

const res = await fetch("https://ranktracker.id/api/v1/search", {
  method: "POST",
  headers: {
    "Authorization": "Bearer rt_live_YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    query: "best coffee shop jakarta",
    gl: "id",
    hl: "id",
    maxResults: 10
  }),
});

const data = await res.json();
console.log(data);

AI Agent Integration Guide & Best Practices

Integrating Ranktracker.id API Gateway with autonomous Agentic AI (e.g. LangChain, CrewAI, AutoGPT, or custom local orchestrators) requires specific design patterns due to the network-heavy nature of data harvesting.

1. Cloud Scraper Offloading Pattern

To ensure high speed and prevent IP bans on your local development machine, always delegate raw web crawling, proxy rotation, and CAPTCHA handling to Ranktracker.id. Your local AI Agent acts solely as an orchestrator (Brain) that submits tasks to Ranktracker.id, receives structured JSON/Markdown, and performs validation.

2. Latency & Timeout Tolerances

Some endpoints perform multi-stage operations (like search crawling and LLM writing) which can take up to 45 seconds to compile. Configure your HTTP client timeout limits on your Agent accordingly:

Endpoint PathAvg Response TimeRecommended HTTP Client Timeout
/api/v1/search1 - 3 seconds10 seconds
/api/v1/maps/email3 - 10 seconds20 seconds
/api/v1/geo/articles15 - 45 seconds90 seconds
/api/v1/bulk/articles20 - 60 seconds120 seconds

HTTP Error Codes & Responses

Ranktracker.id API Gateway returns standard HTTP error status codes accompanied by detailed JSON error payloads:

HTTP StatusError CodeMeaning & Solution
400 Bad RequestBAD_REQUESTMissing mandatory fields (e.g. keywords/query) or malformed JSON payload.
401 UnauthorizedAUTH_MISSING / AUTH_KEY_NOT_FOUNDInvalid, expired, or missing Bearer token in the Authorization header.
402 Payment RequiredINSUFFICIENT_CREDITSYour Ranktracker.id credit balance is too low for this endpoint. Top up credits in dashboard.
403 ForbiddenFORBIDDEN_PERMISSIONThe API key lacks the required scope permission for this endpoint (e.g. calling /search with a geo-only key).
403 ForbiddenAUTH_KEY_REVOKEDThe API key was explicitly revoked/deleted by the owner in the dashboard.
429 Too Many RequestsRATE_LIMITEDExceeded the limit of 120 calls per minute. Implement exponential backoff.
500 Internal ErrorSERVER_ERRORGateway encountered an unhandled issue. Retry or contact support.