Automate Open Graph audit
Stop shipping broken link previews
January 23, 2026 ()
A naked URL without an Open Graph image and proper metadata is a conversion leak. It looks unprofessional, and it gets scrolled past. Additionally, SEO can be affected since Google values those who maintain their pages better.
We built a Sharing Debugger Tool for exactly this: paste in any URL and instantly see how your metadata looks across different platforms. It's perfect for spot-checking individual pages.
The problem is scale. You can't manually audit a sitemap with 5,000 pages using a browser extension. You need infrastructure that scales with your deployment.
The cost of broken links
- Visually Dominant: Rich previews occupy 400% more pixels in a feed than plain text.
- Developer Trust: If your meta tags are broken, maybe your API too.
- CTR is King: You can rank #1 on Google, but if your social sharing is broken, your viral coefficient is zero.
For organizations with thousands of pages, content updates happen daily. When multiple employees have the ability to modify pages, you need a robust solution that can recurrently analyze all your sitemaps to catch regressions.
In this post you'll learn to use Microlink to automate your own scans to maintain quality. We're going to look at a simplified example that gives you the foundation to build on.
The simple stack
I wanted this to be lightweight and practical, not some enterprise monstrosity. Three dependencies, that's it:
- sitemapper: Grabs every URL from your sitemap (even handles nested sitemap indexes).
- microlink/mql: Fetches metadata exactly like social networks see it.
- p-map: Manages concurrency so you don't melt the free tier API.
Getting started
Five minutes of setup:
The script that does the heavy lifting
Create audit.js file and drop this in:
Running your first audit
Just fire it up:
A quick heads-up on rate limits: If you're on the free plan, keep CONCURRENCY at 1. You'll avoid those annoying 429 errors. With a Pro plan, you can crank it to 10 or 20 and blast through thousands of pages in minutes.
What makes this actually work
When you call
mql(url, { meta: true }), we're not just parsing HTML. We spin up a real headless Chrome browser.Why does this matter?
Your React/Vue/Angular site renders properly. Even if you're doing client-side rendering we execute the JavaScript and grab the tags after they're populated.
Level up, semantic SEO with AI
Since you are already fetching the page metadata, why not validate the quality of the content?
Once you have it running, you can add extra features as elaborate as you want. You could take the title and description and ask an LLM that, by analyzing the website content, checks and improves both the title and description if it considers appropriate to climb positions in Google's ranking.
You can extend and adapt to your use case or your clients' and offer a service that makes a difference.
Not a Node.js developer?
This example uses Node.js because that's what I work with daily, but the Microlink API works with any language.
Want to rewrite this in Python, Ruby, Go, or whatever you're comfortable with?
Here's how to adapt it:
Copy this prompt and paste it into Claude, ChatGPT, or your AI tool of choice:
The AI will handle the translation and suggest the right libraries for your language. I've seen people successfully port this to Python (using requests and
BeautifulSoup
), Ruby (with Nokogiri
), and even shell scripts with curl.Make this part of your deploy process
Want to never ship broken OG tags again? Add this to your GitHub Actions or GitLab CI:
Now your deploy will fail if someone breaks the social metadata. Trust me, your marketing team will love you for this.
About me
I'm Joseba, and I've been a CTO and full-stack developer for 15+ years. Now I'm scaling Microlink.
Questions about the API or link previews? Hit me up at
joseba@microlink.io
Join the community
All of these improvements or features are community driven: We listen to your feedback and act accordingly.
Whether you are building a product, an indie developer, or just interested in web technologies, come chat with us.