Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Compare Heading Structure

seo.compare_heading_structure

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

Diff supplied heading outlines with an explicit named algorithm. We never fetch a URL, run a script, or choose a winner. A successful call costs 1 execution credit.

Heading structure compare is an outline diff on lists you send.

Reliability

seo.compare_heading_structure is stable for identical input. Identical input always produces identical JSON. SEO_INPUT_REQUIRED means a required field is missing or has the wrong shape, so send the published object rather than a guessed map; retrying unchanged will not help. SEO_INPUT_TOO_LARGE means a value exceeds its ceiling, so trim it. SEO_HTML_MALFORMED means the HTML could not be parsed under the offline HTML contract, so fix the markup. SEO_XML_MALFORMED means the XML is not well-formed, so correct it. SEO_XML_DOCTYPE_NOT_ALLOWED means the XML includes a DOCTYPE declaration, so strip the DOCTYPE and resend; we refuse DTDs rather than expanding entities. SEO_JSONLD_MALFORMED means a JSON-LD block is not usable JSON, so correct it. SEO_PROFILE_UNKNOWN means the named profile is not bundled, so send one of the published profile ids. SEO_TOO_MANY_RECORDS means a list exceeded its ceiling, so split the batch. SEO_GRAPH_LIMIT_EXCEEDED means the graph exceeded its node or edge ceiling, so shrink it. SEO_INVALID_URL means a URL string is not a usable RFC 3986 URI, so send an absolute URI. SEO_OBSERVATION_INCOMPLETE means required observation coverage is missing, so add the missing evidence. SEO_INPUT_CONFLICT means two fields that cannot be used together were both supplied, so drop one. Retrying an unchanged request will not help.

Context footprint

Returns a compact structured record. A successful call costs 1 execution credit.

When to use it

When you already have two heading outlines and need added, removed, or reordered headings.

When headings still need extracting, or you want word-count compare.

Scope

Note
Diff supplied heading outlines with an explicit named algorithm.

Non-goals

  • Does not fetch a URL, resolve DNS, or run a browser
  • Does not predict ranking, choose a winner, or claim live index status
  • Does not fetch or rewrite headings

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysisparsing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input1 MB

How we handle your data

Sensitive output possible
What this means

This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response may contain submitted or transformed content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
pagesarrayYesRequired. Closed array 'pages' with named properties or bounded items used by this skill, up to 10,000 entries or 64 properties.
comparisonobjectYesRequired. Closed object 'comparison' with named properties or bounded items used by this skill, up to 10,000 entries or 64 properties.

Output schema

FieldTypeRequiredDescription
outlinesarrayYesRequired. Structured 'outlines' value. Objects expose named properties; arrays list bounded rows or strings produced from the supplied artifacts, up to 10,000 entries.
differencesarrayYesRequired. Structured 'differences' value. Objects expose named properties; arrays list bounded rows or strings produced from the supplied artifacts, up to 10,000 entries.
algorithmstringYesRequired. Structured 'algorithm' value produced by this offline analysis.
pageCountintegerYesRequired. Structured 'pageCount' value produced by this offline analysis.
winnerSelectedbooleanYesRequired. Structured 'winnerSelected' value produced by this offline analysis.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"seo.compare_heading_structure","input":{"comparison":{"algorithm":"outline-diff"},"pages":[{"canonical":"https://www.example.com/","description":"Hello","headings":[{"level":1,"text":"Home"}],"id":"a","links":["https://www.example.com/","https://www.example.com/a"],"text":"Hello world","title":"Home","wordCount":4},{"canonical":"https://www.example.com/b","description":"Hello","headings":[{"level":1,"text":"Home"}],"id":"b","links":["https://www.example.com/","https://www.example.com/a"],"text":"Hello world","title":"Home","wordCount":4}]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("seo.compare_heading_structure", {"pages":[{"title":"Home","links":["https://www.example.com/","https://www.example.com/a"],"id":"a","description":"Hello","text":"Hello world","headings":[{"level":1,"text":"Home"}],"canonical":"https://www.example.com/","wordCount":4},{"title":"Home","links":["https://www.example.com/","https://www.example.com/a"],"id":"b","description":"Hello","text":"Hello world","headings":[{"level":1,"text":"Home"}],"canonical":"https://www.example.com/b","wordCount":4}],"comparison":{"algorithm":"outline-diff"}});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
SEO_INPUT_REQUIRED400NoThe request payload failed this skill's input validation.
SEO_INPUT_TOO_LARGE429NoA size, quota, rate, or time limit was exceeded.
SEO_HTML_MALFORMED400NoThe request payload failed this skill's input validation.
SEO_XML_MALFORMED400NoThe request payload failed this skill's input validation.
SEO_XML_DOCTYPE_NOT_ALLOWED400NoThe request payload failed this skill's input validation.
SEO_JSONLD_MALFORMED400NoThe request payload failed this skill's input validation.
SEO_PROFILE_UNKNOWN400NoThe request payload failed this skill's input validation.
SEO_TOO_MANY_RECORDS429NoA size, quota, rate, or time limit was exceeded.
SEO_GRAPH_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
SEO_INVALID_URL400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not fetch a URL, resolve DNS, or run a browser
  • Does not predict ranking, choose a winner, or claim live index status
  • Does not fetch or rewrite headings
  • Fetching HTML
  • Rewriting the outline

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "seo.compare_heading_structure",
  "input": {
    "pages": [
      {
        "title": "Home",
        "links": [
          "https://www.example.com/",
          "https://www.example.com/a"
        ],
        "id": "a",
        "description": "Hello",
        "text": "Hello world",
        "headings": [
          {
            "level": 1,
            "text": "Home"
          }
        ],
        "canonical": "https://www.example.com/",
        "wordCount": 4
      },
      {
        "title": "Home",
        "links": [
          "https://www.example.com/",
          "https://www.example.com/a"
        ],
        "id": "b",
        "description": "Hello",
        "text": "Hello world",
        "headings": [
          {
            "level": 1,
            "text": "Home"
          }
        ],
        "canonical": "https://www.example.com/b",
        "wordCount": 4
      }
    ],
    "comparison": {
      "algorithm": "outline-diff"
    }
  }
}

