Use this reusable workflow to inspect JSON-LD, Open Graph, and Twitter Card metadata in a browser, verify what a page actually exposes, and catch missing, duplicated, or inconsistent values before a launch or template change.
Overview
Page metadata serves several different purposes. JSON-LD describes entities and content in a structured format that search systems and other software can interpret. Open Graph tags help define how a URL is represented when shared on supported social platforms and messaging tools. Twitter Card tags provide additional sharing instructions for services that read them. These layers overlap around fields such as title, description, image, and URL, but they are not interchangeable.
A reliable audit starts by separating the page you requested from the page a browser eventually renders. Some values are present in the original HTML response, while others may be added or changed by JavaScript. Check both when the page uses client-side rendering, a tag manager, or a content management system that builds templates dynamically.
You can perform a basic audit with browser developer tools, then use a JSON formatter or validator to inspect embedded data more comfortably. For a broader workflow, see JSON Formatter and Validator when a JSON-LD block is difficult to read, and this guide to finding public JSON data without scraping rendered HTML when you need to distinguish embedded data from visible page content.
| Metadata layer | Where to find it | Typical audit question |
|---|---|---|
| JSON-LD | <script type='application/ld+json'> | Does the structured object describe the correct page and entity? |
| Open Graph | <meta property='og:*'> | Will the shared URL have an accurate title, image, description, and canonical URL? |
| Twitter Card | <meta name='twitter:*'> | Are the card type and supporting values present and consistent? |
Checklist by scenario
Scenario 1: Inspect a page manually in the browser
- Open the target URL in a private or clean browser session if personalization could affect the output.
- Use View Page Source first. Search for
application/ld+json,og:title,og:description,og:image,og:url, andtwitter:card. - Open developer tools and inspect the live DOM as a second pass. Compare the live document with the original source to identify metadata added or modified after load.
- Record every matching tag rather than stopping at the first result. Multiple JSON-LD blocks can be valid, but duplicate Open Graph or Twitter values may create ambiguity for consumers.
- Check the page at its final URL after redirects. Metadata should describe the canonical page, not an old path, tracking URL, or staging address.
Scenario 2: Extract JSON-LD in the console
For a quick browser-based extraction, open the console and run:
const blocks = [...document.querySelectorAll('script[type="application/ld+json"]')].map(node => node.textContent.trim());
console.log(blocks);This returns the raw JSON-LD blocks from the live DOM. To test whether each block is valid JSON, parse them individually:
blocks.map((block, index) => {
try {
return { index, data: JSON.parse(block), valid: true };
} catch (error) {
return { index, valid: false, error: error.message };
}
});Parsing confirms syntax, not correctness. A valid object can still describe the wrong page, use an unsuitable type, omit important properties, or contain stale values.
Scenario 3: Extract Open Graph and Twitter Card fields
Run a selector that captures both the attribute name and its value:
const metadata = [...document.querySelectorAll('meta[property^="og:"], meta[name^="twitter:"]')]
.map(tag => ({
key: tag.getAttribute('property') || tag.getAttribute('name'),
value: tag.getAttribute('content') || ''
}));
console.table(metadata);Review the output as a set. A social preview is more dependable when its title, description, image, and URL all refer to the same document and language version.
Scenario 4: Audit a JavaScript-rendered page
Start with the raw response, then wait for the page to finish loading and inspect the live DOM. If the tags only appear after scripts run, document that dependency and test the page under the same conditions used by your intended crawlers, preview tools, or publishing workflow.
When browser rendering is necessary at scale, a tool such as Playwright can load pages and query their final DOM. Use a normal, rate-limited process and respect the site’s access rules. The Playwright guide for JavaScript-rendered websites provides a related workflow, while this BeautifulSoup versus Playwright comparison helps clarify when a static parser is sufficient.
What to double-check
JSON-LD accuracy
- Confirm that the JSON is syntactically valid and that each block is a complete object or array.
- Check that the page type and entity match the visible content. Do not copy a template’s type or properties onto unrelated pages.
- Verify names, dates, images, URLs, identifiers, and relationships against the page and the publishing source.
- Look for duplicate representations of the same entity that disagree on a title, URL, image, or date.
- Inspect nested objects such as authors, organizations, offers, or images rather than checking only the top-level keys.
Open Graph consistency
- Check that
og:titleandog:descriptionsummarize the specific URL. - Confirm that
og:urluses the preferred public URL and is not a preview, parameterized, or internal address. - Inspect every
og:imagevalue and its optional supporting fields, such as image URL, width, height, and type, where your implementation uses them. - Make sure the image and copy are appropriate for the page, locale, and campaign context.
Twitter Card coverage
- Check the selected card type and confirm that its required supporting fields are supplied by the template.
- Compare Twitter values with Open Graph values. They may intentionally differ, but accidental differences often indicate an incomplete template.
- Review image URLs, titles, descriptions, and creator or site fields for outdated branding or environment-specific values.
Use a structured data testing or social preview tool as a second opinion, not as a replacement for inspecting source and live DOM. A browser audit shows what your page emits; a preview tool can reveal how a particular consumer interprets it.
Common mistakes
- Checking only the rendered page: A browser can show content that was added after the initial response. Always compare source and live DOM when implementation details matter.
- Checking only the source: Client-side applications may add metadata after load. If the source is empty but the live DOM contains tags, test the rendering path separately.
- Assuming valid JSON-LD is correct JSON-LD: Syntax validation does not prove that the object is relevant, complete, or consistent with visible content.
- Leaving placeholder values in templates: Search for strings such as “Example title,” empty content attributes, staging hostnames, and default images.
- Creating duplicate tags during migrations: A new SEO plugin, framework component, or tag manager can leave old metadata in place. Count matches across the full document.
- Ignoring URL normalization: HTTP versus HTTPS, trailing slashes, locale paths, query parameters, and redirects can produce conflicting page identities.
- Testing one page only: Audit representative templates: home, category, article, product, author, landing, and error pages where applicable.
- Confusing metadata with access permission: Extracting public HTML does not grant permission to bypass authentication, restrictions, or a site’s stated access rules.
For repeatable extraction, save the URL, timestamp, source-versus-DOM result, detected keys, duplicate count, and validation errors. Normalize the results before exporting them so that a comparison between audits is meaningful. The web scraping data-cleaning workflow covers useful principles for normalizing URLs and exporting reliable JSON or CSV.
When to revisit
Re-run this checklist before a new site or template goes live, after changing a CMS, frontend framework, SEO plugin, analytics setup, or image pipeline, and whenever URL structure or localization changes. It is also useful before seasonal planning cycles when titles, descriptions, campaign images, or landing-page templates are updated.
Keep a small baseline report for representative URLs. On the next audit, compare JSON-LD block counts, metadata keys, canonical and social URLs, image sources, and important text values. Investigate differences rather than assuming every change is an error; some changes are intentional, while others expose a template regression.
For a practical final pass, use this order: fetch the final URL, inspect source, inspect the live DOM, extract and format JSON-LD, list Open Graph and Twitter tags, check duplicates, compare values with visible content, and test representative page types. Save the findings with the deployment or content-change record. That turns an occasional metadata check into a lightweight browser-based quality-control step.