SEO API: a REST API and an MCP server for your sites' search data
Vikas Chamarthi, Founder · Updated
XeoRank's SEO API is a REST API at https://api.xeorank.com that returns your sites' Search Console queries, competitor pages, content gaps, page analysis and crawl data as JSON, authenticated with a personal API key from your settings. For AI assistants, the same platform is exposed as an MCP server at https://mcp.xeorank.com/mcp with more than 200 tools, and the full reference for both lives in the docs.
The two serve different callers. Your code calls the REST API. Your AI assistant calls the MCP server.
Who it is for
- Developers who want their sites' Search Console data and SEO checks inside an internal dashboard, a data pipeline or a script.
- Teams that want an SEO check in CI, for example crawling a staging URL and failing the build when the title or meta description is missing.
- Agencies pulling client data into their own reporting.
- Anyone building with Claude, ChatGPT, Codex or Cursor who wants the assistant to run SEO work directly, through the MCP server.
Authentication
Create a personal API key in your XeoRank settings. Each key shows its prefix, its creation date and when it was last used, and you can revoke it whenever you like. Send it with every request in the X-Agent-Key header. The CLI uses the key saved by xyle login; if you have not logged in, it falls back to a key in the AGENT_API_KEY environment variable.
A personal key is bound to you, and a request that names a different account is refused. Treat it like a password: keep it in an environment variable or your CI secret store rather than in source control, and revoke it from settings if it leaks. The XeoRank CLI calls this same API, so a key that works in one works in the other.
A request, start to finish
The API reference documents the request shape. Listing a site's top Search Console queries looks like this:
GET https://api.xeorank.com/queries?site=your-domain.com&limit=5&email=you@example.com
X-Agent-Key: your-api-key
The response is a JSON array of objects with query, impressions, clicks, ctr and position.
Documented endpoints
These are the endpoints in the public reference at /docs:
| Method | Path | Parameters | Returns |
|---|---|---|---|
| GET | /health | none | API status |
| GET | /queries | site, optional limit | Search Console queries with impressions, clicks, CTR and position |
| GET | /competitors | query | Competitor pages for the query, with position, URL, title and word count |
| GET | /gaps | page, optional query | Content gaps per query: missing topics, CTR issue, position bucket |
| POST | /analyze | url, content, optional query | SEO score, AEO score, summary, missing topics and AEO recommendations |
| POST | /rewrite | url, optional type and query | Original text, a suggested rewrite and the reasoning |
| POST | /crawl | url | Title, meta description, word count, headings and AEO signals for one URL |
| GET | /sites/{id}/search-console | email | Search Console performance, coverage, sitemaps and issues |
| POST | /sites/{id}/search-console/sync | email | Pulls fresh Search Console data, then returns the same overview |
| GET | /sites/{id}/search-console/sitemaps | email | Submitted sitemaps with errors, warnings and contents |
The /rewrite endpoint returns suggestions. It does not change your page.
For background on what the gap and rewrite data mean, see content gap analysis and content briefs.
What people build with it
- A query dashboard. Call
/queriesfrom your own reporting job and chart clicks and position next to your product metrics. - A pre-publish check. Call
/crawlon a freshly deployed public URL and fail the build if the title, meta description or headings are missing. - A refresh list. Call
/gapsfor your key pages and send the ones with missing topics to your content team. - A Search Console health check. Call
/sites/{id}/search-consoleto read coverage, sitemaps and indexing issues, and alert someone when errors appear.
Each of these runs when your code calls it, on whatever trigger you choose.
The MCP server: the rest of the platform
The REST reference covers a core set of data. Much of XeoRank's work, including full-site crawls, keyword research and clustering, rank tracking, AI visibility checks, GA4, content briefs and WordPress editing, is exposed through the MCP server.
Connect it to your assistant with the URL https://mcp.xeorank.com/mcp:
- Claude, Cursor and VS Code sign in with OAuth, so there is no key to copy.
- ChatGPT on the web connects it as a custom connector with OAuth sign-in, after you turn on developer mode under Settings and then Security.
- Codex can use OAuth like ChatGPT, or a bearer API key:
bearer_token_env_varin~/.codex/config.tomlnames an environment variable that holds your key.
The server is listed in the official MCP Registry as com.xeorank/xeorank. The MCP setup guide has the exact steps for each client, and the SEO MCP server page covers what you can ask it to do.
What the API does not do
- The documented REST endpoints do not edit your website. Site edits go through the MCP server. WordPress writes are off for each site until you enable them.
- It is not a bulk keyword or search results data feed. It returns data for the sites in your account.
- The documented REST endpoints do not cover everything. AI visibility, rank tracking, keyword research and briefs are reached through the MCP server, not through the public REST reference.
- There is no separate client library to install. Any HTTP client works, and the npm CLI is a ready-made client for the terminal.
- Requests are rate limited, so batch work should pace itself rather than fire requests in parallel.
Pricing
API and MCP access come with every plan. Starter is $19 a month for one site, with a 14-day free trial and no card to start. Pro is $49 a month and Growth is $109 a month. See pricing for what each plan includes.
Questions
- What is XeoRank's SEO API?
- A REST API at https://api.xeorank.com that returns JSON. The documented endpoints cover Search Console queries, competitor pages for a query, content gaps for a page, page analysis, rewrite suggestions, single-URL crawls and Search Console overview, sync and sitemaps. Requests authenticate with a personal API key in an X-Agent-Key header.
- How do I get an API key?
- Create one in your XeoRank settings. Each key shows its prefix, when it was created and when it was last used, and you can revoke it at any time. A personal key acts as you, and a request that names a different account is refused.
- Should I use the REST API or the MCP server?
- Use the REST API when your own code needs data, for example a dashboard, a CI check or a script. Use the MCP server at https://mcp.xeorank.com/mcp when an AI assistant such as Claude, ChatGPT, Codex or Cursor should do the work, since it exposes more than 200 tools the assistant picks from.
- Is API access included in every plan?
- Yes. API and MCP access come with every plan, starting with Starter at $19 a month for one site, with a 14-day free trial and no card to start. See the pricing page for details.
- Can I edit WordPress pages through the REST API?
- WordPress editing is not part of the documented REST reference. It is available through the MCP server, where your AI assistant edits pages through the XeoRank Connector plugin after you enable writes for the site.
Related
Connect XeoRank's SEO MCP server to Claude, ChatGPT, Codex, Cursor or VS Code for audits, keyword research, AI visibility checks and WordPress fixes.
Claude SEO MCP: connect Claude to XeoRank and do SEO work from the chatDo SEO with Claude: connect Claude.ai, Claude Desktop or Claude Code to XeoRank's MCP server to audit sites, read Search Console and research keywords.
White-label SEO reports your clients can read, issued under your agency's nameWhite label SEO reports: a Search Console report per client site, exported as PDF or Google Doc under your agency's name, not XeoRank. On the Growth plan.
AI content writer that drafts from your own material and checks every claimXeoRank's AI content writer drafts only from your notes and interview answers and flags unsourced claims, filler and placeholders. Not a one-click tool.
See where you stand in Google and AI answers
Starter is $19 a month for one site, with a 14-day free trial and no card to start.