# AGISHub Structured Extraction

> AGISHub Structured Extraction is a paid API for AI agents from api.agishub.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Renders a web page in a headless browser, then uses AI to extract structured JSON data from it based on a natural-language prompt and/or a JSON Schema.

## Facts

- Endpoint: GET https://api.agishub.com/v1/extract-structured
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agishub-structured-extraction-beb6a206
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Tjq9V88Ly3Osvjw9rMjUM

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 agishub-structured-extraction-beb6a206
```

Example prompt: Can you go to https://www.amazon.com/dp/B08N5WRWNW and extract the product name, current price, and star rating as structured JSON?

## When to prefer this

Choose this endpoint when the target page is a JavaScript-rendered SPA that a simple HTTP fetch cannot parse, or when you want AI-driven field identification via a natural-language prompt rather than brittle CSS selectors. It is ideal for one-off or ad-hoc extractions where you don't want to write a custom scraper. Prefer it over generic scraping tools when you need structured, schema-conformant JSON output directly, especially for e-commerce, job listings, or editorial content pages.

## Known failure modes

- URL is unreachable or returns a non-200 status — extraction fails with an error
- Page requires authentication or a CAPTCHA — headless browser cannot access content
- Prompt is too vague and AI cannot confidently identify the requested fields — returns partial or empty result
- Provided JSON Schema has conflicting constraints that cannot be satisfied by page content
- JavaScript-heavy SPA takes too long to render — timeout error
- Requested data simply does not exist on the page — returns null fields

## How this service works

AI-powered structured extraction: give a URL plus a natural-language prompt and/or a JSON Schema, and get back clean structured JSON (e.g. product name, price, rating). Renders the page in a headless browser first, so it works on SPAs.

## Output

A JSON object whose shape is determined by the provided JSON Schema (if given) or inferred from the natural-language prompt. Fields typically include whatever named attributes the user requested (e.g. productName, price, rating). The response wraps this in a 'result' key.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "enum": [
      "http"
     ],
     "type": "string"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "description": "Full http/https URL of the page to extract data from."
      },
      "prompt": {
       "type": "string",
       "description": "Natural-language instruction of what to extract, e.g. 'the product name, price and rating'. Provide this and/or a schema."
      },
      "schema": {
       "type": "object",
       "description": "Optional JSON Schema object describing the exact shape of the data to return. When given, the output is constrained to it.",
       "additionalProperties": {}
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "enum": [
      "json"
     ],
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": "AI-powered structured extraction: give a URL plus a natural-language prompt and/or a JSON Schema, and get back clean str"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agishub-structured-extraction-beb6a206/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agishub.com](https://www.zero.xyz/host/api.agishub.com/llms.txt)
