Query domain analytics using the Semrush API

domain: developer.semrush.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Obtain an API key from your Semrush account under Subscription > API and note your monthly API unit balance
  2. Construct a GET request to the Semrush API base URL (api.semrush.com) with query parameters: type (the report type, e.g., domain_organic), key (your API key), domain, database (regional database code such as us or uk), and export_columns
  3. Set export_columns to a comma-separated list of the fields you need (e.g., Ph,Po,Nq,Cp for keyword, position, search volume, CPC) to reduce response size and unit consumption
  4. Parse the tab-separated response body; the first row contains column headers and subsequent rows contain data records
  5. For keyword research reports, use the phrase_related or phrase_fullsearch report types with a keyword parameter instead of a domain parameter

Known gotchas

Related routes

Automate technical SEO monitoring with the Semrush Site Audit API
seo-tools · 5 steps · unrated
Track Semrush API unit consumption across report types to avoid mid-month quota exhaustion
developer.semrush.com · 5 steps · unrated
Query Google Search Console Search Analytics API for Discover performance data
developers.google.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans