Checks a page's hreflang annotations against Google's documented rules and verifies that up to 10 alternates link back. Returns one graded JSON report with stable issue codes and Google documentation links. Offline mode checks staging HTML.
Fetch a page, read its hreflang annotations from the HTML head and Link header, validate language and region codes and structure, then fetch up to 10 alternates to verify each links back. Optional maxAlternates (0 to 10) and fresh=1 parameters.
Check HTML and headers you send in (body: {"url": "...", "html": "...", "headers": {...}, "alternates": [{"url": "...", "html": "..."}]}). Offline, no outbound request, for staging or unpublished pages; send at least one of html or headers.
Easiest way: the APIHub CLI. Credits cover x402, no wallet needed.
# install and set up once
npx @apihubio/cli register
npx @apihubio/cli topup 10
# call this service
npx @apihubio/cli call -X GET "https://proxy.apihub.io/hreflang/v1/check?url=https://example.com"Or call the proxy directly (curl / any HTTP client):
curl https://proxy.apihub.io/hreflang/v1/check?url=https://example.com \
-H "Authorization: Bearer ahk_your_key"
# If credits available: charged automatically, returns 200
# Otherwise: returns 402 (pay via @x402/fetch or top up credits)Estimate your monthly cost for Hreflang Validator.