Get Top Pages with Semrush
/v1/semrush/top-pagesThis endpoint is in Beta. Read one page of the current daily domain report in descending traffic order. Set page (1–100, default 1) and page_size (1–100, default 100). The response includes rows for the requested page, page, page_size and the report-wide total. A valid empty page succeeds. Each successfully delivered page is billed once. Failed pages incur no charge. Use a new Idempotency-Key for each page and reuse the same key and body when retrying a page. If top_pages reports seo_rpc_error, the same key returns the saved failure. You can query another domain immediately with a new key. Requires a Team API key. Temporary provider issues are retried automatically within the same request, up to 60 seconds by default. Persistent service failures may return seo_upstream_unavailable. For HTTP 429, wait for the interval in the Retry-After header.
On this page
Request example
Replace placeholders with your values. Use your Team API key for authenticated requests.
https://kieapi.comcurl -X POST "https://kieapi.com/v1/semrush/top-pages" \
-H "Authorization: Bearer $SPIDER_API_KEY" \
-H 'Idempotency-Key: docs-example-01' \
-H "Content-Type: application/json" \
-d '{
"domain": "example.com"
}'Authentication
BearerAuth
Parameters
Idempotency-Keyheader · string required
Request body required
application/json
domainstring requireddatabasestringDefault:
"us"pageintegerDefault:
1page_sizeintegerDefault:
100
Responses
200 Successful Response
application/json
Illustrative complete response (synthetic data; quoted Credits, not a live result) example
{
"tool": "semrush",
"task": "top-pages",
"status": "success",
"query": {
"domain": "example.com",
"database": "us",
"page": 1,
"page_size": 100
},
"modules": {
"top_pages": {
"status": "success",
"data": {
"rows": [
{
"sources": [
"Google Search",
"AI Overview"
],
"url": "https://example.com/",
"traffic": 20,
"traffic_change": -2,
"traffic_percent": 4.98,
"keywords": 8,
"llm_prompts": 2,
"referring_domains": 0,
"top_keyword": null,
"intents": [
"Informational"
]
}
],
"total": 1,
"page": 1,
"page_size": 100
},
"error_code": null
}
},
"limitations": [],
"billing": {
"status": "captured",
"credits": 20
}
}400 ValidationError
401 AuthenticationRequired
402 InsufficientCredits
403 PermissionDenied
409 BillingConflict
429 RateLimitExceeded
502 ExecutionFailed
503 ServiceUnavailable
Schemas
Field definitions and complete validation rules for this API. Follow a type link to its definition.
SemrushTopPagesInput
object
domainstring requireddatabasestringDefault:
"us"pageintegerDefault:
1page_sizeintegerDefault:
100
Complete schema
{
"type": "object",
"additionalProperties": false,
"required": [
"domain"
],
"properties": {
"domain": {
"type": "string",
"minLength": 3,
"maxLength": 253,
"example": "example.com"
},
"database": {
"type": "string",
"pattern": "^[a-z]{2}$",
"default": "us"
},
"page": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 1
},
"page_size": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 100
}
}
}SemrushTopPagesResponse
SeoResponse and object
Complete schema
{
"allOf": [
{
"$ref": "#/components/schemas/SeoResponse"
},
{
"type": "object",
"properties": {
"tool": {
"type": "string",
"const": "semrush",
"description": "Server-selected tool identity; not a request parameter."
},
"task": {
"type": "string",
"const": "top-pages"
},
"query": {
"$ref": "#/components/schemas/SemrushTopPagesInput"
},
"modules": {
"type": "object",
"properties": {
"top_pages": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"enum": [
"success",
"failed",
"not_run"
]
},
"error_code": {
"type": [
"string",
"null"
]
},
"data": {
"type": [
"object",
"null"
],
"required": [
"rows",
"total",
"page",
"page_size"
],
"properties": {
"page": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"page_size": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"total": {
"type": "integer",
"minimum": 0
},
"rows": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SemrushTopPageRow"
}
}
}
}
}
}
},
"additionalProperties": false
}
}
}
]
}SeoResponse
object
toolstring requiredAllowed:
"similarweb", "semrush"taskstring requiredstatusstring requiredAllowed:
"success", "partial", "failed"queryobject requiredmodulesobject requiredlimitationsarray of stringsourceSeoSource or nullDefault:
nullbillingSeoBillingSummary
Complete schema
{
"properties": {
"tool": {
"enum": [
"similarweb",
"semrush"
],
"title": "Tool",
"type": "string"
},
"task": {
"title": "Task",
"type": "string"
},
"status": {
"enum": [
"success",
"partial",
"failed"
],
"title": "Status",
"type": "string"
},
"query": {
"additionalProperties": true,
"title": "Query",
"type": "object"
},
"modules": {
"additionalProperties": {
"$ref": "#/components/schemas/SeoModuleResult"
},
"title": "Modules",
"type": "object"
},
"limitations": {
"items": {
"type": "string"
},
"title": "Limitations",
"type": "array"
},
"source": {
"anyOf": [
{
"$ref": "#/components/schemas/SeoSource"
},
{
"type": "null"
}
],
"default": null
},
"billing": {
"$ref": "#/components/schemas/SeoBillingSummary"
}
},
"required": [
"tool",
"task",
"status",
"query",
"modules"
],
"title": "SeoResponse",
"type": "object"
}SeoModuleResult
object
statusstring requiredAllowed:
"success", "failed", "not_run"dataobject or array of object or nullerror_codestring or null
Complete schema
{
"properties": {
"status": {
"type": "string",
"enum": [
"success",
"failed",
"not_run"
],
"title": "Status"
},
"data": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"title": "Data"
},
"error_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Error Code"
}
},
"type": "object",
"required": [
"status"
],
"title": "SeoModuleResult"
}SeoSource
object
providerstring requiredAllowed:
"semrush"requested_toolstringDefault:
"semrush"retrieved_atnumber or nullDefault:
nulldata_datestring or nullDefault:
nulldata_date_fromstring or nullDefault:
nullrequested_date_satisfiedboolean or nullDefault:
nullcache_hitbooleanDefault:
falsestalebooleanDefault:
falsefallback_reasonstring or nullDefault:
nulllocation_codeinteger or nullDefault:
nulllanguage_codestring or nullDefault:
nullcurrencystring or nullDefault:
nulldevicestring or nullDefault:
nullsnapshot_kindstring or nullDefault:
null
Complete schema
{
"properties": {
"provider": {
"enum": [
"semrush"
],
"title": "Provider",
"type": "string"
},
"requested_tool": {
"const": "semrush",
"default": "semrush",
"title": "Requested Tool",
"type": "string"
},
"retrieved_at": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Retrieved At"
},
"data_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Date"
},
"data_date_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Date From"
},
"requested_date_satisfied": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Requested Date Satisfied"
},
"cache_hit": {
"default": false,
"title": "Cache Hit",
"type": "boolean"
},
"stale": {
"default": false,
"title": "Stale",
"type": "boolean"
},
"fallback_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fallback Reason"
},
"location_code": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Location Code"
},
"language_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language Code"
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Currency"
},
"device": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Device"
},
"snapshot_kind": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Snapshot Kind"
}
},
"required": [
"provider"
],
"title": "SeoSource",
"type": "object"
}SeoBillingSummary
object
statusstring requiredcreditsintegerDefault:
0
Complete schema
{
"properties": {
"status": {
"type": "string",
"title": "Status"
},
"credits": {
"type": "integer",
"title": "Credits",
"default": 0
}
},
"type": "object",
"required": [
"status"
],
"title": "SeoBillingSummary"
}SemrushTopPageRow
object
sourcesarray of string requiredurlstring (uri) requiredtrafficinteger requiredtraffic_changeinteger required- Signed change in traffic.
traffic_percentnumber required- Percentage points, e.g. 49.78 means 49.78%.
keywordsinteger requiredllm_promptsinteger requiredreferring_domainsinteger required- Unavailable counts are shown as zero.
top_keywordstring | null requiredintentsarray of string required
Complete schema
{
"type": "object",
"required": [
"sources",
"url",
"traffic",
"traffic_change",
"traffic_percent",
"keywords",
"llm_prompts",
"referring_domains",
"top_keyword",
"intents"
],
"properties": {
"sources": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Google Search",
"ChatGPT",
"AI Overview",
"AI Mode",
"Gemini"
]
}
},
"url": {
"type": "string",
"format": "uri"
},
"traffic": {
"type": "integer",
"minimum": 0
},
"traffic_change": {
"type": "integer",
"description": "Signed change in traffic."
},
"traffic_percent": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Percentage points, e.g. 49.78 means 49.78%."
},
"keywords": {
"type": "integer",
"minimum": 0
},
"llm_prompts": {
"type": "integer",
"minimum": 0
},
"referring_domains": {
"type": "integer",
"minimum": 0,
"description": "Unavailable counts are shown as zero."
},
"top_keyword": {
"type": [
"string",
"null"
]
},
"intents": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Informational",
"Navigational",
"Commercial",
"Transactional",
"Unknown"
]
}
}
}
}PublicErrorResponse
object
errorPublicError required
Complete schema
{
"type": "object",
"additionalProperties": false,
"required": [
"error"
],
"properties": {
"error": {
"$ref": "#/components/schemas/PublicError"
}
}
}PublicError
object
codestring requiredAllowed:
"seo_price_pending", "seo_provider_blocked", "seo_local_rate_limited", "seo_fallback_unavailable", "seo_fallback_budget_exceeded", "seo_pagination_expired", "seo_delivery_uncertain", "seo_auth_required", "seo_initialization_required", "seo_permission_denied", "seo_verification_required", "seo_rate_limited", "seo_upstream_unavailable", "seo_transport_failed", "seo_invalid_response", "seo_rpc_error", "seo_period_unavailable", "seo_account_unavailable", "seo_session_busy", "seo_configuration_required", "validation_error", "invalid_request", "unsupported_feature", "authentication_required", "permission_denied", "not_found", "idempotency_key_required", "timeout", "quota_exceeded", "insufficient_credits", "billing_reconciliation_required", "rate_limited", "idempotency_conflict", "idempotency_in_progress", "service_unavailable", "internal_error"messagestring requiredtypestring requiredAllowed:
"auth", "validation", "quota", "rate_limit", "not_found", "execution", "conflict", "internal"retryableboolean requiredrequest_idstring | nulldetailsobject
Complete schema
{
"type": "object",
"additionalProperties": false,
"required": [
"code",
"message",
"type",
"retryable"
],
"properties": {
"code": {
"type": "string",
"enum": [
"seo_price_pending",
"seo_provider_blocked",
"seo_local_rate_limited",
"seo_fallback_unavailable",
"seo_fallback_budget_exceeded",
"seo_pagination_expired",
"seo_delivery_uncertain",
"seo_auth_required",
"seo_initialization_required",
"seo_permission_denied",
"seo_verification_required",
"seo_rate_limited",
"seo_upstream_unavailable",
"seo_transport_failed",
"seo_invalid_response",
"seo_rpc_error",
"seo_period_unavailable",
"seo_account_unavailable",
"seo_session_busy",
"seo_configuration_required",
"validation_error",
"invalid_request",
"unsupported_feature",
"authentication_required",
"permission_denied",
"not_found",
"idempotency_key_required",
"timeout",
"quota_exceeded",
"insufficient_credits",
"billing_reconciliation_required",
"rate_limited",
"idempotency_conflict",
"idempotency_in_progress",
"service_unavailable",
"internal_error"
]
},
"message": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"auth",
"validation",
"quota",
"rate_limit",
"not_found",
"execution",
"conflict",
"internal"
]
},
"retryable": {
"type": "boolean"
},
"request_id": {
"type": [
"string",
"null"
]
},
"details": {
"type": "object",
"additionalProperties": true
}
}
}