# Forest Factory API – Structured Page Extraction

> Forest Factory API – Structured Page Extraction is a paid API for AI agents from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-12).

Fetches a public URL and returns structured metadata including title, description, Open Graph tags, JSON-LD entities, robots directives, language, and canonical URL.

## Facts

- Endpoint: POST https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/page/structured?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forest-factory-api-structured-page-extraction-566f37fa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dmWAeyS4-RbTeJjmw8pCD

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 forest-factory-api-structured-page-extraction-566f37fa -d '<json body>'
```

Example prompt: Can you fetch the structured metadata for https://example.com/product/123 — I need the page title, description, Open Graph info, and any JSON-LD entities it has?

## When to prefer this

Choose this endpoint when you need a single structured, machine-readable snapshot of a webpage's metadata — including Open Graph, JSON-LD entities, canonical URL, and language — without needing to parse raw HTML yourself. Prefer this over raw scraping when you want clean, normalized metadata fields ready for downstream use. It is especially useful for SEO analysis, link preview generation, entity extraction, and content enrichment pipelines where speed and structure matter more than full-page rendering.

## Known failure modes

- URL is not publicly accessible (private/firewalled) — may return error or empty data
- Malformed or non-HTTP(S) URL fails input validation
- Page has no structured metadata — returns empty Open Graph and JSON-LD fields
- JavaScript-rendered content not captured (rendered_javascript: false)
- Payment not signed — returns HTTP 402 with x402 PAYMENT-REQUIRED challenge
- Timeout fetching slow or large pages — duration_ms may be high or call may fail
- Truncated response if page content exceeds limits (truncated: true)

## How this service works

Machine-readable contract for active Forest paid capabilities. Unsigned paid calls return HTTP 402 with a PAYMENT-REQUIRED x402 challenge.

## Output

A JSON object containing: page title, meta description, canonical URL, source URL, language, robots directives, Open Graph metadata (url, type, title, description), JSON-LD block data (entity count, entity list, type counts, parse stats), a truncated flag, whether JavaScript was rendered, and request metadata including cache status, provider, checked_at timestamp, and duration in milliseconds.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "pattern": "^https?://",
   "maxLength": 2048,
   "minLength": 1,
   "description": "Public HTTP(S) URL to inspect, resolve, or compare."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "title": "example",
   "jsonld": {
    "entities": [],
    "blocks_seen": 0,
    "type_counts": [],
    "entity_count": 0,
    "blocks_parsed": 0,
    "malformed_blocks": 0
   },
   "robots": "example",
   "language": "example",
   "truncated": false,
   "open_graph": {
    "url": "example",
    "type": "example",
    "title": "example",
    "description": "example"
   },
   "source_url": "example",
   "description": "example",
   "canonical_url": "example",
   "rendered_javascript": false
  },
  "meta": {
   "cache": "miss",
   "provider": "safe-http",
   "checked_at": "2026-01-01T00:00:00.000Z",
   "duration_ms": 0
  },
  "version": "1",
  "capability": "web.page-structured"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forest-factory-api-structured-page-extraction-566f37fa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run](https://www.zero.xyz/host/http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/llms.txt)
