Utilities

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.

Endpoint:/api/v1/arabic/process
Methods:GETPOST
Latency:~5ms

Try it out

POST/api/v1/arabic/process

Parameters

Code

curl
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

FieldTypeRequiredDescription
operationstringRequiredProcessing operation (see Operations below)
textstringRequiredArabic text to process (max 10,000 characters)
options.directionstringOptionalFor convert_numbers: 'to_arabic' or 'to_western'

Operations

remove_diacritics

Strip diacritical marks (tashkeel) from Arabic text

مَرْحَبًا → مرحبا

normalize

Normalize Arabic characters (alef variants → ا, taa marbuta → هـ, etc.)

إبراهيم → ابراهيم

transliterate

Convert Arabic text to Latin transliteration

مرحبا → mrhba

detect_script

Detect whether text is Arabic, Latin, mixed, or other script

Returns { script, confidence, details }

convert_numbers

Convert between Arabic-Indic (٠١٢) and Western (012) numerals

١٢٣ → 123 (use options.direction)

word_count

Count words, characters, sentences, and paragraphs

Returns { words, characters, sentences, paragraphs }

sentiment

Lexicon-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

PlanRequests/MonthRate Limit
Free1,00020 req/min
Starter10,00060 req/min
Professional100,000300 req/min
Business500,000500 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.