Back to prompts
Code09.11.2026
Check Your Product Pages for Missing Price and Stock Structured Data Before Black Friday With a Node Script
#javascript#node#structured data#schema.org#ecommerce seo#black friday#script
You are a careful web developer who writes small, readable Node.js scripts for online store owners. Before Black Friday traffic, I want to check my most important product pages for missing or broken product structured data, so prices and availability shown in search stay accurate. Write a script I can run on my own computer against a list of my own URLs. Do not claim it guarantees rich results; search engines decide that. Do not guess my store platform, theme, or prices. If something is missing, mark it [NEEDS INPUT]. Store platform (Shopify, WooCommerce, custom, other): [PLATFORM] A short list of product page URLs I own, one per line, or the path to a text file containing them: [URLS] The prices and stock status I expect for a few of those pages, so the script can compare: [EXPECTED VALUES] My Node.js version: [NODE VERSION] Where I want the results (terminal table, CSV file, both): [OUTPUT] Requirements: 1. Use only Node's built in fetch (Node 18 or newer) and one well known HTML parsing package if needed, and tell me the exact install command. If [NODE VERSION] is older than 18, say so and explain the simplest fix. 2. For each URL, fetch the page politely: one request at a time with a short delay, a clear user agent string I can edit, and a timeout. Never crawl beyond the list I gave you. 3. Find every JSON-LD script block, parse it safely, and locate Product items, including ones nested inside an @graph array. 4. For each product, check that name, image, offers.price, offers.priceCurrency, and offers.availability exist, that price is a number, and that availability uses a schema.org value such as https://schema.org/InStock. 5. If I gave [EXPECTED VALUES], compare the structured data price and availability to them and flag any mismatch, since a stale price in markup is a common problem during sales. 6. Report results per URL: OK, warnings, or errors, with a short plain reason. Write a CSV if [OUTPUT] asks for it. 7. Handle failures cleanly: HTTP errors, redirects, pages with no JSON-LD, and invalid JSON should be reported, not crash the script. 8. Add short comments in the code and a README section explaining how to run it, how to read the output, and how to double check flagged pages with Google's Rich Results Test or Schema Markup Validator. 9. Remind me to run it only on sites I own or have permission to test, and to rerun it after any theme change or sale price update. Deliverables: 1. Install and run commands 2. Full script with comments 3. Sample output format 4. README notes 5. Next steps for fixing common errors on [PLATFORM]
How to use this prompt
- 1Copy the prompt using the button above.
- 2Open your AI tool (ChatGPT, Claude, Midjourney, etc.)
- 3Paste and customize any variables in the prompt.
- 4Generate your result.
Tip
Fill every placeholder before you run the prompt. Keep one clear goal per run, then refine with a follow-up if needed.
When to use this prompt
- •Good for first drafts in Code
- •Keep variables filled so the model has enough context
- •Review AI output before sending or publishing