Skip to documentation
AgentSEO / Docs
Browse documentation
View Markdown ↗

API reference / REST v1

Search & extraction

Search results, page extraction, and SERP analysis.

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

Perform a Google search with optional domain filtering. Returns raw SERP evidence plus agent_support so an agent can choose the next workflow.

Request fields · required fields are labeled
NameTypeDescription
queryRequiredstringSearch query
locationstringTarget location (default: United States)
location_codeintegerOptional search location code for deterministic geo-targeting
languagestringISO code (default: en)
limitintegerMax results (1-50, default: 10)
include_domainsarrayOnly return results from these domains
exclude_domainsarrayExclude results from these domains
POST /search example
curl -X POST https://www.agentseo.dev/api/v1/search?sync=true \
  -H "x-api-key: $AGENTSEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"best crm software", "location":"Austin, TX", "location_code":1026201, "limit":5}'

POST/extract

Extract clean content (markdown/text/html) from any URL. Returns page metadata, structural headings, and agent_support for follow-up workflow selection.

Request fields · required fields are labeled
NameTypeDescription
urlRequiredstringTarget URL
formatenummarkdown, text, html (default: markdown)
include_imagesbooleanInclude image extraction (default: false)
POST /extract example
curl -X POST https://www.agentseo.dev/api/v1/extract \
  -H "x-api-key: $AGENTSEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://tcrn.ch/example"}'

POST/analyze/serp

Analyze SERP features (Local Pack, AI Overview, Shopping) for a keyword. Returns serp_opportunity so agents can infer intent, competition, and the right content format.

Request fields · required fields are labeled
NameTypeDescription
keywordRequiredstringTarget keyword
locationstringTarget location (default: US)
location_codeintegerOptional search location code for deterministic geo-targeting
deviceenumdesktop or mobile (default: desktop)
languagestringISO code (default: en)
POST /analyze/serp example
curl -X POST https://www.agentseo.dev/api/v1/analyze/serp?sync=true \
  -H "x-api-key: $AGENTSEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword":"plumbers near me", "location":"Austin, TX", "location_code":1026201, "device":"mobile"}'

← All endpoints