Docs API Gateway Ranktracker.id
Official developer and AI Agent documentation for Ranktracker.id API Gateway. Integrate robust web search scraping, keyword tracking, Google Maps extraction, and real-time researched SEO articles directly into your Agentic AI (Cortex, OpenAI, LangChain, or custom autonomous setups).
Introduction & Concept
Instead of paying and maintaining multiple subscriptions for scrapers, AI generation endpoints, search crawlers, and business scrapers, Ranktracker.id provides a unified **API Gateway for Agentic AI**.
Authentication
All API requests must include the API key in the HTTP header:
API Keys can be generated under your API Gateway Dashboard inside Ranktracker.id. Treat this key as a password.
Billing & Credit System
API Gateway uses a unified **Credit Balance**. Every successful request deducts credits automatically from your user account.
Rate Limiting
To protect the infrastructure, active API keys are rate-limited to **120 requests per minute**. Exceeding this rate will return a standard `429 Too Many Requests` HTTP status.
/api/v1/search
Performs an AI-optimized Google web search to retrieve structured snippets, titles, and links.
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
Generates a highly researched SEO article targeting a keyword. Under the hood, this endpoint crawls Google reference articles for context, then prompts the selected model (leveraging DeepSeek fallback routing to optimize your costs) 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 `"Gemini Flash 3.5"` (Camouflage model) or `"Claude Sonnet 4.6"`. Default: `"Gemini Flash 3.5"`.
- wordCount (number, optional): Target length. 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/maps/scrape
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`.
- ll (string, optional): Coordinates query constraint.
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
Extracts email addresses and telephone/WhatsApp numbers from a business website using rotating Jina Reader 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
Retrieves the 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 should act 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:
3. LLM Token & Cost Optimization
Ranktracker.id API Gateway returns cleaned, structured markdown and parsed JSON. Passing this structured content directly to your LLM system reduces token consumption by up to 80% compared to passing raw crawled HTML content, keeping your own LLM operational costs low.
HTTP Error Codes & Responses
Ranktracker.id API Gateway returns standard HTTP error status codes accompanied by detailed JSON error payloads: