Skip to main content

Health Scores

Health scores provide a single numeric summary (0--100) of your site's performance within a report category such as SEO, Accessibility, or Site Speed. They are calculated after every crawl based on the pass/fail results of individual health score tests.

Querying a single health score​

Use the getHealthScore query when you need the score for a specific report category and crawl. You can optionally scope the result to a segment.

Operation: query GetHealthScore($input: GetHealthScoreInput!) { getHealthScore(input: $input) { crawlId healthScore categoryWeight createdAt healthScoreTestResults(first: 10) { nodes { reportCategoryCode passed severity } } } }Variables: { "input": { "crawlId": "TjAwNUNyYXdsMTU4MzI0NQ", "reportCategoryCode": "seo" } }Response Example: { "data": { "getHealthScore": { "crawlId": "TjAwNUNyYXdsMTU4MzI0NQ", "healthScore": 85.4, "categoryWeight": 1.0, "createdAt": "2025-01-15T10:30:00.000Z", "healthScoreTestResults": { "nodes": [ { "reportCategoryCode": "seo", "passed": true, } ] } } } }
GetHealthScoreTry in Explorer
GraphQL
query GetHealthScore($input: GetHealthScoreInput!) {
getHealthScore(input: $input) {
crawlId
healthScore
categoryWeight
createdAt
healthScoreTestResults(first: 10) {
nodes {
reportCategoryCode
passed
severity
}
}
}
}

Querying multiple health scores for a crawl​

To retrieve scores for several categories at once, use the healthScores field on a Crawl object.

Operation: query GetCrawlHealthScores($crawlId: ObjectID!) { getCrawl(id: $crawlId) { healthScores(reportCategoryCodes: ["seo", "accessibility", "site_speed"]) { healthScore reportCategoryCode categoryWeight } } }Variables: { "crawlId": "TjAwNUNyYXdsMTU4MzI0NQ" }Response Example: { "data": { "getCrawl": { "healthScores": [ { "healthScore": 85.4, "reportCategoryCode": "seo", "categoryWeight": 1.0 }, { "healthScore": 92.1, "reportCategoryCode": "accessibility", "categoryWeight": 1.0 }, { "healthScore": 78.3, "reportCategoryCode": "site_speed", "categoryWeight": 1.0 } ] } } }
GetCrawlHealthScoresTry in Explorer
GraphQL
query GetCrawlHealthScores($crawlId: ObjectID!) {
getCrawl(id: $crawlId) {
healthScores(reportCategoryCodes: ["seo", "accessibility", "site_speed"]) {
healthScore
reportCategoryCode
categoryWeight
}
}
}

The getHealthScoreTrendForCrawl query returns historical health scores across multiple crawls, allowing you to chart improvements or regressions over time.

Operation: query GetHealthScoreTrend($crawlId: ObjectID!) { getHealthScoreTrendForCrawl(crawlId: $crawlId, first: 10) { nodes { crawlId healthScores { healthScore reportCategoryCode } } totalCount } }Variables: { "crawlId": "TjAwNUNyYXdsMTU4MzI0NQ" }Response Example: { "data": { "getHealthScoreTrendForCrawl": { "nodes": [ { "crawlId": "TjAwNUNyYXdsMTU4MzI0Mw", "healthScores": [ { "healthScore": 82.1, "reportCategoryCode": "seo" } ] }, { "crawlId": "TjAwNUNyYXdsMTU4MzI0NQ", "healthScores": [ { "healthScore": 85.4, "reportCategoryCode": "seo" } ] } ], "totalCount": 2 } } }
GetHealthScoreTrendTry in Explorer
GraphQL
query GetHealthScoreTrend($crawlId: ObjectID!) {
getHealthScoreTrendForCrawl(crawlId: $crawlId, first: 10) {
nodes {
crawlId
healthScores {
healthScore
reportCategoryCode
}
}
totalCount
}
}

Creating health score tests​

Health score tests define the thresholds that determine whether a report category passes or fails. Use the createHealthScoreTest mutation to add a new test to a test suite.

Operation: mutation CreateHealthScoreTest($input: CreateHealthScoreTestInput!) { createHealthScoreTest(input: $input) { healthScoreTest { absoluteThreshold automaticThresholdEnabled reportCategoryCode severity thresholdPredicate thresholdType } } }Variables: { "input": { "testSuiteId": "TjAxMVRlc3RTdWl0ZTEyMw", "reportCategoryCode": "seo", "absoluteThreshold": 0.8, "thresholdType": "Relative", "relativeThreshold": 10, "severity": "Fail", "automaticThresholdEnabled": false } }Response Example: { "data": { "createHealthScoreTest": { "healthScoreTest": { "absoluteThreshold": 0.8, "automaticThresholdEnabled": false, "reportCategoryCode": "seo", "severity": "Fail", "thresholdPredicate": "GreaterThanOrEqual", "thresholdType": "Relative" } } } }
CreateHealthScoreTestTry in Explorer
GraphQL
mutation CreateHealthScoreTest($input: CreateHealthScoreTestInput!) {
createHealthScoreTest(input: $input) {
healthScoreTest {
absoluteThreshold
automaticThresholdEnabled
reportCategoryCode
severity
thresholdPredicate
thresholdType
}
}
}

Key fields in CreateHealthScoreTestInput:

FieldDescription
reportCategoryCodeThe report category this test targets (e.g., "seo").
absoluteThresholdThe absolute number threshold for pass/fail.
relativeThresholdPercentage change threshold (used when thresholdType is Relative).
thresholdTypeEither Relative or Absolute.
severityFail or Warning -- controls how a breach is reported.
automaticThresholdEnabledWhen true, Lumar adjusts thresholds automatically based on historical results.

Automatic thresholds​

When automaticThresholdEnabled is set to true, Lumar will adjust the test threshold based on previous crawl results. You can control the acceptance behaviour for improving and worsening results independently using:

  • automaticThresholdAcceptanceWhenTestResultIsBetter -- whether to automatically accept the new threshold when scores improve.
  • automaticThresholdAcceptanceWhenTestResultIsWorse -- whether to automatically accept the new threshold when scores regress.

Copying tests between projects​

Use copyHealthScoreTests to duplicate health score tests from one project to another. Existing tests with the same reportCategoryCode in the target project will be overwritten.

Operation: mutation CopyHealthScoreTests($input: CopyHealthScoreTestsInput!) { copyHealthScoreTests(input: $input) { healthScoreTests { reportCategoryCode absoluteThreshold severity } } }Variables: { "input": { "fromProjectId": "TjAwN1Byb2plY3Q2MTMy", "toProjectId": "TjAwN1Byb2plY3Q5OTA2", "reportCategoryCodes": ["seo", "accessibility"] } }Response Example: { "data": { "copyHealthScoreTests": { "healthScoreTests": [ { "reportCategoryCode": "seo", "absoluteThreshold": 0.8, "severity": "Fail" }, { "reportCategoryCode": "accessibility", "absoluteThreshold": 0.9, "severity": "Warning" } ] } } }
CopyHealthScoreTestsTry in Explorer
GraphQL
mutation CopyHealthScoreTests($input: CopyHealthScoreTestsInput!) {
copyHealthScoreTests(input: $input) {
healthScoreTests {
reportCategoryCode
absoluteThreshold
severity
}
}
}