The SEO AI Agent API lets you programmatically manage domains, track keywords, analyze SEO performance, and generate optimized content. All endpoints return JSON.
https://seo-agent.net/apiAll API requests require authentication via Bearer token. Include your API key in the Authorization header.
Authorization: Bearer YOUR_API_KEYGet your API key from Profile → Connected Apps. The API also supports OAuth 2.0 for MCP clients.
/domainsReturns all domains in your active workspace with optional statistics.
| Name | Type | Required | Description |
|---|---|---|---|
| withstats | boolean | Optional | Include keyword count and analytics |
{
"domains": [
{
"ID": 1,
"domain": "example.com",
"slug": "example_com",
"niche": "Technology",
"keywordCount": 25,
"workspace_id": 1
}
]
}curl -X GET "https://seo-agent.net/api/domains?withstats=true" \ -H "Authorization: Bearer YOUR_API_KEY"
/domainsAdd one or more domains to your workspace.
| Name | Type | Required | Description |
|---|---|---|---|
| domains | string[] | Required | Array of domain names to add |
{
"domains": [
{ "ID": 2, "domain": "newsite.com", "slug": "newsite_com" }
]
}curl -X POST "https://seo-agent.net/api/domains" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domains": ["newsite.com"]}'/domains?id={id}Permanently delete a domain and all its tracked keywords, posts, and analytics data.
| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | Required | Domain ID |
{ "success": true }curl -X DELETE "https://seo-agent.net/api/domains?id=2" \ -H "Authorization: Bearer YOUR_API_KEY"
/keywords?domain={slug}Returns all tracked keywords for a domain with position history.
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | Required | Domain slug (e.g. example_com) |
{
"keywords": [
{
"ID": 1,
"keyword": "seo tools",
"position": 12,
"country": "US",
"device": "desktop",
"url": "https://example.com/tools",
"lastUpdated": "2026-04-14T10:00:00Z"
}
]
}curl -X GET "https://seo-agent.net/api/keywords?domain=example_com" \ -H "Authorization: Bearer YOUR_API_KEY"
/keywordsAdd a keyword to track for a specific domain.
| Name | Type | Required | Description |
|---|---|---|---|
| keyword | string | Required | Keyword to track |
| domain | string | Required | Domain name |
| country | string | Optional | Country code (default: US) |
| device | string | Optional | desktop or mobile (default: desktop) |
{ "keyword": { "ID": 5, "keyword": "best seo tool", "position": 0 } }curl -X POST "https://seo-agent.net/api/keywords" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "best seo tool", "domain": "example.com", "country": "US"}'/gsc/sitesReturns all verified sites from the user's connected Google Search Console account.
{
"sites": [
{ "siteUrl": "https://example.com/", "permissionLevel": "siteOwner" },
{ "siteUrl": "sc-domain:example.com", "permissionLevel": "siteOwner" }
]
}curl -X GET "https://seo-agent.net/api/gsc/sites" \ -H "Authorization: Bearer YOUR_API_KEY"
/domain-insight?domain={slug}Get Search Console analytics: top keywords, pages, countries, and aggregate stats (clicks, impressions, CTR, position).
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | Required | Domain slug |
| days | integer | Optional | Date range in days (default: 30) |
{
"stats": { "clicks": 1250, "impressions": 45000, "ctr": 2.78, "position": 18.5 },
"keywords": [...],
"pages": [...],
"countries": [...]
}curl -X GET "https://seo-agent.net/api/domain-insight?domain=example_com&days=30" \ -H "Authorization: Bearer YOUR_API_KEY"
/domain-keywords?domain={slug}Get all Search Console keyword data for a domain.
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | Required | Domain slug |
curl -X GET "https://seo-agent.net/api/domain-keywords?domain=example_com" \ -H "Authorization: Bearer YOUR_API_KEY"
/seo-overview?domain={slug}SEO health overview with period-over-period comparison.
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | Required | Domain slug |
| days | integer | Optional | Date range (default: 30) |
curl -X GET "https://seo-agent.net/api/seo-overview?domain=example_com" \ -H "Authorization: Bearer YOUR_API_KEY"
/keyword-opportunities?domain={slug}Find quick-win keywords: striking distance (positions 5-20), low CTR, rising trends, and zero-click opportunities.
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | Required | Domain slug |
| days | integer | Optional | Date range (default: 30) |
| limit | integer | Optional | Max results (default: 20) |
curl -X GET "https://seo-agent.net/api/keyword-opportunities?domain=example_com&limit=20" \ -H "Authorization: Bearer YOUR_API_KEY"
/competitors?domain={slug}Get the list of competitor domains configured for a domain.
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | Required | Domain slug |
curl -X GET "https://seo-agent.net/api/competitors?domain=example_com" \ -H "Authorization: Bearer YOUR_API_KEY"
/competitorsReplace the competitor list for a domain.
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | Required | Domain slug |
| competitors | string[] | Required | Array of competitor domain names |
curl -X PUT "https://seo-agent.net/api/competitors" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "example_com", "competitors": ["competitor1.com", "competitor2.com"]}'/seo/analyzeRun 20+ SEO checks on content and get a score from 0-100 with detailed suggestions.
| Name | Type | Required | Description |
|---|---|---|---|
| title | string | Required | Page title |
| content | string | Required | HTML content body |
| meta_description | string | Optional | Meta description |
| slug | string | Optional | URL slug |
| focus_keywords | string[] | Optional | Target keywords |
{
"score": 78,
"checks": [
{ "name": "Title Length", "pass": true, "message": "Title is 55 characters (recommended: 30-70)" },
{ "name": "Meta Description", "pass": false, "message": "Missing meta description" }
],
"suggestions": ["Add a meta description (150-160 chars)", "Add more internal links"]
}curl -X POST "https://seo-agent.net/api/seo/analyze" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Best SEO Tools 2026", "content": "<h1>Best SEO Tools</h1><p>...</p>", "focus_keywords": ["seo tools"]}'/posts?domain={slug}Get all posts for a domain.
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | Required | Domain slug |
curl -X GET "https://seo-agent.net/api/posts?domain=example_com" \ -H "Authorization: Bearer YOUR_API_KEY"
/postsCreate a new post or update an existing one. Automatically runs SEO analysis and calculates score.
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | Required | Domain name |
| title | string | Required | Post title |
| content | string | Required | HTML content |
| id | integer | Optional | Post ID (for updates) |
| slug | string | Optional | URL slug (auto-generated if empty) |
| status | string | Optional | draft or published (default: draft) |
| focus_keywords | string[] | Optional | Target keywords for SEO scoring |
curl -X POST "https://seo-agent.net/api/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com", "title": "My Article", "content": "<p>Content here</p>", "status": "draft"}'/posts?id={id}Permanently delete a post.
| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | Required | Post ID |
curl -X DELETE "https://seo-agent.net/api/posts?id=5" \ -H "Authorization: Bearer YOUR_API_KEY"
SEO Agent provides a Model Context Protocol (MCP) endpoint for AI assistants like Claude, Cursor, and ChatGPT. The MCP server exposes 19 tools that AI can use to analyze your websites.
POST https://seo-agent.net/api/mcpget_profileGet authenticated user profileget_current_workspaceGet active workspace infolist_domainsList all domainsget_domain_insightDomain analytics & statsget_domain_keywordsSearch Console keywordsget_domain_seo_overviewSEO health overviewlist_tracked_keywordsList tracked keywordsadd_tracked_keywordAdd keyword to trackingfind_keyword_opportunitiesQuick-win keywordslist_domain_competitorsList competitorsupdate_domain_competitorsUpdate competitor listget_keyword_competitorsCompetitor rankingsget_competitor_historyCompetitor rank historygenerate_content_briefSEO content briefanalyze_seoContent SEO analysislist_postsList domain postsget_postGet single postsave_postCreate/update postdelete_postDelete postFor setup instructions, see the MCP Integration Guide or the SEO Expert Skill page.
All errors return a JSON object with an error field.
{ "error": "Unauthorized" }| Code | Description |
|---|---|
| 200 | OK — Request succeeded |
| 201 | Created — Resource created successfully |
| 400 | Bad Request — Invalid parameters or missing required fields |
| 401 | Unauthorized — Missing or invalid API key |
| 403 | Forbidden — Insufficient permissions (plan limit or role) |
| 404 | Not Found — Resource does not exist |
| 405 | Method Not Allowed — Wrong HTTP method |
| 422 | Validation Error — Input failed validation |
| 429 | Rate Limited — Too many requests (wait and retry) |
| 500 | Internal Error — Server error (contact support) |