🪣 SEO Diff Testing in Bitbucket Pipelines

Integrate SEO regression checks into Bitbucket Pipelines deployments.

Bitbucket Pipelines supports SEODiff validation via curl. Add it as a step in your deployment pipeline to catch SEO regressions before they reach production.

Configuration

Copy this configuration into your project:

pipelines:
  pull-requests:
    '**':
      - step:
          name: SEO Validation
          image: curlimages/curl:latest
          script:
            - |
              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)

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

Setup Steps

Add repository variable

Repository settings → Pipelines → Repository variables → Add SEODIFF_API_KEY (secured).

Update bitbucket-pipelines.yml

Add the SEO validation step to your pull-request pipeline.

Create a pull request

The pipeline runs automatically and blocks the PR if regressions are detected.

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