Skip to content
Fourohtwo

Extract structured JSON from a public web page for AI agents

api.fastaf.co/x402/v1/extract

Extract structured JSON from a public web page for AI agents: URL and JSON Schema in, JSON valid against it out. For specific fields as data, not page text. Optional schema fields may be missing or null; only fields listed in required are guaranteed to be present in a successful response. Optional nulls are omitted before validation. Non-matching answers are never charged. Provided by Structured d

BaseAnswering
POSThttps://api.fastaf.co/x402/v1/extract

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://api.fastaf.co/x402/v1/extract", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"schema":{"properties":{"in_stock":{"type":"boolean"},"price":{"properties":{"amount":{"type":"number"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},"title":{"type":"string"}},"required":["title","price","in_stock"],"type":"object"},"url":"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"}),
});
console.log(await res.json());

Example input

{
  "schema": {
    "properties": {
      "in_stock": {
        "type": "boolean"
      },
      "price": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "type": "object"
      },
      "title": {
        "type": "string"
      }
    },
    "required": [
      "title",
      "price",
      "in_stock"
    ],
    "type": "object"
  },
  "url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
}

More from FastAF