Zum Inhalt springen
POST AI agent ready /v1/metatag/generate

Meta Tag Generator API - Open Graph, Twitter, and SEO Tags

Given a title and optional description, URL, image, site name, locale, and Twitter card type, produces a complete HTML meta tag block: <title>, description, canonical link, Open Graph tags (title, description, type, locale, url, image, site_name), and Twitter Card tags (card, title, description, image). Returns both HTML and a structured tags array.

Parameters

stringrequired

Page title (non-empty).

string

Page description for SEO and social preview.

string

Canonical URL for the page.

string

Absolute URL to the preview image (1200x630 recommended).

string

Open Graph type.

string

Twitter card type.

string

Open Graph locale.

string

Open Graph site_name.

Code examples

curl -X POST https://api.botoi.com/v1/metatag/generate \
  -H "Content-Type: application/json" \
  -d '{"title":"Launch update — Q2 roadmap","description":"Where we are headed this quarter and what we shipped in Q1.","url":"https://botoi.com/blog/q2-roadmap","image":"https://botoi.com/og/q2-roadmap.png","type":"website","twitter_card":"summary_large_image","locale":"en_US","site_name":"Botoi"}'

When to use this API

Server-render meta tags for SSR frameworks

Pass your page's title/description to this endpoint and inject the returned HTML into the <head>. Replaces dozens of tags you'd otherwise maintain by hand.

CMS plugin for social sharing

Call the endpoint whenever an editor updates a post's SEO fields and cache the output. Ensures Facebook, X, and LinkedIn previews stay in sync with the latest content.

Bulk generate meta tags for programmatic SEO

For a site generating 1000+ pages from data, loop through records and call this endpoint per page. Consistent meta tags across pSEO routes without templating errors.

Frequently asked questions

What Twitter card types are supported?
summary_large_image (default), summary, app, and player. The default works for most blog and article pages.
Are the attribute values HTML-escaped?
Yes. &, ", <, and > in the provided strings are escaped before insertion. Safe to paste the HTML into your template as-is.
Does this output JSON-LD?
No. This endpoint targets Open Graph and Twitter meta tags. For Article, Product, or BreadcrumbList JSON-LD, emit schema separately.
Why include both tags and html?
html is ready to inject into your page. tags is a structured list useful when you need to transform or filter individual tags programmatically before emitting them.
Do I need to set og:type per content kind?
The default "website" works for most pages. For articles use "article"; for products use "product"; for video content use "video.other" per the Open Graph spec.

Get your API key

Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.