Skip to main content
AI agents are now live in Website Scanner! Enter your URL and fix website issues 3x faster with AI. Explore now!
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

Create scan API in Website Scanner

Use this API to create a one-time or recurring accessibility website scan.

create scan

POST /api/v1/scanner/create

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 true to trigger a scan immediately after creating the configuration.

  • scheduleStart String

    Start date for the scheduled scan in YYYY-MM-DD format (for example, 2024-12-29).

  • scheduleEnd String

    End date for the scheduled scan in YYYY-MM-DD format. Pass null for no end date.

  • scanData* Object

    Configuration data for the scan, including URLs and accessibility settings.

    â–¶ SHOW VALUES
    • urlSet Array

      The list of URLs to scan (for example, ["www.example.com"]).

    • a11yConfig Object

      Accessibility scan configuration.

      â–¶ SHOW VALUES
      • 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

        The WCAG guideline version for the scan.

        â–¶ SHOW VALUES
        • value String

          The WCAG version used for the scan (for example, wcag21aa or wcag22aaa).

  • 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

    Local testing configuration for scanning pages accessible only through BrowserStack Local.

    â–¶ SHOW VALUES
    • 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

    Contains the IDs of the newly created scan project and initial scan run report.

    â–¶ SHOW VALUES
    • projectId Integer

      The unique ID of the newly created scan project.

    • reportId Integer

      The unique ID of the initial scan run report (created if instantRun was set to true).

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.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Download Copy Check Circle