Technical SEO / API GUIDE

Compare Page Metadata Before and After a Release

Compare page title, description, canonical and H1 before and after a release using a controlled-fixture worked example, verified response path, cost, and failure modes.

A translucent browser page, orange scanning plane and a floating panel of selected page fields.

Capture a page's metadata immediately before a release, capture the same URL immediately after, and compare a fixed set of fields such as title, description, canonical URL, H1, title length, description length, and checks for a missing title or description. The verified metadata path in the documented contract is tasks[0].result[0].items[0].meta, after checking root status_code and task status_code. A comparison is meaningful only when both analyses return usable metadata; HTTP success alone does not establish task success or correct metadata. The supported page operation uses the public base https://dataseo.dev/api/v3 and the endpoint POST /api/v3/on_page/instant_pages.

Primary evidence: what changed between the two controlled fixtures

Run the analysis once for the pre-release URL and once for the post-release URL, extract the same snapshot fields from each result, and diff them. In the controlled fixture, the original page returned title 'Trail Notes' with title_length 11 and description 'A guide to planning your first short trail run.' with description_length 47, while title_too_short was true and no_description was false. The updated page returned title 'Trail Notes: updated checklist' with title_length 30 and description null with description_length 0, while title_too_short was false and no_description was true. The diff therefore flags two changed metadata fields, title and description, with title length and description length as related derived measurements rather than independent metadata values. Fields that did not change in the fixture, including canonical https://fixture.example/trail, H1 ['Your first trail run'], and internal_links_count 1, are still worth diffing because a release that unexpectedly alters them is a regression.

Controlled runtime and arithmetic checks

Failure case: a rejected request is not a comparison

Use exactly one task object in the request body array and keep rendering and resource-loading flags disabled, as shown in the verified request example. The controlled fixture exercised the rendering restriction by rejecting a request with rendering enabled with HTTP 400. Invalid input returns HTTP 400, while a source failure or not-connected condition returns HTTP 503. Keep those HTTP outcomes distinct from task-level status_code and from metadata checks such as no_description, and check HTTP, root status, and task status separately because transport 200 alone does not establish usable results.

DataSEO API contract · Controlled runtime and arithmetic checks

Scope, limitations, and costs

This method covers public HTML up to 2 MB only, with no JavaScript rendering or external resources. Page analysis costs $0.001 per successful request from prepaid credit, and failed requests are free, so a failed request should not be described as billed. Checkout amounts reflect a processing and operating cost adjustment and should not be described as the exact Stripe fee.. This section is limited to the page-metadata task and does not expand into unrelated operations.

DataSEO API contract · DataSEO prepaid pricing

Related next step

After diffing, send every changed field to the release owner with the before and after values rather than a single summarized score. Client design guidance recommends storing snapshots per deploy and diffing the same fixed field set; this snapshot and diff strategy is a client implementation recommendation, not guaranteed API behavior. Re-run the analysis on the live URL when the fixture or staging page can differ from production, and confirm that the canonical URL still matches the intended public URL. Use the API reference to confirm request fields before relying on a new snapshot field.

DataSEO API contract

Illustrative reference request code, not an executed fixture or live API run

Server-side reference example. javascript (Node.js server-side)

// Illustrative reference request code only. This is not a controlled-fixture execution and does not claim
// a live API run. It uses the verified public base and metadata path from the documented contract.
const API_KEY = process.env.DATASEO_API_KEY; // Server-side only; never expose in browser code.

async function analyzePage(url) {
  if (!API_KEY) {
    throw new Error('DATASEO_API_KEY is not set.');
  }
  const response = await fetch('https://dataseo.dev/api/v3/on_page/instant_pages', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify([{
      url,
      enable_javascript: false,
      load_resources: false,
      enable_xhr: false,
      enable_browser_rendering: false,
    }]),
  });
  if (response.status === 402) throw new Error("Insufficient credit: stop without automatic purchase.");
  if (!response.ok) throw new Error("Request failed with HTTP " + response.status);
  const data = await response.json();
  if (data.status_code !== 20000) {
    throw new Error(`Root status_code was ${data.status_code}`);
  }
  const task = data.tasks?.[0];
  if (!task) throw new Error('Response contained no task.');
  if (task.status_code !== 20000) {
    throw new Error(`Task status_code was ${task.status_code}`);
  }
  const item = task.result?.[0]?.items?.[0];
  if (!item?.meta) throw new Error('Task succeeded but returned no item metadata.');
  const meta = item.meta;
  const checks = item.checks ?? {};
  return {
    title: meta.title,
    description: meta.description,
    canonical: meta.canonical,
    h1: meta.htags?.h1 ?? [],
    title_length: meta.title_length,
    description_length: meta.description_length,
    internal_links_count: meta.internal_links_count,
    external_links_count: meta.external_links_count,
    no_title: checks.no_title,
    no_description: checks.no_description,
  };
}

// Client design guidance: this snapshot and diff approach is a client implementation
// recommendation, not guaranteed API behavior. Store before and after snapshots per release,
// then diff the same fixed field set and send changed fields to the release owner.

Limits and interpretation

  • Only public HTML up to 2 MB is analyzed, with no JavaScript rendering or loading of external resources, so JavaScript-rendered metadata will not be seen.
  • Advanced rendering or resource-loading flags were rejected in the controlled fixture with HTTP 400 and a message that rendering, resource loading, and other advanced flags must be disabled.
  • HTTP success alone does not establish usable results; check the HTTP response first, then root status_code, task status_code, and the returned items before reading metadata.
  • Stop on HTTP 402. Do not retry a paid operation or purchase credit automatically without customer authorization.

Sources and verification

Reviewed against first-party documentation and the current DataSEO implementation. Worked scenarios are illustrative unless explicitly identified otherwise. Reviewed 14 November 2026.

  1. DataSEO prepaid pricing
  2. DataSEO API contract
  3. Controlled runtime and arithmetic checks — Synthetic fixtures and pure calculations; no production request or payment was executed.
  4. DataSEO agent integration instructions

Keep building