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:/v1/arabic/process
Methods:GETPOST
Latency:~5ms

Try it out

POST/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 "X-API-Key: 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