{
  "serviceId": "structured-web-extraction",
  "displayName": "Structured Web Extraction",
  "description": "Fetch a web page and return structured data: standard fields (title, description, language, h1, OpenGraph, author, published), headings, JSON-LD and a text excerpt. Optional schema picks named fields or applies regexes to the HTML. POST /v1/url with {url}. JavaScript is not executed; pages are cached for 10 minutes. Pay per request in USDC; no account, no API key.",
  "category": "web",
  "resourceUrl": "https://test.agent.pocket.network/v1/structured-web-extraction",
  "priceUsd": "0.005000",
  "priceVersion": 1,
  "rails": [
    {
      "id": "base",
      "network": "eip155:84532",
      "chainId": 84532,
      "tokenAddress": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
      "tokenDecimals": 6,
      "payToAddress": "0xF732ea490c5766071785a2310523f7fA2CEbB829"
    }
  ],
  "paymentNetworks": [
    "eip155:84532"
  ],
  "paymentProtocols": [
    "x402"
  ],
  "protocols": [
    "rest"
  ],
  "inputSchema": {
    "type": "object",
    "description": "The request body for POST /v1/url.",
    "properties": {
      "url": {
        "type": "string",
        "description": "The page URL (http or https)."
      },
      "schema": {
        "description": "Optional: a list of field names, a JSON Schema, or {fields: {name: regex}}."
      }
    },
    "required": [
      "url"
    ]
  },
  "outputSchema": {
    "type": "object",
    "description": "For POST /v1/url, a JSON object with url, title, `fields` and `page` (headings, json_ld, links_count, excerpt). The exact shape is the service's own and is not pinned here; errors return a JSON object with an `error` field."
  },
  "methods": {
    "GET /v1/health": "read",
    "GET /v1/version": "read",
    "POST /v1/url": "read"
  },
  "example": {
    "method": "POST",
    "path": "/v1/url",
    "request": {
      "url": "https://example.com"
    },
    "response": {
      "portal": {
        "provenance": "third-party-supplier",
        "serviceId": "structured-web-extraction",
        "schemaCheck": "unchecked"
      },
      "data": {
        "url": "https://example.com",
        "title": "Example Domain",
        "fields": {
          "title": "Example Domain",
          "language": "en",
          "h1": "Example Domain"
        },
        "page": {
          "headings": {
            "h1": [
              "Example Domain"
            ],
            "h2": [],
            "h3": []
          },
          "json_ld": [],
          "links_count": 1,
          "text_excerpt": "Example Domain Example Domain This domain is for use in documentation examples without needing permission. Avoid use in operations. Learn more",
          "text_length": 142
        },
        "schema_mode": "standard",
        "cached": true,
        "service": "structured-web-extraction"
      }
    },
    "capturedAt": "2026-09-25T15:53:31Z"
  },
  "firstParty": true,
  "networks": [
    "eip155:84532"
  ],
  "serving": true,
  "page": "https://test.agent.pocket.network/services/structured-web-extraction",
  "descriptor": "https://test.agent.pocket.network/services/structured-web-extraction/descriptor.json"
}