Create scan API in Website Scanner
Use this API to create a one-time or recurring accessibility website scan.
create scan
If Geo Region Restriction (GRR) is enabled for your account, add your region code to the host name:
api-accessibility-<region>.browserstack.com. See Geo Region Restriction endpoints for the region codes and examples.
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,
"cookieConfigIds": [24, 25]
}'
-
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. - Show 4 more
-
scanData* Object
â–¶ SHOW VALUESConfiguration data for the scan, including URLs and accessibility settings.
-
urlSet Array
The list of URLs to scan (for example,
["www.example.com"]). -
a11yConfig Object
â–¶ SHOW VALUESAccessibility scan configuration.
-
advanced Boolean
Enable advanced accessibility rules. Default is
true. -
bestPractices Boolean
Include best practice violations. Default is
true. -
needsReview Boolean
Include issues that need review. Default is
false. -
wcagVersion Object
â–¶ SHOW VALUESThe WCAG guideline version for the scan.
-
value String
The WCAG version used for the scan (for example,
wcag21aaorwcag22aaa).
-
-
-
-
authConfigId Integer
ID of the authentication configuration to use for pages that require login.
-
cookieConfigIds Array
IDs of cookie configurations to apply to this scan. Maximum 20 per scan.
-
localTestingInfo Object
â–¶ SHOW VALUESLocal testing configuration for scanning pages accessible only through BrowserStack Local.
-
localIdentifier String
The BrowserStack Local tunnel identifier.
-
enabled Boolean
Whether BrowserStack Local is enabled for this scan.
-
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.
-
projectId Integer
The unique ID of the newly created scan project.
-
reportId Integer
The unique ID of the initial scan run report (created if
instantRunwas set totrue).
-
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.