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

https://esakoapi.org/api/

03. Endpoints

01 - Money (Cash/Bank)

Calculate Zakat on monetary assets.

GET /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 /gold/{grams}?Type={karat}

Supported Types (Karats):

Example: https://esakoapi.org/api/gold/150?Type=22

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 /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 /camels/{count}
GET /cows/{count}
GET /sheep/{count}

Examples:


07 - Crops

Calculate Zakat on agricultural produce based on irrigation method.

GET /crops/{kg}?Type={method}

Irrigation Types:

Example: https://esakoapi.org/api/crops/920?Type=2


08 - Buried Treasure (Rikaas)

GET /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