reviewedby-schema
v0.1.0
Published
Generate standards-correct reviewedBy / E-E-A-T JSON-LD for content provenance. MIT-licensed, by CertREV.
Downloads
159
Maintainers
Readme
AI search engines and crawlers increasingly reward content that carries verifiable signals of who reviewed it. Schema.org's reviewedBy is the property that says "a named reviewer checked this page for accuracy." This library emits correct, validatable JSON-LD for that — free, zero-dependency, and MIT-licensed.
What it does — and does not do. It builds valid
WebPage→reviewedBy→Person+hasCredentialmarkup and warns on common E-E-A-T mistakes. It does not verify that a credential is real. That binding — a vetted expert and a board-checked credential — is the CertREV service.
Why this shape
Verified against schema.org (v30):
reviewedByis a property ofWebPage, with a range ofPersonorOrganization.lastReviewed(also onWebPage) carries the review date.- The reviewer's expertise is modeled as
Person→hasCredential→EducationalOccupationalCredential, withcredentialCategoryandrecognizedBy(the issuing board / authority).
So this library produces a WebPage with reviewedBy + lastReviewed, the content as mainEntity (an Article with its own author and publisher), and the reviewer's credential modeled properly — the structure Google and LLM crawlers actually parse.
Install
npm install github:CertREV/reviewedby-schema
# (npm registry release coming soon)Zero dependencies, ES modules, Node >= 18.
Quick start
import { generate, toScriptTag, validate } from 'reviewedby-schema'
const input = {
page: { url: 'https://example.com/blog/glycolic-acid-guide' },
article: {
headline: 'The Complete Guide to Glycolic Acid for Skin Renewal',
datePublished: '2026-05-01',
author: { name: 'Sarah Mitchell', jobTitle: 'Beauty Editor' },
},
reviewer: {
name: 'Dr. Elena Vasquez',
jobTitle: 'Board-Certified Dermatologist',
url: 'https://example.com/experts/elena-vasquez',
credential: {
name: 'Board Certified in Dermatology',
category: 'board certification',
recognizedBy: { name: 'American Board of Dermatology', url: 'https://www.abderm.org' },
},
},
organization: { name: 'CertREV', url: 'https://certrev.com', logo: 'https://certrev.com/logo.png' },
dateReviewed: '2026-06-02',
}
const check = validate(input) // { valid, errors[], warnings[] }
const html = toScriptTag(generate(input)) // ready-to-paste <script> blockAPI
generate(input) → object
Returns the JSON-LD WebPage object. Throws if reviewer.name is missing. Undefined/empty fields are pruned, so the output never contains nulls.
toScriptTag(jsonld) → string
Wraps a JSON-LD object in a ready-to-paste <script type="application/ld+json"> block.
validate(input) → { valid, errors, warnings }
Checks required fields (a reviewer name and a page/article URL) and warns on common E-E-A-T gaps: a missing credential, no recognizedBy authority, a non-standard credentialCategory, a missing dateReviewed, a missing publisher, no author, or non-ISO dates.
CREDENTIAL_CATEGORIES
The frozen list of recommended credentialCategory values: license, certification, degree, board certification, professional designation.
Example output
{
"@context": "https://schema.org",
"@type": "WebPage",
"url": "https://example.com/blog/glycolic-acid-guide",
"reviewedBy": {
"@type": "Person",
"name": "Dr. Elena Vasquez",
"hasCredential": {
"@type": "EducationalOccupationalCredential",
"name": "Board Certified in Dermatology",
"credentialCategory": "board certification",
"recognizedBy": { "@type": "Organization", "name": "American Board of Dermatology" }
}
},
"lastReviewed": "2026-06-02",
"mainEntity": { "@type": "Article", "headline": "...", "author": { "@type": "Person", "name": "Sarah Mitchell" } }
}See examples/ for a full runnable example.
What good provenance includes
A named reviewer, their credential, the issuing authority, the review date, and a stable URL for the reviewer. validate() nudges you toward all five.
How CertREV uses this
This is the open schema layer. CertREV adds the parts that make the markup true: vetted experts, board-checked credentials, SHA-256 content hashing, a public certificate page, and embeddable trust badges. Learn more at certrev.com.
Contributing
Issues and PRs welcome. Run the tests with npm test (node --test, no build step).
License
MIT © CERTREV LLC
