Detect JavaScript-Dependent Content

Flag pages where content is rendered client-side and invisible to crawlers.

The Problem

Single-page apps (React, Next.js, Vue, Angular, Svelte) often render content client-side. AI crawlers and Google’s first-pass indexer see an empty <div id="root"></div> — the JS ghost. This assertion estimates how much of a page depends on JavaScript execution, flagging SPAs that need SSR or pre-rendering.

The heuristic detects framework mount points (#root, #__next, #app, #__nuxt, [data-reactroot], [ng-app], [data-server-rendered]) and scores content emptiness.

The Hard Way

Fetch the page without JavaScript (curl or Fetch API), then fetch again with a headless browser. Compare the DOM. Repeat for every page and every deployment. This is what Google’s rendering service does, but you need results before deployment.

The SEODiff Way

One API call. Results in under 2 seconds.

POST https://seodiff.io/api/v1/agent/evaluate

{"urls": ["https://example.com/app/dashboard"], "assertions": [{"rule": "max_js_ghost_ratio", "value": 0.1}]}
ParameterTypeExample
valuefloat 0–10.1

Code Examples

Copy-paste examples in your preferred language:

cURL

See the full evaluation example in cURL →

Python

See the full evaluation example in Python →

Node.js

See the full evaluation example in Node.js →

Go

See the full evaluation example in Go →

PHP

See the full evaluation example in PHP →

Related Assertions

max_token_bloat

Detect when boilerplate overwhelms useful content for LLM crawlers.

min_word_count

Prevent thin content by requiring a minimum number of words per page.

selector_exists

Verify critical DOM elements are present on every page.

Use in CI/CD

Add this assertion to your deployment pipeline. Works with any CI platform:

🐙 GitHub Actions

Block bad deployments with automated SEO checks in your GitHub Actions CI/CD pipeline.

🦊 GitLab CI

Add automated SEO quality gates to your GitLab CI/CD pipelines.

▲ Vercel

Automatically validate SEO on every Vercel preview deployment before promoting to production.

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