Overview
The Semrush SEO API lets you retrieve SEO data programmatically, including keyword metrics, backlink data, and competitor insights. Use it to build custom SEO tools, automate reporting, enrich applications with search data, or integrate Semrush metrics into dashboards and AI workflows.
The Version 4 SEO API includes reports for:
Reports that haven’t migrated to Version 4 yet remain available in Version 3. To compare what each version covers, refer to API versions.
Jump to AuthenticationAuthentication
Request authentication is provided via API keys. SEO API in Version 4 requires a Version 4 API key which is assigned to each user after subscribing to Semrush.
You’ll find your API key in the API keys section of your Semrush profile. If your API key is unavailable there, refer to API access.
Jump to Response formatResponse format
SEO API report endpoints return responses in both CSV and JSON formats.
Jump to ColumnsColumns
Each Semrush SEO API method supports a set of response fields that determine the data returned in CSV and JSON responses.
For v4 methods that support the fields query parameter, you can use these field names to include only the data relevant to your analysis.
backlinks_countbacklinks_countscompetitive_densitycpcdomains_countfirst_seen_atkeyword_difficultylast_seen_atnumber_of_resultsscoresearch_volumeJump to Error messagesError messages
When a request fails, the API returns a structured error response.
{
"meta": {
"success": false,
"status_code": 403,
"request_id": "a29952029c10a47e5876d86256e59455"
},
"error": {
"code": 403,
"message": "Forbidden",
"retryable": false,
"details": {}
}
}Jump to Response fieldsResponse fields
meta.successmeta.status_codemeta.request_iderror.codeerror.messageerror.retryableerror.detailsJump to HTTP status codesHTTP status codes
400 Bad Request401 Unauthorized403 Forbidden404 Not Found409 Conflict429 Too Many Requests499 Client Closed Request500 Internal Server Error501 Not Implemented503 Service Unavailable504 Gateway TimeoutJump to Advanced filteringAdvanced filtering
Most API endpoints provide standard query parameters for filtering and sorting results.
Use the filter parameter when standard parameters are insufficient, and you need non-equality operators such as >, LIKE, or logical disjunction such as OR.
Jump to SyntaxSyntax
The filter parameter uses the following format: Field Operator Value.
?filter=volume > 500 AND (keyword CONTAINS "best" OR keyword STARTS_WITH "top")Jump to Supported operatorsSupported operators
- Comparison:
>,>=,<,<= - Pattern:
LIKE,CONTAINS,STARTS_WITH,ENDS_WITH,WORD_MATCH - Set:
IN,NOT_IN - Logical:
AND,OR - Array:
HAS,HAS_ANY,HAS_ALL
Jump to Data typesData types
- Strings: Always wrap in double quotes.
- Numbers: Use raw integers or floats.
- Booleans:
trueorfalse, case-insensitive. - Lists or arrays: Use parentheses and separate items with commas.
Jump to FAQFAQ
Jump to What data can I retrieve with the SEO API?What data can I retrieve with the SEO API?
The Version 4 SEO API provides keyword and backlink data through the Backlinks and Keyword reports.
Jump to What can I build with the SEO API?What can I build with the SEO API?
You can build SEO dashboards, reporting tools, internal applications, AI-powered workflows, and custom integrations using Semrush SEO data. To make your first request, refer to the Quick start guide.
Jump to Why should I use Version 4 Semrush API?Why should I use Version 4 Semrush API?
Version 4 Semrush API is the recommended version for new integrations. It provides modern authentication and JSON responses. To compare what each version covers, refer to API versions.
Last updated: August 5, 2026