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.
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).
Authentication
All API requests must pass your API key as a Bearer token in the standard HTTP Authorization header:
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.
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.
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.
/api/v1/search
Scope: searchPerforms an AI-optimized Google web search to retrieve structured snippets, titles, and links for Agentic AI reasoning.
Request Body Parameters
- query (string, required): Search query string.
- gl (string, optional): Country code (e.g. `id`, `us`). Default: `id`.
- hl (string, optional): Language code (e.g. `id`, `en`). Default: `id`.
- maxResults (number, optional): Clamp 1-20. Default: `10`.
cURL Sample
curl -X POST https://ranktracker.id/api/v1/search \
-H "Authorization: Bearer rt_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "best coffee shop jakarta",
"gl": "id",
"hl": "id",
"maxResults": 10
}'/api/v1/geo/articles
Scope: geoGenerates 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."
}'/api/v1/bulk/articles
Scope: bulkGenerates 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"
}'/api/v1/geo/articles/sync & /api/v1/geo/projects
Scope: geoUsed 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"
/api/v1/maps/scrape
Scope: mapsSearches 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
}'/api/v1/maps/email
Scope: mapsExtracts 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
}'/api/v1/usage
Scope: anyRetrieves 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:
HTTP Error Codes & Responses
Ranktracker.id API Gateway returns standard HTTP error status codes accompanied by detailed JSON error payloads: