561 Group Market

RFC 6570 URI Template Expansion

Expand RFC 6570 Level 4 API references: all operators, flat lists/maps, explosion and Unicode prefixes. Preserve reserved percent triplets; encode ordinary data delimiters. Null/missing omitted, empty strings retained, own variables only. Limits: 8192 template bytes, 65536 variable/output bytes, 256 variables, 8192 scalar members, 1024 members per list/map. Invalid syntax/output refused before payment. No fetch, URL normalization or target authorization. Includes verified erratum 6937.

Price
from $0.0012 USDC per request (starting price; the 402 response quotes the exact amount for your input)
Network
Base mainnet, eip155:8453, settled in USDC through the Coinbase CDP facilitator
Method and URL
POST https://market.561.group/v1/data/uri-template-expand
Response type
application/json
Seller
Causeway Services (561 Group)

Input contract

Input that fails this contract is refused with a 4xx status before any payment is requested.

{
  "maxBytes": 491520,
  "bodySchema": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "template",
      "variables"
    ],
    "properties": {
      "template": {
        "type": "string",
        "maxLength": 8192
      },
      "variables": {
        "type": "object",
        "maxProperties": 256,
        "additionalProperties": {
          "type": [
            "string",
            "number",
            "boolean",
            "null",
            "array",
            "object"
          ],
          "items": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          },
          "maxItems": 1024,
          "additionalProperties": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          },
          "maxProperties": 1024
        }
      }
    }
  }
}

Example request

{
  "method": "POST",
  "url": "https://market.561.group/v1/data/uri-template-expand",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  },
  "body": {
    "template": "https://api.example.com{/path*}{?query*,limit}{#fragment}",
    "variables": {
      "path": [
        "v1",
        "a/b"
      ],
      "query": {
        "q": "café",
        "tag": "rfc 6570"
      },
      "limit": 10,
      "fragment": "summary"
    }
  }
}

Output

{
  "schema": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "uri",
      "byteLength"
    ],
    "properties": {
      "uri": {
        "type": "string",
        "maxLength": 65536
      },
      "byteLength": {
        "type": "integer",
        "minimum": 0,
        "maximum": 65536
      }
    }
  },
  "example": {
    "uri": "https://api.example.com/v1/a%2Fb?q=caf%C3%A9&tag=rfc%206570&limit=10#summary",
    "byteLength": 76
  }
}

How to buy with x402

  1. Send the request without payment. The server answers 402 Payment Required with a base64 JSON PAYMENT-REQUIRED header holding the amount, asset, network and payee.
  2. Have your wallet sign an EIP-3009 transferWithAuthorization for exactly those terms (an x402 client library does this for you).
  3. Repeat the identical request with the signed payload in the PAYMENT-SIGNATURE header.
  4. The server verifies, runs the operation, settles, and returns 200 with the result and a PAYMENT-RESPONSE header carrying the settlement receipt.

Read the price without paying

curl --include --request POST --header 'accept: application/json' --header 'content-type: application/json' --data-raw '{"template":"https://api.example.com{/path*}{?query*,limit}{#fragment}","variables":{"path":["v1","a/b"],"query":{"q":"café","tag":"rfc 6570"},"limit":10,"fragment":"summary"}}' --url 'https://market.561.group/v1/data/uri-template-expand'

This request authorizes nothing; it returns the live payment terms. Read the full explanation of x402.

Machine-readable