Skip to documentation
AgentSEO / Docs
Browse documentation
View Markdown ↗

API reference / REST v1

Keywords & competitors

Keyword ideas, metrics, clustering, domain comparisons, and traffic estimates.

All paths below are relative to https://www.agentseo.dev/api/v1. Send your key in x-api-key. Set AGENTSEO_API_KEY in your environment before running the examples. IDs and results are illustrative.

Async result handling · Errors and limits · OpenAPI contract

POST/keyword-cluster/build

Group keywords into intent-led clusters and return cluster_plan plus agent_workflow so agents can map cluster targets to the right page types before publishing.

Request fields · required fields are labeled
NameTypeDescription
keywordsRequiredarrayList of keywords (max 200)
POST /keyword-cluster/build example
curl -X POST https://www.agentseo.dev/api/v1/keyword-cluster/build?sync=true \
  -H "x-api-key: $AGENTSEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keywords":["best shoes", "running shoes", "cheap sneakers"]}'

POST/keyword-ideas/suggest

Expand one seed keyword into prioritized long-tail keyword ideas with search volume, CPC, competition, buyer stage, recommended page type, agent_workflow, and markdown_summary. Requests cost 4 credits and use one paid keyword suggestions request with SERP enrichment disabled.

Request fields · required fields are labeled
NameTypeDescription
keywordRequiredstringSeed keyword or topic
locationstringSearch market (default: United States)
location_codeintegerOptional provider location code. Wins over location when provided.
languagestringLanguage code or name (default: en)
limitintegerNumber of ideas to return (5-100, default: 25)
min_search_volumeintegerMinimum monthly search volume filter (default: 0)
POST /keyword-ideas/suggest example
curl -X POST https://www.agentseo.dev/api/v1/keyword-ideas/suggest?sync=true \
  -H "x-api-key: $AGENTSEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword":"seo api", "location":"United States", "language":"en", "limit":25, "min_search_volume":10}'

POST/keyword-metrics/overview

Score a supplied keyword list with search volume, CPC, competition, difficulty, buyer stage, recommended page type, opportunity score, agent_workflow, and markdown_summary. Requests cost 5 credits per 25 keywords, minimum 5, with SERP and clickstream enrichment disabled.

Request fields · required fields are labeled
NameTypeDescription
keywordsRequiredarrayKeyword list to score. Maximum 100 keywords.
locationstringSearch market (default: United States)
location_codeintegerOptional provider location code. Wins over location when provided.
languagestringLanguage code or name (default: en)
min_search_volumeintegerMinimum monthly search volume filter (default: 0)
sort_byenumpriority, search_volume, cpc, or difficulty (default: priority)
POST /keyword-metrics/overview example
curl -X POST https://www.agentseo.dev/api/v1/keyword-metrics/overview?sync=true \
  -H "x-api-key: $AGENTSEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keywords":["seo api","best seo api","seo api pricing"], "location":"United States", "language":"en", "min_search_volume":10, "sort_by":"priority"}'

POST/domain/ranked-keywords

Find ranked keywords for a domain, subdomain, or URL and prioritize refresh opportunities with rank, page URL, search metrics, SERP features, movement, opportunity type, agent_workflow, and markdown_summary. Requests cost 5 credits per 100 requested rows, minimum 5, with clickstream enrichment disabled.

Request fields · required fields are labeled
NameTypeDescription
targetRequiredstringDomain, subdomain, or page URL to inspect.
locationstringSearch market (default: United States)
location_codeintegerOptional provider location code. Wins over location when provided.
languagestringLanguage code or name (default: en)
limitintegerRows to request (10-250, default: 50)
min_search_volumeintegerMinimum monthly search volume filter (default: 0)
max_rankintegerMaximum ranking position to include (1-100, default: 100)
sort_byenumopportunity, estimated_traffic, rank, search_volume, or cpc (default: opportunity)
include_lostbooleanInclude lost rankings when available (default: false)
POST /domain/ranked-keywords example
curl -X POST https://www.agentseo.dev/api/v1/domain/ranked-keywords?sync=true \
  -H "x-api-key: $AGENTSEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"target":"agentseo.dev", "location":"United States", "language":"en", "limit":25, "min_search_volume":10, "max_rank":50, "sort_by":"opportunity"}'

POST/domain/relevant-pages

Find organic traffic-carrying pages for a domain and route them into protect, refresh, expand, recover, or review actions with page metrics, opportunity score, agent_workflow, and markdown_summary. Requests cost 5 credits per 100 requested pages, minimum 5, with clickstream enrichment disabled.

Request fields · required fields are labeled
NameTypeDescription
targetRequiredstringDomain to inspect, without protocol or www when possible.
locationstringSearch market (default: United States)
location_codeintegerOptional provider location code. Wins over location when provided.
languagestringLanguage code or name (default: en)
limitintegerPages to request (10-250, default: 50)
min_trafficintegerMinimum estimated organic traffic filter (default: 0)
historical_serp_modeenumlive, lost, or all (default: live)
sort_byenumestimated_traffic, keyword_count, top3, or opportunity (default: estimated_traffic)
POST /domain/relevant-pages example
curl -X POST https://www.agentseo.dev/api/v1/domain/relevant-pages?sync=true \
  -H "x-api-key: $AGENTSEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"target":"agentseo.dev", "location":"United States", "language":"en", "limit":25, "min_traffic":0, "historical_serp_mode":"live", "sort_by":"estimated_traffic"}'

POST/domain/competitors

Discover search competitors for a domain and prioritize shared keyword overlap, traffic gaps, threat level, next actions, agent_workflow, and markdown_summary. Requests cost 5 credits per 100 requested competitors, minimum 5, with clickstream enrichment disabled.

