# Arabic Pipeline API – Arabic Text Search

> Arabic Pipeline API – Arabic Text Search is a paid API for AI agents from arabic-pipeline.arabic-pipeline.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

Search Arabic text for a query using phrase, word, or fuzzy matching, returning matched spans with surrounding context

## Facts

- Endpoint: POST https://arabic-pipeline.arabic-pipeline.workers.dev/text/search?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/arabic-pipeline-api-arabic-text-search-5871d850
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Tg0tJkQoyusnJ5ca_tqt1

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-pipeline-api-arabic-text-search-5871d850 -d '<json body>'
```

Example prompt: Search this Arabic paragraph for the word 'فَاطِمَةُ' using words mode, return up to 10 results with 50 characters of context on each side: قَالَتْ فَاطِمَةُ: مرحبا بالعالم

## When to prefer this

Choose this endpoint when you need to search within Arabic text with support for diacritics, approximate spelling (fuzzy), or word-boundary-aware matching. It is purpose-built for Arabic script and handles right-to-left nuances that generic text search ignores. Prefer it over generic substring search when working with classical Arabic, Quranic text, or Arabic names where spelling variation is expected. The x402 micropayment model means no API key setup is needed, making it ideal for one-off or low-volume agent tasks.

## Known failure modes

- Empty text or query returns zero matches with count 0
- Unsupported mode value causes a 400 validation error
- max_distance outside 0–2 or max_results outside 1–100 returns a 400 error
- Payment not completed returns a 402 challenge before results are served
- Very long texts may time out on the serverless worker edge runtime
- Non-Arabic or mixed-script input may produce unexpected match positions

## How this service works

Nine micro-capabilities for Arabic-language work, sold per call over x402 in USDC on Base. No API key, no account, no subscription for the buyer: the first request returns a 402 payment challenge, the client pays it and retries. Text utilities are pure computation and cost nothing to serve.

## Output

Returns a JSON object with the search mode used, total match count, cost in USD, and an array of match objects each containing the start and end character positions, the matched text, a relevance score, and a context snippet of surrounding characters.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "enum": [
    "phrase",
    "words",
    "fuzzy"
   ],
   "type": "string"
  },
  "text": {
   "type": "string",
   "description": "The text to search."
  },
  "query": {
   "type": "string",
   "description": "What to look for."
  },
  "max_results": {
   "type": "integer",
   "maximum": 100,
   "minimum": 1
  },
  "max_distance": {
   "type": "integer",
   "maximum": 2,
   "minimum": 0
  },
  "context_chars": {
   "type": "integer",
   "maximum": 200,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "words",
  "count": 1,
  "matches": [
   {
    "end": 17,
    "text": "فَاطِمَةُ",
    "score": 1,
    "start": 8,
    "snippet": "قَالَتْ فَاطِمَةُ: مرحبا بالعالم"
   }
  ],
  "cost_usd": 0.002,
  "endpoint": "POST /text/search",
  "total_matches": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/arabic-pipeline-api-arabic-text-search-5871d850/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from arabic-pipeline.arabic-pipeline.workers.dev](https://www.zero.xyz/host/arabic-pipeline.arabic-pipeline.workers.dev/llms.txt)
