Skip to content

Repository files navigation

structured-data-analyzer

See exactly what Google and AI engines understand about a page from its structured data, and what they still cannot. It reads a page's JSON-LD, microdata, RDFa and Open Graph, reconstructs the entity a machine would build from it (brand name, logo, description, linked profiles, product, article), lists the rich results the markup can earn, scores how machine-readable the page is, and names every gap as a concrete, mechanical absence.

No API key. Runs as a library, a CLI, or a self-hosted HTTP endpoint.

What it tells you

  • What machines understand: the brand and page a search or AI engine can assemble from your markup, drawn from every format on the page, not just JSON-LD.
  • Rich results you can earn: site name, logo, knowledge panel, breadcrumb, review stars, product, article, video, event, and more, each marked active or not based on the schema actually present.
  • A machine-readability score with two halves, brand identity and page content, so a page is judged for what it is. A rich product page with no brand schema is not called "empty"; it lands mid-scale with the brand gaps listed.
  • Gaps: each one a fact ("no logo in your Organization schema"), never an opinion about your writing.

Install

npm install @beeranked/structured-data-analyzer
npx @beeranked/structured-data-analyzer example.com

Requires Node 18 or newer.

CLI

structured-data-analyzer example.com
structured-data-analyzer https://example.com/product --json

Library

import { analyzeUrl, analyzeHtml } from '@beeranked/structured-data-analyzer';

const report = await analyzeUrl('example.com');
console.log(report.score, report.grade);       // 72 'Solid'
console.log(report.understands);                // name, logo, description, socials, types
console.log(report.richResults.filter(r => r.active));
console.log(report.gaps);

// or analyze HTML you already have, no network:
const offline = analyzeHtml('<html>...</html>', 'https://example.com/');

Lower-level pieces are exported too: extractSignals(html) and analyzeSignals(signals, url).

Self-host as an HTTP endpoint

worker.js is a ready Cloudflare Worker:

npm install
cp wrangler.toml.example wrangler.toml
npx wrangler deploy

Current wrangler (v4) needs Node 22 or newer; on Node 18 or 20, deploy with npx wrangler@3 deploy instead.

Then POST / with { "url": "https://example.com" }, or GET /?url=....

Notes

The score and grade are this tool's own heuristic, clearly labelled as such, not a search engine's ranking. The tool reports what your markup declares and what it omits; what to change is your call.

Hosted version

There is a free hosted version with a visual report at beeranked.online/structured-data, from the team that maintains this project.

License

MIT. See LICENSE.

About

See what Google and AI engines understand from a page's structured data, with a machine-readability score and gaps. Node library, CLI and Worker.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages