Ranktracker.id API Gateway
Get API Key

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).

🔌 Import to AI Agent: OpenAPI Schema (openapi.json)

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**.

💡 Why Agentic AI? This API is built to return clean, parsed JSON or Markdown data instead of bloated HTML structures. This maximizes readability for Large Language Models (LLMs) and saves up to 80% on prompt token consumption.

Authentication

All API requests must include the API key in the HTTP header:

Authorization: Bearer rt_live_YOUR_API_KEY

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.

EndpointDescriptionCredit Cost
/api/v1/searchStructured Google search results2 credits
/api/v1/geo/articlesReal-time researched GEO-optimized SEO articleDynamic (100 - 500+ credits)
/api/v1/rank/checkCheck ranking positions for a domain1 credit
/api/v1/keywords/researchSearch volume, CPC, difficulty metrics3 credits
/api/v1/long-tailRetrieve long-tail keyword suggestions2 credits
/api/v1/maps/scrapeScrape business details from Google Maps6 credits
/api/v1/maps/emailExtract emails & phone numbers from business website5 credits
/api/v1/usageCheck credit balance & usage historyFree

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.

POST

/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."
  }'
POST

/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
  }'
POST

/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
  }'
GET

/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:

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

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:

HTTP StatusError CodeMeaning & Solution
400 Bad RequestBAD_REQUESTMissing mandatory fields (e.g. keyword/query) or malformed JSON payload.
401 UnauthorizedUNAUTHORIZEDInvalid, 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 to continue.
403 ForbiddenKEY_REVOKEDThe API key was explicitly revoked/deleted by the owner.
429 Too Many RequestsRATE_LIMIT_EXCEEDEDExceeded the limit of 120 calls per minute. Implement exponential backoff.
500 Internal ErrorSERVER_ERRORGateway encountered an unhandled issue. Retry or contact support.