SEO Regression Testing in CircleCI

Add SEO quality gates to your CircleCI workflows.

CircleCI workflows support SEODiff validation as an inline command. Add it to your deployment pipeline to catch regressions before production.

Configuration

Copy this configuration into your project:

version: 2.1
jobs:
  seo-check:
    docker:
      - image: cimg/base:current
    steps:
      - run:
          name: SEODiff Validate
          command: |
            RESULT=$(curl -s -w "\n%{http_code}" \
              -X POST "https://seodiff.io/api/v1/validate" \
              -H "Authorization: Bearer $SEODIFF_API_KEY" \
              -H "Content-Type: application/json" \
              -d "{\"url\": \"$PREVIEW_URL\", \"wait\": true}")

            HTTP_CODE=$(echo "$RESULT" | tail -1)
            BODY=$(echo "$RESULT" | head -n -1)
            echo "$BODY" | jq .

            if [ "$HTTP_CODE" -eq 409 ]; then
              echo "SEO regression detected"
              exit 1
            fi

workflows:
  deploy:
    jobs:
      - build
      - deploy-preview
      - seo-check:
          requires: [deploy-preview]
      - deploy-production:
          requires: [seo-check]

Setup Steps

Add environment variable

Project Settings → Environment Variables → Add SEODIFF_API_KEY.

Add the job to your config

Insert the seo-check job into your .circleci/config.yml.

Push a change

The seo-check job gates the deploy-production job — deployments are blocked until SEODiff passes.

What Gets Checked

The /validate endpoint runs a surface scan and checks for SEO regressions. For deeper testing, combine it with the /agent/evaluate endpoint to add custom assertion rules:

no_placeholders

Find template variables like {{city}} or [TBD] that leaked into production HTML.

max_token_bloat

Detect when boilerplate overwhelms useful content for LLM crawlers.

has_schema

Ensure every page has valid JSON-LD schema markup for rich results.

min_schema_count

Require a minimum number of JSON-LD schema blocks per page.

View all 17 assertion rules →

Other Integrations

Start testing in 30 seconds

Get an API key and run your first evaluation with a single cURL command.

Get API Key or Read full API docs