Transcend Docs

GraphQL for Web Auditor

Instructions for using our GraphQL API with the Web Auditor

You can use Transcend's GraphQL API to access data from previous Web Auditor runs or to set up new Web Auditor runs.

This is helpful if you want to connect automation systems to the Web Auditor results, or if you plan to schedule runs for all pages from an externally run web crawler.

Getting Started

Explore our GraphQL schema and run queries directly via Transcend's GraphQL Playground. Visit api.transcend.io/graphql or (for users of our US-hosted infrastructure) api.us.transcend.io/graphql. The Docs section in the playground can guide you through the schema exploration.

Listing Past Runs

Here's an example query to list all completed auditor runs. Use the filterBy input to narrow the results, for example by the URL scanned (urlScanned), the run status (status), or a schedule (scheduleId).

query {
  auditorRuns(
    first: 30
    filterBy: {
      status: Complete
      # urlScanned: "https://transcend.io/"
    }
  ) {
    nodes {
      urlScanned
      auditorScheduleId
      cookiesFileKey
      requestsFileKey
      id
    }
    totalCount
  }
}

This query returns file keys for the cookies and HTTP requests from each scan. To retrieve the data from a file, run the following query. Use requestsFileKey instead of cookiesFileKey to download the requests file.

query {
  auditorFileLink(input: {
    auditorRunId: "insert id from previous query",
    fileKey: "insert cookiesFileKey from previous query"
  }) {
    temporaryLink
  }
}

Running a Scheduled Job

If you want to schedule a recurring auditor scan, you can run a mutation like this:

mutation CreateAuditorSchedule($scheduleStartAt: Date!) {
  createAuditorSchedule(
    input: {
      urlToScan: "https://transcend.io"
      colorScheme: dark
      deviceType: "Desktop Chrome HiDPI"
      browserSteps: "[{\"action\":\"scrollRandomly\"},{\"action\":\"sleep\",\"duration\":3000}]" # Input an array of steps here
      scheduleStartAt: $scheduleStartAt # ISO String, such as `new Date().toISOString()` in node
      scheduleFrequency: "86400000" # One day in milliseconds as a string. Must be a multiple of one day
      useGPC: true # Set the GPC signal in the scan browser
      region: California # Optional. California or Ireland
    }
  ) {
    results {
      id
      scheduledAt
    }
  }
}

Use this format if you need to specify variables for the date:

{
  "scheduleStartAt": "2024-02-07T19:47:33.353Z"
}

On this page