harvest_page_structures — Auto-Harvest Tables, Repeating Cards & Metadata

Zero-selector structural HTML harvester: extracts canonical/OpenGraph/Twitter metadata, Schema.org JSON-LD, normalized 2D tables (resolving multi-header rowspan/colspan merges + cell links), and repeating sibling card collections across 100-500 items without truncation.

Why buy vs. DIY: Compresses 250KB+ noisy DOMs by >90% tokens without dropping items 21-500 or misaligning colspan/rowspan financial columns; runs deterministically in <20ms at $0.002.

Pricing: $0.002 USD per HTML page structure harvest (x402 instant micropayment) · REST: POST https://dom-harvest.apikeg.com/v1/harvest-page-structures · MCP: https://dom-harvest.apikeg.com/mcp

Input Parameters

FieldTypeRequired / DefaultDescription & Constraints
html string Required Raw HTML page or fragment to tokenize and harvest into structured JSON. (minLength: 1, maxLength: 4000000)
baseUrl string Optional Optional origin/page URL used to resolve relative href, src, canonical, and OpenGraph URLs. (maxLength: 2048)
includeMatrix boolean Default: true Include the resolved 2D string matrix alongside typed row records on each extracted table.
minCollectionItems integer Default: 3 Minimum repeating sibling cards required to emit an auto-detected repeatingCollection. (min: 2, max: 50)

REST Example (curl)

curl -X POST "https://dom-harvest.apikeg.com/v1/harvest-page-structures" \
  -H "Content-Type: application/json" \
  -d '{
  "baseUrl": "https://shop.example.com/catalog",
  "includeMatrix": true,
  "minCollectionItems": 3,
  "html": "<html><head><title>Catalog</title></head><body><table><thead><tr><th rowspan='2'>Region</th><th colspan='2'>Q1 2026</th></tr><tr><th>Revenue</th><th>Growth</th></tr></thead><tbody><tr><td>NA</td><td>$1,200,000</td><td>18%</td></tr></tbody></table></body></html>"
}'

MCP tools/call Payload

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "harvest_page_structures",
    "arguments": {
      "baseUrl": "https://shop.example.com/catalog",
      "includeMatrix": true,
      "minCollectionItems": 3,
      "html": "<html><head><title>Catalog</title></head><body><table><thead><tr><th rowspan='2'>Region</th><th colspan='2'>Q1 2026</th></tr><tr><th>Revenue</th><th>Growth</th></tr></thead><tbody><tr><td>NA</td><td>$1,200,000</td><td>18%</td></tr></tbody></table></body></html>"
    }
  }
}