Create scan API in Website Scanner
Use this API to create a one-time or recurring accessibility website scan.
create scan
For geo-restricted data, use the following endpoints:
https://accessibility-eu.browserstack.com/api/website-scanner/v1/scans (European Union)
https://accessibility.browserstack.com/api/website-scanner/v1/scans (United States)
https://accessibility-in.browserstack.com/api/website-scanner/v1/scans (India)
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-accessibility.browserstack.com/api/website-scanner/v1/scans" \
-H "Content-Type: application/json" \
-d '{
"name": "My Website Scan",
"recurring": true,
"urlList": [
"https://example.com",
"https://example.com/about"
],
"schedulingOptions": {
"frequency": "Weekly",
"recurrenceTime": "14:00",
"recurrenceDay": "Monday",
"recurrenceDate": 15,
"scheduleStart": "2024-02-01",
"scheduleEnd": "2024-12-31"
},
"scanSettings": {
"advancedRules": true,
"bestPractices": false,
"needsReview": true,
"wcagVersion": "wcag21aa"
},
"localTestingInfo": {
"localIdentifier": "my-local-id",
"localEnabled": false
},
"authConfigId": 123456
}'
-
name* String
Name of the scan configuration (for example,
www.example.com). -
recurring Boolean
Whether to schedule the scan to run on a recurring basis. Default is
true. -
instantRun Boolean
Set to
trueto trigger a scan immediately after creating the configuration. -
scheduleStart String
Start date for the scheduled scan in
YYYY-MM-DDformat (for example,2024-12-29). -
scheduleEnd String
End date for the scheduled scan in
YYYY-MM-DDformat. Passnullfor no end date. -
scanData* Object
â–¶ SHOW VALUESConfiguration data for the scan, including URLs and accessibility settings.
-
authConfigId Integer
ID of the authentication configuration to use for pages that require login.
-
localTestingInfo Object
â–¶ SHOW VALUESLocal testing configuration for scanning pages accessible only through BrowserStack Local.
Response Attributes 200 OK JSON
Response
{
"success": true,
"data": {
"id": 123,
"scanRunId": 1234,
"urlCount": 20
},
"error": {
"invalidUrls": ["ww.gogle.con"]
}
}
-
success Boolean
Indicates whether the request was successful.
-
data Object
â–¶ SHOW VALUESContains the IDs of the newly created scan project and initial scan run report.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.