# Arabic Text Repair for PDF and OCR Extraction

> Arabic Text Repair for PDF and OCR Extraction is a paid API for AI agents from api.qist.info, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-13).

Repairs Arabic text extracted from PDFs and OCR by normalizing Unicode Presentation Forms, fixing visual-order reversal, removing invisible bidi controls, and converting Arabic-Indic digits to ASCII.

## Facts

- Endpoint: GET https://api.qist.info/api/arabic/repair?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/arabic-text-repair-for-pdf-and-ocr-extraction-bf786719
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_w2ITfKuh7junlCNZS-TDU

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 arabic-text-repair-for-pdf-and-ocr-extraction-bf786719
```

Example prompt: I just extracted some Arabic text from a PDF and it's full of Unicode Presentation Forms and reversed characters — can you repair it so it's properly normalized and searchable? Here's the text: [paste Arabic text here]

## When to prefer this

Choose this endpoint when ingesting Arabic text from PDFs, OCR engines, or document parsers into search indexes or RAG pipelines where Unicode Presentation Forms cause silent retrieval failures. It is deterministic and lossless — ideal when you need byte-level normalization without risk of changing meaning. Prefer over generic Unicode normalization (NFKC) because it handles Arabic-specific cases NFKC misses, including visual-order reversal and Arabic-Indic digit conversion.

## Known failure modes

- Input text exceeds 100,000 character limit — request rejected
- Non-Arabic or empty text passed — may return unchanged or error
- Invalid 'reverse' parameter value (not 'true'/'false') — behavior undefined
- Network timeout for very large inputs near the character limit
- Payment failure (x402 protocol) — 402 response before processing

## How this service works

Repair Arabic text extracted from PDFs and OCR. Many PDFs encode Arabic as Unicode Presentation Forms: it renders identically but is a different byte sequence, so search and retrieval fail silently and invisibly. Also fixes visual-order reversal, invisible bidi controls, and Arabic-Indic digits that NFKC does not convert. Deterministic and lossless — encoding only, never wording. Essential for RAG pipelines ingesting Arabic documents.

## Output

Returns the repaired Arabic text as a string with Unicode Presentation Forms converted to standard Arabic codepoints, visual-order reversal corrected, invisible bidi control characters removed, and Arabic-Indic digits optionally converted to ASCII — encoding only, never altering wording or meaning.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Arabic text extracted from a PDF, OCR engine, or document parser (max 100,000 chars)"
      },
      "reverse": {
       "type": "string",
       "description": "Override visual-order detection: 'true' forces line reversal, 'false' prevents it. Omit for auto-detection."
      },
      "normalizeDigits": {
       "type": "string",
       "description": "Set 'false' to keep Arabic-Indic digits (٠-٩) instead of converting to ASCII. Default converts."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/arabic-text-repair-for-pdf-and-ocr-extraction-bf786719/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.qist.info](https://www.zero.xyz/host/api.qist.info/llms.txt)
