{
  "name": "page-metadata",
  "summary": "Fetches a page and returns its <head> metadata -- title, description, canonical, language, hreflang, favicon, Open Graph and Twitter cards -- with every URL resolved to absolute.",
  "rationale": "It needs the network and three libraries an agent scraping many pages does not carry: an HTML parser, a legacy charset decoder, and a resolver that honours <base href> and the final redirect hop. Feeding raw HTML to a model to pull these fields costs far more in tokens than this call.",
  "family": "fetch",
  "price_usd": "0.002",
  "free": false,
  "timeout_ms": 8000,
  "max_timeout_seconds": 29,
  "input_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "url": {
        "type": "string",
        "maxLength": 2048,
        "format": "uri",
        "description": "Absolute http(s) URL of an HTML or XHTML page, up to 2048 characters; up to 5 redirects are followed and relative head URLs resolve against the final hop or its <base href>."
      }
    },
    "required": [
      "url"
    ],
    "additionalProperties": false
  },
  "input_example": {
    "url": "https://grist.tools/samples/web/render-article.html"
  },
  "output_example": {
    "url": "https://grist.tools/samples/web/render-article.html",
    "source_url": "https://grist.tools/samples/web/render-article.html",
    "final_url": "https://grist.tools/samples/web/render-article.html",
    "http_status": 200,
    "title": "Measuring Rainfall with a Simple Gauge",
    "description": "A short guide to reading a cylinder rain gauge at the same hour every day.",
    "canonical": "https://grist.tools/samples/web/render-article.html",
    "lang": "en",
    "hreflang": [
      {
        "lang": "en",
        "href": "https://grist.tools/samples/web/render-article.html"
      },
      {
        "lang": "x-default",
        "href": "https://grist.tools/samples/web/render-article.html"
      }
    ],
    "hreflang_total": 2,
    "hreflang_truncated": false,
    "favicon": "https://grist.tools/favicon.png",
    "charset": "utf-8",
    "opengraph": {
      "title": "Measuring Rainfall with a Simple Gauge",
      "description": "Read the gauge at eye level, at the same hour, and write the number down.",
      "image": "https://grist.tools/og.png",
      "type": "article",
      "site_name": "Grist Samples",
      "url": "https://grist.tools/samples/web/render-article.html"
    },
    "twitter": {
      "card": "summary_large_image",
      "title": "Measuring Rainfall with a Simple Gauge",
      "description": "Read the gauge at eye level, at the same hour, and write the number down.",
      "image": "https://grist.tools/og.png"
    },
    "robots_meta": "index, follow",
    "fetched_at": "2026-09-01T12:00:00.000Z"
  },
  "errors": [
    "invalid_input",
    "blocked_target",
    "unreachable_target",
    "upstream_status",
    "upstream_timeout",
    "unsupported_content_type",
    "too_large",
    "unprocessable",
    "internal"
  ]
}