# OPX Web Extraction API

> OPX Web Extraction API is a paid API for AI agents from opx-status.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-11).

Fetches a public webpage and extracts user-specified fields as validated, machine-ready JSON, settling payment only when all required fields are successfully delivered.

## Facts

- Endpoint: POST https://opx-status.dev/api/extract?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/opx-web-extraction-api-7e1260fe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rfGDa19-rUFBDV9t-I0G4

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability opx-web-extraction-api-7e1260fe -d '<json body>'
```

Example prompt: Grab the product name and price from https://example.com/product and give them back to me as structured JSON — mark price as required so I only pay if it's actually found.

## When to prefer this

Choose this endpoint when you need to extract specific named fields from a known public URL and want structured, validated JSON back without writing custom scraping logic. It is especially well-suited for agentic workflows where you want pay-on-success semantics — payment only settles when required fields are actually delivered. Prefer it over generic scraping tools when you need field-level type validation (string, number, boolean) and a clean missing-field report.

## Known failure modes

- Required field not found on page — extraction fails and payment does not settle
- URL points to a private or internal address — rejected before retrieval
- Webpage is behind authentication or a JavaScript-heavy SPA — extraction may return nulls
- Field name uses reserved keyword (__proto__, constructor, prototype) — request rejected with validation error
- URL is malformed or exceeds 4096 characters — rejected at input validation
- Page returns non-200 HTTP status — extraction fails with no data returned

## How this service works

OPX builds machine-facing infrastructure and paid tools for x402 commerce. Its current live tool helps agents choose between tested x402 web-search providers before spending using recent paid performance evidence.

## Output

Returns a JSON object containing a 'data' map of the requested field names to their extracted values (or null if missing), the final resolved URL after any redirects, the original source URL, a unique request ID for tracing, and a 'missingFields' array listing any fields that could not be extracted from the page.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "maxLength": 4096,
   "minLength": 1,
   "description": "Public HTTP(S) webpage; private/internal addresses are rejected."
  },
  "fields": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "name",
     "type"
    ],
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "description": "Unique, nonempty field name; __proto__, constructor and prototype are reserved."
     },
     "type": {
      "enum": [
       "string",
       "number",
       "boolean"
      ],
      "type": "string"
     },
     "required": {
      "type": "boolean",
      "default": false,
      "description": "If true, a missing value fails the extraction without settlement."
     }
    },
    "additionalProperties": false
   },
   "maxItems": 50,
   "minItems": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "name": "Example product",
   "price": null
  },
  "finalUrl": "https://example.com/product",
  "requestId": "3c51d4e4-88b4-4b3e-9a95-1d213aa37f85",
  "sourceUrl": "https://example.com/product",
  "missingFields": [
   "price"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/opx-web-extraction-api-7e1260fe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from opx-status.dev](https://www.zero.xyz/host/opx-status.dev/llms.txt)