Examples

Primary business path

Inputjson
{
  "pages": [
    {
      "title": "Home",
      "links": [
        "https://www.example.com/",
        "https://www.example.com/a"
      ],
      "id": "a",
      "description": "Hello",
      "text": "Hello world",
      "headings": [
        {
          "level": 1,
          "text": "Home"
        }
      ],
      "canonical": "https://www.example.com/",
      "wordCount": 4
    },
    {
      "title": "Home",
      "links": [
        "https://www.example.com/",
        "https://www.example.com/a"
      ],
      "id": "b",
      "description": "Hello",
      "text": "Hello world",
      "headings": [
        {
          "level": 1,
          "text": "Home"
        }
      ],
      "canonical": "https://www.example.com/b",
      "wordCount": 4
    }
  ],
  "comparison": {
    "algorithm": "outline-diff"
  }
}
Expected outputjson
{
  "outlines": [
    {
      "id": "a",
      "outline": [
        "h1:Home"
      ],
      "counts": {
        "h1": 1
      },
      "total": 1
    },
    {
      "id": "b",
      "outline": [
        "h1:Home"
      ],
      "counts": {
        "h1": 1
      },
      "total": 1
    }
  ],
  "pageCount": 2,
  "algorithm": "outline-diff",
  "differences": [
    {
      "leftId": "a",
      "rightId": "b",
      "onlyLeft": [],
      "onlyRight": []
    }
  ],
  "winnerSelected": false
}
Tip
First realistic scenario for this skill.

Boundary or option path

Inputjson
{
  "pages": [
    {
      "title": "Home",
      "links": [
        "https://www.example.com/",
        "https://www.example.com/a"
      ],
      "id": "a",
      "description": "Hello",
      "text": "Hello world",
      "headings": [
        {
          "level": 1,
          "text": "Home"
        }
      ],
      "canonical": "https://www.example.com/",
      "wordCount": 4
    },
    {
      "title": "Shop",
      "links": [
        "https://www.example.com/",
        "https://www.example.com/b"
      ],
      "id": "b",
      "description": "Hello",
      "text": "Hello world",
      "headings": [
        {
          "level": 1,
          "text": "Shop"
        }
      ],
      "canonical": "https://www.example.com/b",
      "wordCount": 2
    }
  ],
  "comparison": {
    "algorithm": "levenshtein"
  }
}
Expected outputjson
{
  "outlines": [
    {
      "id": "a",
      "outline": [
        "h1:Home"
      ],
      "counts": {
        "h1": 1
      },
      "total": 1
    },
    {
      "id": "b",
      "outline": [
        "h1:Shop"
      ],
      "counts": {
        "h1": 1
      },
      "total": 1
    }
  ],
  "pageCount": 2,
  "algorithm": "levenshtein",
  "differences": [
    {
      "leftId": "a",
      "rightId": "b",
      "onlyLeft": [
        "h1:Home"
      ],
      "onlyRight": [
        "h1:Shop"
      ],
      "distance": 4
    }
  ],
  "winnerSelected": false
}
Tip
Second scenario using an optional field or edge case.
  • Show an h2 that disappeared after a redesign
  • Show a skipped level introduced in the new outline

Avoid for

  • Fetching HTML
  • Rewriting the outline

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

seowebparsing