Request fields · required fields are labeled
NameTypeDescription
targetRequiredstringDomain or URL to inspect. URLs are normalized to the domain.
locationstringSearch market (default: United States)
location_codeintegerOptional provider location code. Wins over location when provided.
languagestringLanguage code or name (default: en)
limitintegerCompetitors to request (5-250, default: 25)
min_intersectionsintegerMinimum shared keyword count filter (default: 0)
max_rank_groupintegerMaximum rank bucket considered for overlap (1-100, default: 20)
sort_byenumthreat, overlap, competitor_traffic, or traffic_gap (default: threat)
POST /domain/competitors example
curl -X POST https://www.agentseo.dev/api/v1/domain/competitors?sync=true \
  -H "x-api-key: $AGENTSEO_API_KEY" \
  -H "Content-Type: application/json" \
              -d '{"target":"agentseo.dev", "location":"United States", "language":"en", "limit":25, "min_intersections":0, "max_rank_group":20, "sort_by":"threat"}'

POST/domain/intersection

Compare two domains at keyword level and prioritize shared deficits, current advantages, and target1-exclusive opportunities with rank gaps, traffic gaps, agent_workflow, and markdown_summary. Requests cost 5 credits per 100 requested keywords, minimum 5, with clickstream and extra SERP enrichment disabled.

Request fields · required fields are labeled
NameTypeDescription
target1RequiredstringFirst domain or URL. In shared mode this is the domain being compared against target2.
target2RequiredstringSecond domain or URL, usually the competitor selected from /domain/competitors.
locationstringSearch market (default: United States)
location_codeintegerOptional provider location code. Wins over location when provided.
languagestringLanguage code or name (default: en)
limitintegerKeywords to request (5-250, default: 25)
intersectionsbooleantrue returns shared keywords; false returns keywords where target1 ranks and target2 does not (default: true)
min_search_volumeintegerMinimum search volume filter (default: 0)
sort_byenumopportunity, search_volume, traffic_gap, rank_gap, or cpc (default: opportunity)
POST /domain/intersection example
curl -X POST https://www.agentseo.dev/api/v1/domain/intersection?sync=true \
  -H "x-api-key: $AGENTSEO_API_KEY" \
  -H "Content-Type: application/json" \
              -d '{"target1":"hubspot.com", "target2":"salesforce.com", "location":"United States", "language":"en", "limit":25, "intersections":true, "min_search_volume":10, "sort_by":"opportunity"}'

POST/domain/traffic-estimate

Compare estimated organic, paid, featured-snippet, and local-pack traffic across multiple domains, subdomains, or URLs before spending deeper analysis credits. Returns footprint type, channel mix, opportunity score, agent_workflow, and markdown_summary. Requests cost 5 credits per 25 supplied targets, minimum 5.

Request fields · required fields are labeled
NameTypeDescription
targetsRequiredstring[]Domains, subdomains, or absolute page URLs to estimate (1-100).
locationstringSearch market (default: United States)
location_codeintegerOptional provider location code. Wins over location when provided.
languagestringLanguage code or name (default: en)
include_paidbooleanInclude paid-search traffic estimates (default: true)
include_featured_snippetbooleanInclude featured-snippet traffic estimates (default: true)
include_local_packbooleanInclude local-pack traffic estimates (default: false)
sort_byenumorganic_traffic, total_traffic, paid_traffic, opportunity, or target (default: organic_traffic)
POST /domain/traffic-estimate example
curl -X POST https://www.agentseo.dev/api/v1/domain/traffic-estimate?sync=true \
  -H "x-api-key: $AGENTSEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"targets":["hubspot.com","salesforce.com","zendesk.com"], "location":"United States", "language":"en", "include_paid":true, "include_featured_snippet":true, "include_local_pack":false, "sort_by":"organic_traffic"}'

POST/pages/intersection

Compare ranking pages to find shared page keywords or competitor-page keywords excluded from your pages. Returns search volume, page ranks, rank spread, traffic gap, intent, SERP features, priority, agent_workflow, and markdown_summary. Requests cost 5 credits per 100 requested keywords, minimum 5. Clickstream enrichment doubles the credit cost.

Request fields · required fields are labeled
NameTypeDescription
pagesRequiredstring[]Absolute page URLs or wildcard URL patterns to compare. Maximum 5.
exclude_pagesstring[]Absolute page URLs or wildcard URL patterns to exclude, usually your own page group. Maximum 5.
locationstringSearch market (default: United States)
item_typesstring[]organic, paid, featured_snippet, or local_pack (default: organic and featured_snippet)
limitintegerKeywords to request, 5-100 (default: 25)
intersection_modeenumunion or intersect (default: union). Use intersect when all supplied pages must rank for the keyword.
include_serp_infobooleanInclude SERP feature metadata for each keyword (default: false)
include_clickstream_databooleanInclude clickstream-normalized metrics. Doubles credit cost (default: false).
min_search_volumeintegerMinimum search volume filter (default: 0)
max_rankintegerMaximum rank for the first supplied page, 1-100 (default: 30)
sort_byenumopportunity, search_volume, traffic_gap, rank, or cpc (default: opportunity)
POST /pages/intersection example
curl -X POST https://www.agentseo.dev/api/v1/pages/intersection?sync=true \
  -H "x-api-key: $AGENTSEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pages":["https://www.hubspot.com/products/crm/*","https://www.salesforce.com/crm/*"], "exclude_pages":["https://www.agentseo.dev/*"], "location":"United States", "limit":25, "intersection_mode":"union", "include_clickstream_data":false, "sort_by":"opportunity"}'

← All endpoints