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. Error Codes

Code Description
200 OK — Request was successful
400 Bad Request — Invalid parameters
404 Not Found — Endpoint or resource not found
464 Value Error — Non-numeric value provided where a number was expected
467 Invalid URL — Malformed request URL
500 Server Error — Internal server error