Web Data

Hreflang validation API

Validate the hreflang annotations of a page from HTML and HTTP headers, then fetch up to 20 alternate pages to confirm that each one links back. Catch invalid codes, missing x-default, missing self references and broken return links.

CategoryWeb Data
Endpoints1
Key Features4
Frequently asked questions4

Used by people at these companies

InstantOutseerMongoDBRespondentSage Expense ManagementInstantlyD.R. HortonWhatConvertsAdobeLLM Pulse

Trust signals before you integrate

Transparent docs, authenticated requests, and visible reliability details make it easier to evaluate DomScan before you ship.

LiveService status

Check live service health and documented failure responses before you integrate.

OpenAPIAPI artifacts

OpenAPI, Swagger, Postman, CLI, SDK, and MCP links are one click away.

API keysProtected access

Authenticated endpoints use API keys with clear credit costs before you call them.

1,000Free credits

Start with 1,000 free credits every month. Need more? Pick a monthly plan or buy a one-time pack.

What this API helps you ship

Use this page as a production brief: endpoints, examples, response shape, and the workflow pieces needed to plug DomScan into your own product.

Product workflows

Embed domain checks, DNS intelligence, risk signals, or enrichment into onboarding, search, and internal tools.

Analyst automation

Replace repeated manual lookups with scheduled jobs, alerting, and reproducible investigation steps.

Clean JSON data

Use predictable fields, documented status codes, and credit costs instead of scraping provider pages.

AI and ops tooling

Feed agents, dashboards, SOAR playbooks, and CRMs through OpenAPI, SDK, Postman, or MCP.

Integration workflow

A simple path from first request to repeatable production usage.

1
Authenticate once

Send your API key with the documented header and keep requests consistent across services.

2
Query with examples

Start from the curl and HTTP samples, then map the parameters into your application code.

3
Operate and monitor

Use status codes, credit costs, and response fields to build retries, logs, and alerts.

Developer kit

Jump from this page into machine-readable docs, request collections, SDKs, or agent tooling.

Parameters and response map

Scan the inputs, output fields, and status codes before wiring the endpoint into your client.

Request parameters

Parameter

urlmax_alternates
Response fields

Example response

statusentriesself_referencex_defaultissuesreturn_linksreturn_links.checkedreturn_links.confirmedreturn_links.missingreturn_links.unknown
Status coverage

HTTP status codes

200400401402429

Endpoints

GET /v1/hreflang
Credits: 3Authentication: Authentication required

Trust signals before you integrate

Transparent docs, authenticated requests, and visible reliability details make it easier to evaluate DomScan before you ship.

LiveService status

Check live service health and documented failure responses before you integrate.

OpenAPIAPI artifacts

OpenAPI, Swagger, Postman, CLI, SDK, and MCP links are one click away.

API keysProtected access

Authenticated endpoints use API keys with clear credit costs before you call them.

1,000Free credits

Start with 1,000 free credits every month. Need more? Pick a monthly plan or buy a one-time pack.

Key Features

Code validation

Language, script and region subtags are checked, including common mistakes such as en-UK instead of en-GB and underscores instead of hyphens.

Return link checks

Alternate pages are fetched to confirm they link back to the page, and redirects, canonicals pointing elsewhere and language mismatches are flagged.

HTML and HTTP headers

Annotations are read from link tags and from the HTTP Link header, and each entry shows where it was found.

Set level issues

Missing self reference, missing x-default, relative URLs and one code pointing to several URLs are reported for the whole set.

Example request

GET /v1/hreflang?url=example.com/shoes/trail-runnerbash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/hreflang?url=example.com/shoes/trail-runner"

Example response

200 OKjson
{
  "status": "ok",
  "entries": [
    { "hreflang": "en", "url": "https://example.com/shoes/trail-runner", "valid_code": true },
    { "hreflang": "es-ES", "url": "https://example.com/es/zapatillas/trail-runner", "valid_code": true },
    { "hreflang": "x-default", "url": "https://example.com/shoes/trail-runner", "valid_code": true }
  ],
  "self_reference": true,
  "x_default": true,
  "issues": [],
  "return_links": { "checked": 1, "confirmed": 1, "missing": 0, "unknown": 0 }
}

Frequently asked questions

What does missing_return_links mean?

At least one alternate page was read and does not link back to the audited page. Hreflang annotations must be reciprocal or search engines may ignore them.

What if an alternate page cannot be read?

It is reported as unknown with a reason, never as a missing return link, so blocked or slow pages do not create false errors.

Are XML sitemap hreflang entries checked?

This API checks the page HTML and HTTP headers. Use the sitemap audit API to see whether sitemaps carry hreflang extensions.

How many credits does it cost?

Three credits per audit, including return link checks of up to 20 alternate pages. Results that end in status unknown are refunded.

Related tools and resources

HTTP status codes

These are the HTTP status codes to handle, so you can tell apart successful responses, auth issues, credits, rate limits, missing data, and upstream failures.

OK200

Request successful

Bad Request400

Invalid parameters

Unauthorized401

Missing or invalid API key/session.

Payment Required402

Not enough credits to run this request.

Too Many Requests429

Rate limit exceeded

What customers say

4.9/5 from 34 verified buyer reviews

Having those checks in one place is what sold me on DomScan.

Verified buyer · November 2026

It suits the domain hunts, watching certificates and domain expiry hassles I have done manually for years.

Verified buyer · November 2026