# Rafid Document Facts Extractor

> Rafid Document Facts Extractor is a paid API for AI agents from api.rafidsystem.com, paid per call via x402, $0.25/call, status unknown (last checked 2026-10-10).

Extracts structured facts, dates, amounts, obligations, risk flags, entities, and deadlines from documents using deterministic and LLM-assisted parsing.

## Facts

- Endpoint: POST https://api.rafidsystem.com/api/v1/x402/documents/facts-extract?utm_source=zero.xyz
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rafid-document-facts-extractor-34953edd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ai__Rhs9xcY7y7hm5J-3X

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 rafid-document-facts-extractor-34953edd -d '<json body>'
```

Example prompt: Extract all the key facts from this maintenance services agreement — I need the parties, contract value, start and expiry dates, payment obligations, and any automatic renewal or risk flags: [paste document text here].

## When to prefer this

Choose this endpoint when you need structured, confidence-scored extraction of legal, financial, or contractual facts from raw document text — especially when you need obligations, risk flags, deadlines, and named entities in a single call. Prefer this over generic NLP APIs when working with contracts, agreements, or procurement documents where precision and risk classification matter.

## Known failure modes

- Missing or malformed document body returns validation error
- Very short or non-document text may yield low confidence scores or empty extractions
- Non-English documents may extract with reduced accuracy or return language warning
- Documents with complex formatting (tables, scanned images) may result in lower extraction confidence
- Ambiguous or poorly structured text may trigger warnings in the response

## How this service works

Rafid Agent API provides structured intelligence and paid APIs for AI agents across property, company and risk, supplier, finance, document, website, automotive, logistics, recruitment, trading, voice, video and business-planning workflows.

## Output

Returns a structured JSON object containing: document title, type, and subtype; extracted facts (parties, roles, values) with confidence scores; dates (agreement date, expiry, etc.); monetary amounts; named entities; obligations with modality; risk flags with severity; deadlines; percentages; requirements; warnings; overall confidence score; and detailed metadata including extraction method, word count, page count, and LLM assist status.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "additionalProperties": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "dates": [
   {
    "type": "agreement_date",
    "precision": "day",
    "confidence": 0.97,
    "originalValue": "15 January 2026"
   }
  ],
  "facts": [
   {
    "key": "parties",
    "label": "Parties",
    "value": [
     {
      "name": "Northwind Facilities LLC",
      "role": "supplier"
     },
     {
      "name": "Contoso Properties SAOG",
      "role": "customer"
     }
    ],
    "method": "definition",
    "confidence": 0.9
   }
  ],
  "title": "MAINTENANCE SERVICES AGREEMENT",
  "amounts": [
   {
    "type": "contract_value",
    "amount": 48000,
    "confidence": 0.92,
    "originalValue": "OMR 48,000"
   }
  ],
  "entities": [
   {
    "name": "Northwind Facilities LLC",
    "type": "company",
    "confidence": 0.9
   }
  ],
  "language": "en",
  "metadata": {
   "format": "text",
   "source": {
    "url": null,
    "kind": "text",
    "byteLength": null,
    "contentType": null
   },
   "llmAssist": {
    "status": "disabled",
    "rejectedFacts": 0,
    "verifiedFacts": 0
   },
   "pageCount": 2,
   "wordCount": 217,
   "characterCount": 1548,
   "extractionMode": "auto",
   "pageProvenance": true,
   "extractionMethod": "deterministic",
   "extractorVersion": "dfx-1.0.0"
  },
  "warnings": [],
  "deadlines": [
   {
    "type": "expiry",
    "confidence": 0.85,
    "description": "This Agreement shall commence on 1 February 2026 and shall expire on 31 January 2027."
   }
  ],
  "riskFlags": [
   {
    "type": "automatic_renewal",
    "reason": "The document states that the term renews automatically.",
    "severity": "medium"
   }
  ],
  "limitations": [
   "Extraction certainty is not business, legal or financial advice: facts are what the document ..."
  ],
  "obligations": [
   {
    "modality": "must",
    "confidence": 0.85,
    "obligation": "The Customer shall pay each invoice within thirty (30) days of receipt of a valid invoice."
   }
  ],
  "percentages": [
   {
    "type": "late_payment_interest",
    "ratio": 0.015,
    "value": 1.5,
    "confidence": 0.9,
    "originalValue": "1.5%"
   }
  ],
  "documentType": "contract",
  "requirements": [],
  "requestedFacts": [
   {
    "key": "expiry_date",
    "value": "31 January 2027",
    "method": "pattern",
    "status": "found",
    "request": "contract expiry date",
    "confidence": 0.97
   }
  ],
  "documentSubtype": "service_agreement",
  "overallConfidence": 0.78,
  "documentTypeSource": "detected",
  "documentTypeConfidence": 0.97
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rafid-document-facts-extractor-34953edd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.rafidsystem.com](https://www.zero.xyz/host/api.rafidsystem.com/llms.txt)
