Retrieve URLs with SEO issues from a site audit
We’ll follow a simple, repeatable flow:
- Get the audit report and issue codes.
- Retrieve URLs affected by a specific issue.
- Inspect issues on an individual URL.
Step 1. Retrieve the report and extract issue codes
Start by fetching the full audit report using the endpoint Get audit report. This returns all checks performed during the audit, grouped by category and identified by a unique issue code.
curl --location 'https://api.seranking.com/v1/site-audit/audits/report?audit_id=YOUR_AUDIT_ID' \
--header 'Authorization: Token YOUR_API_KEY'In the response, look for the sections array. Each section contains checks with a unique code (for example, http4xx). You’ll use this code to retrieve affected URLs in the next step.
Example snippet:
"http4xx": {
"code": "http4xx",
"status": "error",
"name": "4XX HTTP Status Codes",
"value": 28
}
Step 2. Get all URLs affected by a specific issue
Once you have an issue code, you can fetch the list of the exact URLs impacted by that issue using the endpoint Get audit pages by issue.
curl --location 'https://api.seranking.com/v1/site-audit/audits/issue-pages?code=http4xx&audit_id=700183831&limit=100&offset=0' \
--header 'Authorization: Token YOUR_API_KEY'Example snippet:
{
"total_urls": 28,
"urls": [
"https://example.com/missing-page/",
"https://example.com/old-url/"
],
"urls_type": "simple_urls_array"
}Step 3. Inspect a specific URL
To understand why a URL is flagged and view concrete evidence, fetch all issues found on that page via Get all issues by URL. You can retrieve issues using the full page URL.
curl --location 'https://api.seranking.com/v1/site-audit/audits/issues?audit_id=YOUR_AUDIT_ID&url=PAGE_URL' \
--header 'Authorization: Token YOUR_API_KEY'The response includes:
page_data: full page metrics (words, headings, file sizes) and crawl metadata (encoding, cache, link, and redirect counts).issues: all errors, warnings, and notices found on that page.- Each issue contains a snippet with actionable evidence (for example, redirecting URLs or oversized files).
Optional: Get all crawled pages
If you want a complete list of every page discovered during the audit, use the endpoint Get all crawled pages. This is useful, for example, to build your own reporting, map page IDs to URLs, or to analyze pages without issues.
curl --location 'https://api.seranking.com/v1/site-audit/audits/pages?audit_id=YOUR_AUDIT_ID&limit=100&offset=0' \
--header 'Authorization: Token YOUR_API_KEY'Example snippet:
{
"total": 1009,
"items": [
{
"id": "50958380",
"url": "https://www.example.com/",
"status": "200",
"depth": "1",
"load_ms": "1373",
"title": "Example Homepage",
"issues": "2",
"errors": "0",
"warnings": "0",
"notices": "2",
"inlinks": "922",
"outlinks_internal": "83",
"outlinks_external": "12",
"indexable_status": "ok"
},
{
"id": "50958398",
"url": "https://www.example.com/page/",
"status": "200",
"depth": "2",
"load_ms": "496",
"title": "Example Page",
"issues": "3",
"errors": "0",
"warnings": "1",
"notices": "2",
"inlinks": "898",
"outlinks_internal": "86",
"outlinks_external": "12",
"indexable_status": "ok"
}
]
}
