Writing meta titles and descriptions for hundreds of pages is the kind of work nobody enjoys. You have to read the page, summarize it in 60 characters, write a 155-character description, hit search intent, include the right keywords, and not sound like a robot. For one page it's fine. For a 200-page site? You'll cut corners and your SEO will pay for it.
So I built Origrid Meta Gen — an API that does it for you. One call per URL, optimized output, ready to paste.
How it works
Send a URL, get meta tags back:
curl -X POST https://api.origrid.io/v1/meta/generate \
-H "Content-Type: application/json" \
-d '{"url": "https://yourblog.com/post-about-rust"}'
Response:
{
"title": "Why Rust's Borrow Checker Saved Our Production Database",
"title_length": 56,
"description": "How a small team rewrote a memory-leaking Node service in Rust, eliminated 3 OOM crashes per week, and learned to love the borrow checker.",
"description_length": 142,
"url": "https://yourblog.com/post-about-rust"
}
The API:
- Fetches the URL server-side
- Extracts the main content (no scripts, no nav, no footer noise)
- Sends it to Claude Haiku with a tuned prompt
- Returns title (max 60 chars) + description (max 160 chars)
- Validates lengths before returning
Why not just use ChatGPT?
You absolutely can. But:
- Length validation is a pain — ChatGPT regularly produces 70-character titles that get truncated in Google. The API enforces limits on the server side and retries if it goes over.
- You have to fetch the page yourself — adds boilerplate (HTML parsing, content extraction, dealing with bot blocks).
- Prompt engineering takes iteration — I spent days tuning the prompt to avoid clickbait, generic phrasing ("Discover the secrets of..."), and meta descriptions that just repeat the title.
- Cost at scale — GPT-4 for 1000 pages is expensive. Haiku is 30x cheaper and just as good for this task.
The API wraps all of that into one HTTP call.
Real examples
I tested it on a mix of content types. These are unedited outputs:
| Page type | Generated title | Description |
|---|---|---|
| Tech blog post | How to Profile Memory in Bun: A Practical Guide |
Profile your Bun applications using built-in heap snapshots, find memory leaks, and reduce RAM usage with three concrete debugging techniques. |
| E-commerce product | Black Wool Beanie - Hand-Knit in Portugal |
Soft merino wool beanie hand-knit by artisans in Porto. One size fits most. Free shipping on orders over 50 EUR. |
| Documentation | PostgreSQL JSONB Indexing: Complete Reference |
Master JSONB indexes in PostgreSQL with GIN, BTREE, and partial index strategies. Includes performance benchmarks and migration examples. |
All under length limits. None start with "Discover" or "Learn how to". All capture the actual page intent.
Bulk processing for site migrations
The most useful case is when you migrate a CMS or relaunch a site with no meta tags. Here's a Python script that processes a sitemap:
import requests
import xml.etree.ElementTree as ET
import time
API_URL = "https://origrid-meta-gen.p.rapidapi.com/v1/meta/generate"
HEADERS = {
"X-RapidAPI-Key": "your_key",
"Content-Type": "application/json"
}
def get_meta(url):
resp = requests.post(API_URL, headers=HEADERS, json={"url": url})
return resp.json()
# Parse sitemap.xml
sitemap = requests.get("https://yoursite.com/sitemap.xml").text
root = ET.fromstring(sitemap)
ns = {"sm": "http://www.sitemaps.org/schemas/sitemap/0.9"}
urls = [el.text for el in root.findall(".//sm:loc", ns)]
# Generate meta for each
results = []
for url in urls:
try:
meta = get_meta(url)
results.append({"url": url, **meta})
print(f"OK: {meta['title']}")
except Exception as e:
print(f"FAIL: {url} - {e}")
time.sleep(0.5) # be nice to your rate limit
# Now you have a CSV ready to bulk-update your CMS
import csv
with open("meta_tags.csv", "w") as f:
w = csv.DictWriter(f, fieldnames=["url", "title", "description"])
w.writeheader()
for r in results:
w.writerow({"url": r["url"], "title": r["title"], "description": r["description"]})
200 pages = 200 API calls + 100 seconds of waiting + a CSV ready to import. Beats the 8 hours of manual work.
When it won't work
The API can't help if:
- The page is behind auth (it can't log in for you)
- The page is JavaScript-rendered with no SSR (it sees an empty shell)
- The page is mostly images with no text content
For SSR'd pages with real text, it works on the first try about 95% of the time in my testing.
Try it
Origrid Meta Gen on RapidAPI — free tier, no credit card needed.
Or test directly:
curl -X POST https://api.origrid.io/v1/meta/generate \
-H "Content-Type: application/json" \
-d '{"url": "https://en.wikipedia.org/wiki/Rust_(programming_language)"}'
Built with FastAPI + Claude Haiku. Full OpenAPI docs at api.origrid.io/docs.
What sites would you bulk-process if it took 1 second per page? Curious about CMS plugin ideas — drop a comment.
This article was originally published by DEV Community and written by Daniel Valentin Alonso Maqueira.
Read original article on DEV Community