Arabic Text Processing
Comprehensive Arabic text processing with 7 operations including diacritics removal, normalization, transliteration, script detection, number conversion, word counting, and lexicon-based sentiment analysis. Supports up to 10,000 characters per request.
/api/v1/arabic/processTry it out
/api/v1/arabic/processParameters
Code
curl -X POST "https://khaleejiapi.dev/api/v1/arabic/process?operation=remove_diacritics&text=%D9%85%D9%8E%D8%B1%D9%92%D8%AD%D9%8E%D8%A8%D9%8B%D8%A7%20%D8%A8%D9%90%D8%A7%D9%84%D8%B9%D9%8E%D8%A7%D9%84%D9%8E%D9%85" \ -H "Authorization: Bearer your_api_key"Methods
GET — API Info
Returns the list of supported operations and their descriptions. No parameters needed.
POST — Process Text
Process Arabic text with the specified operation. Send operation, text, and optional options in the request body.
POST Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| operation | string | Required | Processing operation (see Operations below) |
| text | string | Required | Arabic text to process (max 10,000 characters) |
| options.direction | string | Optional | For convert_numbers: 'to_arabic' or 'to_western' |
Operations
remove_diacriticsStrip diacritical marks (tashkeel) from Arabic text
مَرْحَبًا → مرحبا
normalizeNormalize Arabic characters (alef variants → ا, taa marbuta → هـ, etc.)
إبراهيم → ابراهيم
transliterateConvert Arabic text to Latin transliteration
مرحبا → mrhba
detect_scriptDetect whether text is Arabic, Latin, mixed, or other script
Returns { script, confidence, details }
convert_numbersConvert between Arabic-Indic (٠١٢) and Western (012) numerals
١٢٣ → 123 (use options.direction)
word_countCount words, characters, sentences, and paragraphs
Returns { words, characters, sentences, paragraphs }
sentimentLexicon-based sentiment analysis for Arabic text
Returns { sentiment, score, positive/negative counts }
Response Fields
operation
The operation that was performed
original
The original input text
result
The processed text result (string or object depending on operation)
metadata
Operation-specific metadata (counts, statistics, etc.)
Rate Limits
| Plan | Requests/Month | Rate Limit |
|---|---|---|
| Free | 1,000 | 20 req/min |
| Starter | 10,000 | 60 req/min |
| Professional | 100,000 | 300 req/min |
| Business | 500,000 | 500 req/min |
Debugging & Support
Include X-Request-ID when contacting support
Every response from KhaleejiAPI includes an X-Request-ID header — a unique identifier that lets our support team pull the exact log entry for your request within seconds. Always share it when reporting an unexpected error or unexpected result.
How to capture it
JavaScript / fetch
const res = await fetch("https://khaleejiapi.dev/api/v1/...", {
headers: { Authorization: "******" },
});
const requestId = res.headers.get("x-request-id");
console.log("Request ID:", requestId);
// → e.g. "req_01j9xkz4vp8..."cURL
curl -si "https://khaleejiapi.dev/api/v1/..." \ -H "Authorization: ******" | grep -i x-request-id # → x-request-id: req_01j9xkz4vp8...
Browser DevTools
Open DevTools (F12) → Network tab → click the failing request → scroll to the Response Headers section → copy the value next to x-request-id.
For a full list of error codes and guidance on common issues, see the Troubleshooting guide.