apyhub
DEVELOPER TOOLS · SEO

Validate HTML API

What it does

HTML Validator checks a page’s markup for structured data and related SEO signals. Send raw HTML in the html field, and get back the detected structured-data and metadata objects the page exposes.

Use it to audit pages before release, spot missing or malformed schema markup, and confirm that search engines can read the signals you intend to publish. The response includes the page url when available, plus json_ld, microdata, meta_tags, open_graph, and twitter_card data extracted from the HTML.

The summary object gives you a quick read on what was found: warnings, critical_errors, overall_score, total_entities, types_found, and rich_results_eligible. That makes it useful for automated QA in CI, content checks in CMS workflows, or bulk review of landing pages after template changes.

If you work on technical SEO or structured data, HTML Validator gives you a compact way to inspect what’s actually present in the document without parsing it yourself.

POST
Validate HTML
http://localhost:8080/chisleroff/validate-html
QUICKSTARTGUIDE

Quickstart

Send the HTML you want to validate as a JSON body.

curl -X POST "http://localhost:8080/chisleroff/validate-html" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"html":"<!doctype html><html><head><title>Example</title></head><body><h1>Hello world</h1></body></html>"}'

What you'll get back

Returns a JSON object with these top-level fields when present: url and source_url are strings, json_ld, microdata are arrays of objects, meta_tags, open_graph, and twitter_card are objects, and summary is an object with warnings and critical_errors integers, overall_score as a number, total_entities as an integer, and types_found and rich_results_eligible as arrays of strings.

{
  "url": "https://example.com/page",
  "json_ld": [],
  "summary": {
    "warnings": 0,
    "types_found": [],
    "overall_score": 0,
    "total_entities": 0,
    "critical_errors": 0,
    "rich_results_eligible": []
  },
  "meta_tags": {},
  "microdata": [],
  "open_graph": {},
  "source_url": "https://example.com/page",
  "twitter_card": {}
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Raw HTML content to validate for structured data (max 5,000,000 characters).

About this endpoint

What it does

Validates the structured data found in raw HTML content. It accepts an HTML string in the request body and returns the extracted structured-data-related artifacts and summary information found in the page.

Request Body

ParameterTypeMandatoryDescription
htmlStringYesRaw HTML content to validate for structured data. Maximum length: 5,000,000 characters.

Response

Returns a JSON object with these top-level fields: url string, json_ld array of objects, summary object, meta_tags object, microdata array of objects, open_graph object, source_url string, and twitter_card object.

ParameterTypeMandatoryDescription
urlStringNoThe URL associated with the validated HTML, if provided in the response.
json_ldObject ArrayNoJSON-LD objects extracted from the HTML. Each item is an object that may contain additional properties.
summaryObjectNoValidation summary information. Contains the following fields: warnings integer, types_found string array, overall_score number, total_entities integer, critical_errors integer, and rich_results_eligible string array.
meta_tagsObjectNoMeta tag data extracted from the HTML. The object may contain additional properties.
microdataObject ArrayNoMicrodata objects extracted from the HTML. Each item is an object that may contain additional properties.
open_graphObjectNoOpen Graph data extracted from the HTML. The object may contain additional properties.
source_urlStringNoThe source URL associated with the HTML, if provided in the response.
twitter_cardObjectNoTwitter card data extracted from the HTML. The object may contain additional properties.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.