01. Introduction

EsakoAPI is a free, open-source API designed to simplify Zakat calculations in accordance with Islamic Shariah. It requires no API key for basic usage, making it incredibly easy to get started.

02. Base URL

BASE https://esakoapi.org/api/

03. Endpoints

01 - Money (Cash/Bank)

Calculate Zakat on monetary assets.

GET https://esakoapi.org/api/money/{amount}
EXAMPLE https://esakoapi.org/api/money/9899

Response Example

{
  "code": 200,
  "response": 247.475,
  "conditions": [
    "The amount must be in US dollars (USD).",
    "You must have possessed it for one full year.",
    "Zakat calculated using current silver price of 1.6685."
  ],
  "unit": "$",
  "date": "Tuesday 14-October-2025",
  "time": "09:22 AM"
}

02 - Gold

Calculate Zakat on gold based on its purity (Karat).

GET https://esakoapi.org/api/gold/{grams}?Type={karat}
EXAMPLE https://esakoapi.org/api/gold/150?Type=22

Supported Types (Karats):

Response Example

{
  "code": 200,
  "response": 3.625,
  "conditions": [
    "It must be 100% pure gold.",
    "You must have possessed it for one full year.",
    "If paying in cash, the amount is 482.5836$."
  ],
  "unit": "Gram",
  "date": "Tuesday 14-October-2025"
}

03 - Silver

GET https://esakoapi.org/api/silver/{grams}
EXAMPLE https://esakoapi.org/api/silver/920
{
  "code": 200,
  "response": 23,
  "unit": "Gram"
}

04 - Livestock (Camels, Cows, Sheep)

Calculate Zakat on livestock numbers.

GET https://esakoapi.org/api/camels/{count}
GET https://esakoapi.org/api/cows/{count}
GET https://esakoapi.org/api/sheep/{count}
EXAMPLE https://esakoapi.org/api/camels/120
EXAMPLE https://esakoapi.org/api/cows/56
EXAMPLE https://esakoapi.org/api/sheep/400

07 - Crops

Calculate Zakat on agricultural produce based on irrigation method.

GET https://esakoapi.org/api/crops/{kg}?Type={method}
EXAMPLE https://esakoapi.org/api/crops/920?Type=2

Irrigation Types:


08 - Buried Treasure (Rikaas)

GET https://esakoapi.org/api/rikaas/{grams}
EXAMPLE https://esakoapi.org/api/rikaas/122

04. HTTP Status and Application Codes

The HTTP status describes whether the request succeeded. The JSON code describes the application result and does not have to match the HTTP status.

HTTP statusDescription
200Calculation completed, including amounts below Nisaab.
422Invalid numeric amount or calculation type.
404The requested URL does not exist.
500Internal server failure, including unavailable or unreadable report data.

Below-Nisaab results keep JSON codes 320–327 and ok: true, with HTTP 200. Gold below Nisaab after purity conversion uses JSON code 466 with the same HTTP status and success flag.

Validation errors keep JSON codes 461, 463, 464, 465, 468 and ok: false, with HTTP 422. Clients that previously received HTTP 200 for invalid input must now handle HTTP 422.