SEO & AEO API: 自动化您的搜索与AI工作流
The AI Rank Lab SEO & AEO API is a REST API at /api/v1 that gives your code live Google SERPs, AI Overview and AI Mode answers, AI citation checks across ChatGPT, Perplexity, Claude and Gemini, backlinks, keyword metrics and site audits, plus free reads of your AI bot visits, Search Console and GA4 data. 一个REST API和一个MCP服务器,使用同一个密钥。
Quick start
Base URL: https://www.airanklab.com/api/v1. Authenticate with your API key and secret, start a tool, then read the result.
- Create a key pairOpen API & Integrations in the dashboard and generate an API key and secret. The secret is shown once; store it in an environment variable.
- Send the two headersEvery request carries x-api-key and x-api-secret. Requests go over HTTPS to https://www.airanklab.com/api/v1.
- Start a tool, then poll the jobPaid tools answer 202 with a jobId. Poll GET /jobs/{jobId} until the status is completed or failed. Free reads return their data immediately.
curl -X POST "https://www.airanklab.com/api/v1/ai-citation-check" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{
"prompt": "best AEO audit tools 2026",
"domain": "airanklab.com",
"engines": ["ChatGPT", "Perplexity", "Claude", "Gemini"]
}'const res = await fetch("https://www.airanklab.com/api/v1/ai-citation-check", {
method: "POST",
headers: {
"x-api-key": process.env.AIRANKLAB_API_KEY,
"x-api-secret": process.env.AIRANKLAB_API_SECRET,
"Content-Type": "application/json"
},
body: JSON.stringify({
prompt: "best AEO audit tools 2026",
domain: "airanklab.com",
engines: ["ChatGPT", "Perplexity", "Claude", "Gemini"]
})
});
const { data } = await res.json(); // 202: { jobId, status: "pending", creditsCharged, pollUrl }import os, requests
res = requests.post(
"https://www.airanklab.com/api/v1/ai-citation-check",
headers={
"x-api-key": os.environ["AIRANKLAB_API_KEY"],
"x-api-secret": os.environ["AIRANKLAB_API_SECRET"],
},
json={
"prompt": "best AEO audit tools 2026",
"domain": "airanklab.com",
"engines": ["ChatGPT", "Perplexity", "Claude", "Gemini"],
},
)
job = res.json()["data"] # 202: { jobId, status: "pending", creditsCharged, pollUrl }Authentication
Every request needs two HTTP headers: x-api-key and x-api-secret. Generate and rotate the pair in the dashboard under Settings → API & Integrations. Rotating invalidates the old pair within seconds.
x-api-key: YOUR_API_KEY
x-api-secret: YOUR_API_SECRET
Content-Type: application/jsonCall the API from your backend, a script or an agent runtime, never from browser code. Store the pair in environment variables.
Async jobs and polling
Paid tools (audits, SERP lookups, AI citation checks, backlinks, keyword research, generators) run as background jobs. The call charges credits, then answers 202 with a jobId and a pollUrl.
HTTP/1.1 202 Accepted
{
"success": true,
"data": {
"jobId": "6f1c…",
"tool": "ai-citation-check",
"status": "pending",
"creditsCharged": 400,
"pollUrl": "/api/v1/jobs/6f1c…"
},
"requestId": "req_…"
}curl "https://www.airanklab.com/api/v1/jobs/JOB_ID" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET"
# status: pending → processing → completed (result) | failed (error, credits refunded)A job moves from pending to processing to completed (with result) or failed (with error). Failed jobs refund their credits automatically. Free reads skip the queue and return data in the first response.
驱动您工作流的数据引擎
将传统的Google搜索结果数据与实时AI引擎引用指标和机器人爬虫日志相结合。
Live Search Engine SERPs
Fetch live Google SERPs — organic positions, featured snippets, People Also Ask, related searches — plus Google AI Overview and AI Mode answers with every source they cite, by country, language and device.
AI Search Visibility (AEO/GEO)
Ask ChatGPT, Perplexity, Claude and Gemini the same question in one call and get back who mentions you, who cites you, from which URLs, and which competitors won the answer instead.
Backlinks & Domain Authority
Pull the full backlink profile of any domain: authority rank, referring domains, individual links with anchors and spam scores, anchor-text distribution, monthly trend, and bulk authority for up to 100 domains.
AI Bot Visits and Citations
Read the AI crawler visits the AI Rank Lab tracking tag records on your own domains (GPTBot, ClaudeBot, PerplexityBot and others) per bot and per page, plus which AI engines cited which pages. Free reads.
Keyword Universe & SERP Intent
Query monthly search volumes, keyword difficulty (KD), CPC, intent classification (Informational vs Commercial), and AI Overview presence.
Site Audits & Core Web Vitals
Programmatically diagnose web pages for technical SEO blockers, Core Web Vitals (LCP, CLS, INP), JSON-LD schema, and llms.txt compatibility.
Google Analytics 4 & Search Console
Fetch Google Search Console performance data, keyword clicks, impressions, and GA4 traffic metrics combined with AI search visibility.
探索核心API端点类别
检查实际请求负载和实时JSON响应结构。
AI Search Visibility (AEO)
POST /ai-citation-check
Ask ChatGPT, Perplexity, Claude and Gemini the same question at once and see which of them cite your domain. 100 credits per engine.
{
"prompt": "best AEO rank tracker",
"domain": "airanklab.com",
"engines": ["ChatGPT", "Perplexity", "Claude", "Gemini"],
"competitors": ["rival.com"]
}// GET /jobs/{jobId} once the job completes
{
"success": true,
"data": {
"status": "completed",
"result": {
"domain": "airanklab.com",
"summary": {
"citedIn": ["ChatGPT", "Perplexity"],
"mentionedIn": ["ChatGPT", "Perplexity", "Gemini"],
"notFoundIn": ["Claude"],
"citationRate": 50,
"visibilityScore": 63,
"competitors": [
{ "domain": "rival.com", "citedIn": ["Gemini"], "citationRate": 25 }
]
},
"results": [
{
"engine": "ChatGPT",
"cited": true,
"citedUrls": ["https://airanklab.com/seo-aeo-geo-audit-tool"],
"mentionPosition": 1,
"sentiment": "positive"
}
]
}
}
}Live SERP, AI Overview & AI Mode
POST /google-search · /google-ai-overview · /google-ai-mode
Live Google results for one query in a chosen country, language and device — organic positions, featured snippet, People Also Ask, and the AI Overview / AI Mode answer with every source it cites. 100 credits each.
{
"query": "generative engine optimization",
"country": "United States",
"language": "en",
"device": "desktop",
"domain": "airanklab.com"
}{
"success": true,
"data": {
"status": "completed",
"result": {
"query": "generative engine optimization",
"market": { "country": "United States", "countryCode": "US", "device": "desktop" },
"aiOverviewPresent": true,
"aiOverviewText": "Generative engine optimization (GEO) is …",
"citedSources": [
{ "url": "https://airanklab.com/geo", "domain": "airanklab.com", "title": "What is GEO" }
],
"presence": {
"domain": { "domain": "airanklab.com", "cited": true, "organicPosition": 3 }
}
}
}
}Keyword Research
POST /keyword-research
Search volume, CPC, competition, difficulty, intent and 12-month trend for your seed keywords — or every keyword a domain already ranks for. 50 credits per REST call; over MCP, the estimate tool quotes the exact price first.
{
"keywords": ["generative engine optimization", "aeo tools"],
"location": "United States",
"language": "English"
}{
"success": true,
"data": {
"status": "completed",
"result": {
"keywords": [
{
"keyword": "generative engine optimization",
"searchVolume": 14200,
"cpc": 6.4,
"competition": "MEDIUM",
"difficulty": 28,
"intent": "commercial",
"aiOverviewPresent": true
}
],
"peopleAlsoAsk": ["What is generative engine optimization?"]
}
}
}Backlinks & Domain Authority
POST /backlinks-overview · /backlinks-list · /referring-domains · /anchor-text
The full backlink suite for any domain or URL — profile summary and monthly trend, individual links with anchors and spam scores, referring domains ranked by authority, and bulk authority for up to 100 domains. From 15 credits.
{
"target": "competitor.com",
"includeSubdomains": true,
"includeHistory": false
}{
"success": true,
"data": {
"status": "completed",
"result": {
"target": "competitor.com",
"domainRank": 412,
"domainAuthorityScale": "0-1000",
"backlinks": 128409,
"referringDomains": 3182,
"dofollowBacklinks": 96311,
"brokenBacklinks": 214,
"spamScore": 8,
"topReferringCountries": [{ "key": "US", "count": 1840 }]
}
}
}Technical & AEO Page Audit
POST /seo-aeo-geo-audit · /audits · /core-web-vitals
The three-pillar checker (SEO, AEO, GEO) with a 0-100 score per pillar and one prioritized fix list, plus a technical URL audit and a PageSpeed / Core Web Vitals scan. From 25 credits.
{
"url": "https://airanklab.com/solutions",
"includeDetails": false
}{
"success": true,
"data": {
"status": "completed",
"result": {
"url": "https://airanklab.com/solutions",
"overallScore": 91,
"seo": { "score": 96, "findings": [] },
"aeo": { "score": 88, "findings": ["No FAQPage schema detected"] },
"geo": { "score": 89, "findings": [] },
"recommendations": [
{ "priority": "high", "pillar": "aeo", "action": "Add an FAQ block with FAQPage JSON-LD" }
]
}
}
}AI Bot Crawler Analytics
GET /tracking/stats · GET /citations
Your own AI bot traffic — GPTBot, ClaudeBot, PerplexityBot, Googlebot and friends — plus which AI engines cited which of your pages. Free: it reads data you already collect, and returns immediately.
GET /api/v1/tracking/stats?domain=airanklab.com HTTP/1.1
x-api-key: YOUR_API_KEY
x-api-secret: YOUR_API_SECRET{
"success": true,
"data": {
"domain": "airanklab.com",
"totalVisits": 512,
"aiBotVisits": 348,
"visitsLast30Days": 121,
"topBots": [
{ "name": "GPTBot", "count": 187, "isAIBot": true },
{ "name": "ClaudeBot", "count": 96, "isAIBot": true }
],
"topPages": [{ "url": "/pricing", "count": 64 }]
}
}MCP Server Endpoint
POST /mcp (Streamable HTTP)
Every tool on this page, exposed over the Model Context Protocol for Claude Code, Claude Desktop, Cursor, Windsurf and custom agents. Same key + secret, same credit pricing.
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "seo-aeo-geo-audit",
"arguments": { "url": "https://example.com" }
},
"id": 1
}{
"jsonrpc": "2.0",
"result": {
"content": [{ "type": "text", "text": "{ \"creditsCharged\": 50, \"result\": { \"overallScore\": 91, … } }" }]
},
"id": 1
}Credit cost per endpoint
API calls, MCP tool calls and the dashboard draw on the same credit pool. Credits are deducted before a tool runs and refunded if it fails. One channel difference: POST /keyword-research charges a flat 50 credits, while the MCP keyword-research tool is metered at 100 credits per data lookup. See plans and credits.
| Endpoint | Credits | Returns |
|---|---|---|
| POST /ai-citation-check | 100 × engines | Mentions and citations on ChatGPT, Perplexity, Claude, Gemini |
| POST /brand-visibility | 100 | One prompt on one engine, with competitors (max 5) |
| POST /google-search | 100 | Live Google SERP for one query, country, language, device |
| POST /google-ai-overview | 100 | Google AI Overview answer and its cited sources |
| POST /google-ai-mode | 100 | Google AI Mode answer and its cited sources |
| POST /keyword-research | 50 | Volumes, CPC, difficulty, intent for seeds or a website |
| POST /seo-aeo-geo-audit | 50 | SEO, AEO and GEO scores with one fix list |
| POST /audits | 50 | Technical URL audit |
| POST /core-web-vitals | 25 | PageSpeed / Core Web Vitals scan (mobile by default) |
| POST /backlinks-overview | 15 | Backlink profile summary |
| POST /backlinks-history | 15 | Monthly backlink trend |
| POST /backlinks-list | 150 | Individual backlinks with anchors and spam scores |
| POST /referring-domains | 25 | Referring domains ranked by authority |
| POST /anchor-text | 25 | Anchor-text distribution |
| POST /bulk-domain-authority | 25 | Authority for up to 100 domains |
| POST /faq-generator | 20 | FAQ block and FAQPage JSON-LD for a page |
| POST /llms-txt | 20 | Generated llms.txt for a site |
| POST /action-plan | 20 | Topic suggestions for a tracked prompt |
Free reads (0 credits)
Reads of data you already own cost nothing and return immediately.
| Endpoint | Returns |
|---|---|
| GET /credits | Balance and last 20 transactions |
| GET /tracking/stats | AI bot visit stats for one of your domains |
| GET /citations | AI engine citations of your pages (up to 90 days) |
| GET /domains · POST /domains | List or add your domains |
| GET /prompts | Your tracked prompts, paginated |
| GET /prompts/{promptId}/citations | Top cited URLs and domains for one prompt |
| GET /search-locations | Countries, languages and devices for the Google tools |
| GET /ga4/properties · POST /ga4/report · POST /ga4/realtime | Your connected Google Analytics 4 data |
| GET /gsc/sites · POST /gsc/performance | Your connected Search Console data |
| GET /jobs/{jobId} | Status and result of an async tool job |
| GET /openapi.json · GET /postman.json | OpenAPI 3.1 spec and Postman collection (no auth) |
Errors and rate limits
Every response uses one envelope: { success, data | error, requestId }. Quote the requestId when you contact support. Each key allows 60 requests per minute by default; over the limit you get a 429 with Retry-After and RateLimit-* headers.
{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded for this API key. See Retry-After header.",
"details": { "limitPerMinute": 60 }
},
"requestId": "req_…"
}| Code | HTTP | Meaning |
|---|---|---|
| VALIDATION_ERROR | 400 | A required parameter is missing or invalid. |
| UNAUTHORIZED | 401 | Missing x-api-key or x-api-secret, an invalid pair, or a deactivated account. |
| INSUFFICIENT_CREDITS | 402 | Your balance is lower than the tool's price. Nothing is charged. |
| NOT_FOUND | 404 | The job, domain or prompt does not exist on your account. |
| NOT_CONNECTED | 404 | A GA4 or Search Console read before an account is connected. |
| RATE_LIMITED | 429 | Over your key's per-minute limit (60 by default). Wait for the Retry-After header. |
| INTERNAL_ERROR | 500 | Something failed on our side. |
专为自动化管道和AI工作流设计
了解营销机构、企业SEO团队和AI工程师如何使用我们的API扩展运营。
Monitor Brand Visibility Across AI Search Engines
Track ChatGPT, Perplexity, Gemini & Claude citations at scale. Feed buyer-intent questions into one call and get a per-engine verdict: mentioned, cited, the exact source URLs, and which competitors were recommended instead.
const res = await fetch("https://www.airanklab.com/api/v1/ai-citation-check", {
method: "POST",
headers: {
"x-api-key": process.env.AIRANKLAB_API_KEY,
"x-api-secret": process.env.AIRANKLAB_API_SECRET,
"Content-Type": "application/json"
},
body: JSON.stringify({
prompt: "top enterprise marketing software",
domain: "acmecorp.com",
competitors: ["rival.com"]
})
});
// Tool calls are async: poll the job for the result
const { data } = await res.json();
const job = await pollJob(data.jobId);
console.log(job.result.summary.citationRate, job.result.summary.citedIn);Automate Technical Audits & URL Pipelines
Turn full site audits into structured diagnostic feeds. Run an audit on every publish or deployment to catch schema errors, thin answers or failing Core Web Vitals before they reach production.
const start = await fetch("https://www.airanklab.com/api/v1/seo-aeo-geo-audit", {
method: "POST",
headers: {
"x-api-key": process.env.AIRANKLAB_API_KEY,
"x-api-secret": process.env.AIRANKLAB_API_SECRET,
"Content-Type": "application/json"
},
body: JSON.stringify({ url: "https://example.com/blog/mcp-setup" })
});
const { data } = await start.json(); // 202 + jobId
const job = await pollJob(data.jobId); // GET /jobs/{jobId}
if (job.result.aeo.score < 85) {
triggerSlackAlert(`AEO score dropped: ${job.result.aeo.score}`);
}Audit Backlinks & Track AI Crawler Visits
Link authority on demand, bot traffic in real time. Pull any domain’s backlink profile for competitive research, and read your own GPTBot / ClaudeBot / PerplexityBot visit logs to confirm the AI engines are actually crawling you.
# Backlink profile of any domain (async, 15 credits)
curl -X POST "https://www.airanklab.com/api/v1/backlinks-overview" \
-H "x-api-key: YOUR_KEY" -H "x-api-secret: YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{"target":"competitor.com","includeHistory":true}'
# AI bot visits to your own domain (free, returns immediately)
curl "https://www.airanklab.com/api/v1/tracking/stats?domain=example.com" \
-H "x-api-key: YOUR_KEY" -H "x-api-secret: YOUR_SECRET"从任何AI助手内部查询 AI Rank Lab
In addition to REST API endpoints, AI Rank Lab provides a hosted MCP 服务器 at POST /api/v1/mcp. Connect Claude.ai, Claude Desktop, Claude Code, Cursor or any other client that supports remote MCP over Streamable HTTP, with the same key and secret.
{
"mcpServers": {
"airanklab": {
"url": "https://www.airanklab.com/api/v1/mcp",
"headers": {
"x-api-key": "YOUR_API_KEY",
"x-api-secret": "YOUR_API_SECRET"
}
}
}
}Explore the MCP server for SEO
将SEO和AEO数据整合到您的技术栈
无论您是构建客户报告管道还是自主AI代理团队,我们的API都适合您的技术栈。
SEO与营销机构
自动化白标客户审计、追踪AEO引用声量份额,并轻松生成自动化的PDF / Data Studio报告仪表板。 White-label reports
企业SEO团队
监控关键词格局变化,在桌面和移动端覆盖54个搜索市场,基准竞争对手的LLM引用差距,并为内部数据科学流程提供动力。
开发者与AI工程师
为RAG管道提供实时网络搜索结果,审计AI机器人爬虫流量(GPTBot, ClaudeBot),并通过MCP将工具连接至LangChain或CrewAI。
OpenAPI and Postman
Both files are public, so you can import them without a key.
- OpenAPI 3.1 spec
GET /api/v1/openapi.json - Postman collection
GET /api/v1/postman.json. It stores each asyncjobIdin a variable, so polling works straight away. - Prefer clicking to coding? The API Playground sends real requests with your key and gives you cURL, JavaScript and Python for each one.
常见问题
还有其他问题? 咨询我们的团队
What is the AI Rank Lab REST API?
The AI Rank Lab REST API provides programmatic access to our entire search engine & AI intelligence platform. You can programmatically fetch keyword research, SERP rankings, Google AI Overview features, AI search brand citations (ChatGPT, Gemini, Perplexity, Claude), the AI bot visits recorded on your domains, technical site audits, and Google Analytics 4 / Search Console metrics.
How do I authenticate API requests?
Every API request requires two HTTP headers: x-api-key and x-api-secret. You can generate and manage key pairs directly from your AI Rank Lab Dashboard → Settings → API & Integrations.
How does API credit billing work?
Dashboard usage, API calls and MCP tool calls draw credits from the same account pool, and each endpoint's price is listed in the credit table. Keyword research is the one difference between channels: the REST endpoint charges a flat 50 credits, while the MCP tool is metered at 100 credits per data lookup (typically 400 to 500). Reads of data you already own (Search Console, GA4, bot visits, citations) cost 0 credits. Credits are deducted before a tool runs and refunded automatically if it fails.
How does the REST API differ from the MCP Server endpoint?
The REST API (/api/v1) is designed for traditional developer applications, cron scripts, backend services, and automated data pipelines. The MCP endpoint (/api/v1/mcp) is an Anthropic Model Context Protocol wrapper over the exact same API tools, so AI clients such as Claude.ai, Claude Desktop, Claude Code and Cursor can call them inside a conversation. Any client that supports remote MCP over Streamable HTTP can connect.
What are the API rate limits?
Each API key is limited to 60 requests per minute by default. Exceeding it returns a 429 with a Retry-After header telling you exactly how long to wait. Need more throughput for a specific integration? Contact us and we will raise the limit on your key.
Do you provide Postman collections and OpenAPI specifications?
Yes. The OpenAPI 3.1 spec is served at /api/v1/openapi.json and a ready-to-import Postman collection at /api/v1/postman.json — both are public, so you can import the Postman collection straight from the link. The collection saves the jobId from every async tool call into a variable, so polling for the result works immediately.
Can I test API endpoints interactively before writing code?
Yes. The API Playground in the dashboard (/dashboard/api-playground) loads your key and secret automatically, sends real requests, polls async jobs for you, and gives you copy-ready cURL, JavaScript and Python snippets for every endpoint.
立即开始使用 AI Rank Lab 的 SEO & AEO API 进行开发
几秒钟内创建您的账户。赠送100个免费积分,可用于实时SERP查询、AEO品牌可见性检查和机器人访问日志分析。