SDTT v4.5.0 is a library and CLI tool for inspecting and testing structured data on web pages, supporting JSON-LD, Microdata, and RDFa. It automatically detects Schema.org schemas in HTML or JSON sources, and includes built-in presets for Google, Twitter, Facebook, and social media meta tags. Users can create custom presets or schemas, and integrate with any test framework. The tool can accept URLs, files, strings, buffers, or streams, and output results to JSON. It is designed for ad-hoc testing or integration into CI/CD pipelines. Released under MIT license, it is actively maintained on GitHub.
npm install structured-data-testing-toolNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Perform a structured data test on a URL against Twitter/Facebook presets and Article schema.
Update code to use async/await or .then() with the new Promise-based API.
Replace Presets.SocialMedia with explicit individual presets.
Use --presets 'Twitter,Facebook' or supply multiple flags: -p Twitter -p Facebook.
Update any scripts that parse the output file to handle the new nested format.
Pass the full rendered HTML (e.g., from Puppeteer) as a string or buffer instead of URL.
Update imports from const SDTT = require(...) to import { structuredDataTest } from '...'.Use named import: import { structuredDataTest } from 'structured-data-testing-tool'Run npm install structured-data-testing-tool
Upgrade Node.js to version 14 or higher
Use the --file option with locally saved HTML or pass a headless browser response instead