惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
U
Unit 42
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
S
SegmentFault 最新的问题
阮一峰的网络日志
阮一峰的网络日志
雷峰网
雷峰网
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
Apple Machine Learning Research
Apple Machine Learning Research
罗磊的独立博客
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
L
LangChain Blog
Engineering at Meta
Engineering at Meta
量子位
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
A
About on SuperTechFans
Y
Y Combinator Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Generate SEO Meta Tags for Any URL with One API Call
Daniel Valen · 2026-04-26 · via DEV Community

Daniel Valentin Alonso Maqueira

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"}'

Enter fullscreen mode Exit fullscreen mode

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"
}

Enter fullscreen mode Exit fullscreen mode

The API:

  1. Fetches the URL server-side
  2. Extracts the main content (no scripts, no nav, no footer noise)
  3. Sends it to Claude Haiku with a tuned prompt
  4. Returns title (max 60 chars) + description (max 160 chars)
  5. Validates lengths before returning

Why not just use ChatGPT?

You absolutely can. But:

  1. 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.
  2. You have to fetch the page yourself — adds boilerplate (HTML parsing, content extraction, dealing with bot blocks).
  3. 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.
  4. 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"]})

Enter fullscreen mode Exit fullscreen mode

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)"}'

Enter fullscreen mode Exit fullscreen mode

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.