Adding JSON-LD to ten pages by hand is fine. Adding it to a thousand pages on Webflow, Drupal or a headless CMS is not, because there is often no plugin to do it for you.
One way around this is to let a crawler build the schema while it reads each rendered page.
Why rendering matters
Many CMS platforms inject content with JavaScript. A crawler that only reads the raw HTML can miss it. Screaming Frog can render pages in headless Chromium first, so your script sees the finished DOM.
Turn it on under Configuration > Spider > Rendering > JavaScript. You need a paid licence for this.
The script
Add this as a Custom JavaScript extraction snippet. Change .author-name to match your template.
const text = (selector) => {
const el = document.querySelector(selector);
return el ? el.textContent.trim() : undefined;
};
const attr = (selector, name) => {
const el = document.querySelector(selector);
return el ? el.getAttribute(name) : undefined;
};
const author = text('.author-name');
const schema = {
'@context': 'https://schema.org',
'@type': 'Article',
headline: text('h1'),
description: attr('meta[name="description"]', 'content'),
image: attr('meta[property="og:image"]', 'content'),
datePublished: attr('meta[property="article:published_time"]', 'content'),
author: author ? { '@type': 'Person', name: author } : undefined,
mainEntityOfPage: attr('link[rel="canonical"]', 'href') || location.href
};
return seoSpider.data(JSON.stringify(schema));
JSON.stringify drops undefined values, so a missing field is left out instead of becoming an empty string.
Run it
- Test the snippet on one URL.
- Check the output in Google's Rich Results Test.
- Switch to List mode and upload your blog URLs.
- Crawl, then export the results as a CSV.
Common problems
- Missing fields: your selector does not match the template.
- Incomplete content: raise the rendering wait time to 5-10 seconds on heavy pages.
- Invalid JSON: validate it before you publish.
Start with one page type, such as blog posts, then move to product or location pages.
The full walkthrough covers templates and other schema types: Generating JSON-LD schema at scale with Screaming Frog
Top comments (0)