REST API
Free, unauthenticated endpoints for the essentials.sh generators, described by an OpenAPI 3.1 spec.
Base URL https://essentials.sh · no authentication · CORS enabled · full
spec at /openapi.json.
Errors are structured JSON with a stable code and a hint:
{ "error": { "code": "invalid_url", "message": "…", "hint": "…" } }Endpoints
Generate a QR code
curl "https://essentials.sh/api/qr.svg?url=https%3A%2F%2Fexample.com&ec=M" -o qr.svgGET /api/qr.svg — returns image/svg+xml. Query params: url (required),
ec (error correction: L ~7%, M ~15% default, Q ~25%, H ~30%).
Build meta tags
curl -X POST https://essentials.sh/api/meta \
-H 'content-type: application/json' \
-d '{"title": "Acme — ship faster", "description": "Acme helps teams ship.", "url": "https://acme.com"}'POST /api/meta — returns { meta_tags }: title, description, canonical,
Open Graph, and Twitter card tags, HTML-escaped. Optional fields: siteName,
image, twitterHandle, themeColor.
Build robots.txt
curl -X POST https://essentials.sh/api/robots \
-H 'content-type: application/json' \
-d '{"siteUrl": "https://acme.com", "aiTrain": false, "blockAiTrainers": true}'POST /api/robots — returns { robots_txt } with AI Content Signals
(search/aiInput/aiTrain booleans), optional disallow paths, and
optional hard blocks for known AI-training crawlers.
Build a sitemap
curl -X POST https://essentials.sh/api/sitemap \
-H 'content-type: application/json' \
-d '{"siteUrl": "https://acme.com", "paths": ["/", "/about", "/pricing"]}'POST /api/sitemap — returns { sitemap_xml }. Optional lastmod
(YYYY-MM-DD).
Build an llms.txt
curl -X POST https://essentials.sh/api/llms-txt \
-H 'content-type: application/json' \
-d '{"siteName": "Acme", "summary": "Ship faster.", "sections": [{"title": "Docs", "links": [{"title": "Guide", "url": "https://acme.com/docs"}]}]}'POST /api/llms-txt — returns { llms_txt } per
llmstxt.org.
Scan a site
curl "https://essentials.sh/api/scan?url=example.com"GET /api/scan — fetches a public site and reports 12 checks (title,
description, canonical, Open Graph, Twitter card, favicon, robots.txt,
Content Signals, sitemap, llms.txt, JSON-LD, reachability), each failing
check with a fixUrl to the tool that fixes it. Public domains only;
results cached ~10 minutes per origin.