Also in docs/dev/quickstarts.md

Extract structured data

Pull typed fields (prices, names, dates) out of pages with a JSON schema. About 2 minutes.

You need:

  • An API key in PYROSYNC_API_KEY and the deployment URL in PYROSYNC_URL (for example https://app.example.com).

1. List the extraction models

GET /api/v1/extract/models

curl -sS -X GET "$PYROSYNC_URL/api/v1/extract/models" \
  -H "X-API-Key: $PYROSYNC_API_KEY"

2. Extract with a schema

POST /api/v1/extract

curl -sS -X POST "$PYROSYNC_URL/api/v1/extract" \
  -H "X-API-Key: $PYROSYNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "urls": [
    "https://example.com"
  ],
  "prompt": "Get the page title and the first paragraph.",
  "schema": {
    "type": "object",
    "properties": {
      "title": {
        "type": "string"
      },
      "summary": {
        "type": "string"
      }
    },
    "required": [
      "title"
    ]
  }
}'

Result: One JSON object per URL that matches the schema.

Cost: Extraction credits per URL.