SITEMAP, ROBOTS.TXT & RSS/ATOM

Recursive Sitemap, robots.txt & RSS/Atom Discovery API With SSRF & Cycle Protection

Target Query: recursive sitemapindex robots txt rss crawl api · Category: Extraction Modality · Verified Rate: $0.015/hit ($0 on miss) · Updated: 2026-12-02

Direct Answer: Crawling a documentation site or SaaS blog by chasing every `<a>` tag wastes requests on duplicate query params and trap links. `POST /v1/sitemap` reads `robots.txt` (`Sitemap:` and `Disallow:` directives), recursively expands nested `<sitemapindex>` trees (such as `github.blog/sitemap_index.xml`) up to `max_depth`, normalizes `<urlset>`, RSS 2.0, and Atom feeds, applies regex `include_pattern`/`exclude_pattern` filters, validates every child URL against the SSRF firewall, and deduplicates output cleanly for `$0.010` (`10,000` micros) per verified crawl.

Engineering Mechanics & Deterministic Guardrails

Sitemap & Feed Protocols Supported by `POST /v1/sitemap`

Input FormatParsed ElementsFiltering & GuardrailsVerified Rate
`robots.txt``User-agent`, `Disallow`, `Allow`, `Sitemap:` directivesAuto-follows declared public sitemaps with SSRF check$0.010 (10,000 micros)
`<sitemapindex>`Nested `<sitemap><loc>` children up to `max_depth`Visited-URL cycle set + `max_urls` cap + per-hop SSRF guard$0.010 (10,000 micros)
`<urlset>` XML`<loc>`, `<lastmod>`, `<changefreq>`, `<priority>`Regex `include_pattern` / `exclude_pattern` + URL dedup$0.010 (10,000 micros)
RSS 2.0 & Atom XML`title`, `link`, `pubDate`/`updated`, `summary`Namespace-aware XML parser, clean JSON array output$0.010 (10,000 micros)
Unreachable / Empty / SSRFZero valid URLs or blocked private host`ok: false`, HTTP 422 on SSRF, zero cache write$0.00 (`0` micros)
Zero-Friction Integration Coverage Across Developer & Autonomous Agent Surfaces REST JSON API (/v1/extract, /sitemap, /batch) OpenAPI 3.1 Native Remote MCP Server (/mcp) 6 Flat Tools treg hub QuickJS Package (0% Fee) $0.015 / $0 Miss Causal Bazaar Public Toll Card 15,000 micros Creem Prepaid Packs ($15/$59/$199) $0/mo Recurring Hard Budget Lock (max_cost_micros) Per-Request Cap

Sitemap Discovery Request Contract (`POST /v1/sitemap`)

{
  "type": "object",
  "required": [
    "url"
  ],
  "properties": {
    "url": {
      "type": "string",
      "pattern": "^https?://"
    },
    "include_pattern": {
      "type": "string"
    },
    "exclude_pattern": {
      "type": "string"
    },
    "max_urls": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "max_depth": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5
    }
  }
}

Any extracted payload violating required keys, types, bounds, or regex patterns returns schema_valid: false, exact validation_errors, and billed_micros: 0.

Executable REST, Remote /mcp & treg hub Snippets

curl -fsSL -X POST "https://scrape.fastmesh.dev/v1/sitemap" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://docs.python.org/robots.txt",
    "include_pattern": "/3/library/",
    "exclude_pattern": "/archives/",
    "max_urls": 50,
    "max_depth": 2
  }'

treg call scrape-anything-verified-extract --data '{"mode":"sitemap","url":"https://docs.python.org/robots.txt","max_urls":50,"max_depth":2}'

Hard guarantee: fake-200 CAPTCHA/Turnstile shells, login walls, encrypted PDFs, empty results, schema mismatches, and SSRF HTTP 422 blocks always return billed_micros: 0.

Test Schema-Validated Extraction Live in 5 Seconds

Paste any public URL, HTML table, JSON-LD, CSV, or fake-200 shell at scrape.fastmesh.dev or top up once with never-expiring Creem prepaid credits ($15 Starter / $59 Growth / $199 Scale — $0/mo recurring).

Frequently Asked Questions

How does `/v1/sitemap` protect against malicious sitemap SSRF smuggling?

Every child `<loc>` discovered in `robots.txt` or `<sitemapindex>` passes through the exact same DNS + IP + redirect SSRF firewall before any fetch occurs. Private/loopback/metadata entries are blocked immediately at `$0`.

Can I feed discovered sitemap URLs straight into `/v1/batch`?

Yes. Extract filtered URLs via `/v1/sitemap`, then submit them to `/v1/batch` with a strict `json_schema` and `max_cost_micros` hard cap.

Does `/v1/sitemap` handle XML namespaces in Sitemap 0.9 and Atom feeds?

Yes. The XML extractor strips or resolves standard `http://www.sitemaps.org/schemas/sitemap/0.9` and `http://www.w3.org/2005/Atom` namespaces deterministically.

Related Structured Extraction Guides

Explore all 32 Scrape-Anything Technical Guides or inspect the machine-readable llms.txt index.