{
  "name": "feed-discover",
  "summary": "Fetches a web page and returns the RSS, Atom and JSON feeds it declares in its <head>, as absolute URLs with their type and title.",
  "rationale": "It needs the network, and the feed an agent wants is declared in the page it already has as a <link rel=\"alternate\"> -- one guarded fetch and a DOM query returns it, where feeding the whole page to a model costs far more in tokens and still guesses.",
  "family": "feeds",
  "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 the HTML or XHTML page whose <link rel=\"alternate\"> or rel=\"feed\" declarations with an RSS, Atom or JSON Feed media type are read, up to 2048 characters; up to 5 redirects are followed and no feed paths are probed."
      }
    },
    "required": [
      "url"
    ],
    "additionalProperties": false
  },
  "input_example": {
    "url": "https://grist.tools/samples/web/fieldnotes/index.html"
  },
  "output_example": {
    "url": "https://grist.tools/samples/web/fieldnotes/index.html",
    "source_url": "https://grist.tools/samples/web/fieldnotes/index.html",
    "final_url": "https://grist.tools/samples/web/fieldnotes/index.html",
    "http_status": 200,
    "feeds": [
      {
        "url": "https://grist.tools/samples/web/fieldnotes/feed.xml",
        "type": "rss",
        "title": "Field Notes (RSS)",
        "rel": "alternate"
      },
      {
        "url": "https://grist.tools/samples/web/fieldnotes/atom.xml",
        "type": "atom",
        "title": "Field Notes (Atom)",
        "rel": "alternate"
      }
    ],
    "feeds_total": 2,
    "feeds_truncated": false,
    "fetched_at": "2026-09-01T12:00:00.000Z"
  },
  "errors": [
    "invalid_input",
    "blocked_target",
    "unreachable_target",
    "upstream_status",
    "upstream_timeout",
    "unsupported_content_type",
    "too_large",
    "internal"
  ]
}