# IranTools Script Detection

> IranTools Script Detection is a paid API for AI agents from irantools.johnaio281.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-22).

Detects which writing script(s) are present in a given text string (e.g. Persian, Arabic, Latin, Cyrillic)

## Facts

- Endpoint: POST https://irantools.johnaio281.workers.dev/api/iran/script_detect?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/irantools-script-detection-fb7eb4a5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ph6VyesK1BFF2wSptMJjj

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 irantools-script-detection-fb7eb4a5 -d '<json body>'
```

Example prompt: Can you detect what writing script this text is using: 'سلام دنیا'? I need to know if it's Persian, Arabic, or something else.

## When to prefer this

Use this endpoint when you need to programmatically identify the Unicode writing script of a text string, especially when handling Persian/Farsi, Arabic, or other non-Latin scripts. Prefer this over general language detection APIs when the goal is script-level classification (e.g. Latin vs Cyrillic vs Arabic script) rather than specific language identification. Particularly useful in pipelines that pre-process multilingual or user-generated content before applying script-specific NLP tools.

## Known failure modes

- Empty text input returns an error or empty result
- Very short or ambiguous text may produce uncertain script classification
- Mixed-script text may list multiple scripts without a single dominant result
- Non-UTF-8 encoded input could cause parsing failures
- Network errors or payment failures return HTTP 402 or 5xx errors

## How this service works

Persian and Iranian utilities for AI agents, plus general text/Unicode tooling. Jalali (Solar Hijri) calendar conversion, Iranian national ID / SHEBA / bank card / postal code / economic code validation, province and city lookup, official public holidays, Persian text normalization, keyword extraction, sentence splitting, similarity, HTML stripping, RTL fixing, Unicode homoglyph folding, script detection, NFC/NFD normalization, grapheme counting, date description, business-day counting, slugify, FNV-1a hashing, Shannon entropy, format and encoding detection, byte sizes. Pay per call in USDC on Base via x402 - no signup, no API key, no KYC. The same tools are also exposed as MCP tools at /mcp.

## Output

Returns a JSON object indicating which Unicode script(s) were detected in the input text, likely including script names (e.g. Arabic/Persian, Latin, Cyrillic) and possibly confidence scores or character breakdowns per script.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "text"
 ],
 "properties": {
  "text": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/irantools-script-detection-fb7eb4a5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from irantools.johnaio281.workers.dev](https://www.zero.xyz/host/irantools.johnaio281.workers.dev/llms.txt)
