Write the hreflang for the site
https://seolyticize.com /api/v1/tools/generate_hreflang Generates hreflang for every group of language versions in a crawl (tied by existing hreflang, or the same path under a language prefix such as /es/ or /de-at/), each with a self-reference and an x-default (xDefault names the fallback language; default the language of the unprefixed pages): <link> tags for groups under 50 versions, a Link HTTP header for PDFs, and an xhtml:link sitemap for groups of 50 or more (method forces one). Lists groups with two pages claiming one language, and pages whose language could not be told. Answers 'write our hreflang tags' and 'give me an hreflang sitemap'. Free.
Parameters
Idempotency-KeystringheaderRequest body
application/json
clientIdstringrequiredcrawlIdstringxDefaultstringmethodstringlimitinteger{
"clientId": "string",
"crawlId": "latest",
"xDefault": null,
"method": "auto",
"limit": 200
}Code samples
cURL
curl -X POST "https://seolyticize.com/api/v1/tools/generate_hreflang" \
-H "Authorization: Bearer $SEOLYTICIZE_API_KEY" \
-H "Idempotency-Key: <value>" \
-H "Content-Type: application/json" \
-d '{"clientId":"string","crawlId":"latest","xDefault":null,"method":"auto","limit":200}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
data, and its meta.Example
{
"data": {},
"meta": {
"requestId": "string",
"costMicros": 0,
"cached": true,
"cachedFrom": "string",
"dataAsOf": "string",
"sources": [
"string"
],
"partial": true,
"next": [
{
"tool": "string",
"args": {},
"why": "string"
}
],
"nextCursor": "string",
"dryRun": true
}
}Schema
datarequiredmetaobjectrequiredShow child parameters
requestIdstringrequiredcostMicrosintegerrequiredcachedbooleanrequiredcachedFromstringdataAsOfstringsourcesstring[]partialbooleanrequirednextobject[]requiredShow child parameters
toolstringargsobjectwhystringnextCursorstringdryRunbooleanX-RateLimit-LimitintegerX-RateLimit-RemainingintegerX-RateLimit-ResetintegerX-Request-IdstringExample
{
"error": "string",
"code": "string",
"next": "string",
"requestId": "string"
}Schema
errorstringrequiredcodestringnextstringrequestIdstringX-RateLimit-LimitintegerX-RateLimit-RemainingintegerX-RateLimit-ResetintegerSame as 400 · POST /api/v1/tools/generate_hreflang
WWW-AuthenticatestringSame as 400 · POST /api/v1/tools/generate_hreflang
X-RateLimit-LimitintegerX-RateLimit-RemainingintegerX-RateLimit-ResetintegerSame as 400 · POST /api/v1/tools/generate_hreflang
X-RateLimit-LimitintegerX-RateLimit-RemainingintegerX-RateLimit-ResetintegerSame as 400 · POST /api/v1/tools/generate_hreflang
X-RateLimit-LimitintegerX-RateLimit-RemainingintegerX-RateLimit-ResetintegerSame as 400 · POST /api/v1/tools/generate_hreflang
X-RateLimit-LimitintegerX-RateLimit-RemainingintegerX-RateLimit-ResetintegerSame as 400 · POST /api/v1/tools/generate_hreflang
X-RateLimit-LimitintegerX-RateLimit-RemainingintegerX-RateLimit-ResetintegerRetry-AfterintegerSame as 400 · POST /api/v1/tools/generate_hreflang
X-RateLimit-LimitintegerX-RateLimit-RemainingintegerX-RateLimit-Resetinteger