Financial data + Sharia compliance in one API.
Fundamentals, ratios, financials and dividends — plus an AAOIFI compliance verdict — from one REST call or one MCP tool. Every figure is cross-verified across multiple independent sources (SEC EDGAR, Yahoo, Finnhub); anything under two sources is flagged unverified. Gulf and US markets, 7 languages, agent-native.
Free for 3 months with a free account — full access to every check, the Zakat tools, and the API + MCP server. No card needed; paid plans come after the launch period. The plan labels in the table below show future pricing; nothing is charged during the launch period.
Quickstart — 3 steps
From zero to a compliance verdict in a couple of minutes.
1. Get your API key
Create your free account — for 3 months the REST API + MCP are free (100 calls/day). Your key starts with thl_ and is sent as a Bearer token.
2. Call the endpoint
Send the symbol to the screening endpoint with your key. Tadawul tickers use a .SR suffix; US tickers are plain.
3. Read the verdict
Branch on status: halal, not_halal, questionable, or unknown. Use the score, ratios, confidence, and reasons — and always pass along the disclaimer.
Example request & response
curl https://halalstock.net/v1/stock/2222.SR/halal?profile=standard \
-H "Authorization: Bearer thl_your_key"
{
"symbol": "2222.SR",
"name": "Saudi Arabian Oil Company",
"status": "halal",
"compliance_score": 82,
"confidence": "likely",
"corroborated_by": [], // Sharia-screened funds that also hold it (independent scholar check) — not data sources
"ratios": [
{"name": "debt_ratio", "value": 0.09, "threshold": 0.30, "passed": true},
{"name": "cash_ratio", "value": 0.04, "threshold": 0.30, "passed": true},
{"name": "impure_income_ratio", "value": null, "threshold": 0.05, "passed": null}
],
"risk_level": "safe",
"purification_pct": null,
"reasons": ["Business is permissible and all computable financial ratios pass."],
"explanation": {"en": "...", "ar": "..."},
"disclaimer": "Screening analysis for information only — not a fatwa..."
}
Tip: click the code block to select it, then copy.
Try it live
Type a ticker and run a real screen against the public endpoint — no key, no signup. This is the same JSON your code will get back.
This is an automated screening result of the available data — not a fatwa or a ruling that a company is halal. Read status with confidence, and always pass along the disclaimer field.
SDKs & copy-paste examples
Official zero-dependency clients for Python and JavaScript, plus a raw curl call and the MCP config. Set your key once as HALALSTOCK_API_KEY (it starts with thl_).
import os
from halalstock import HalalStock, HalalStockError
# key from your account (starts with thl_); keyless works too but is IP-metered
hs = HalalStock(api_key=os.environ.get("HALALSTOCK_API_KEY"))
try:
v = hs.check("AAPL") # GET /v1/stock/AAPL/halal
# status is a screening result, not a fatwa — read it with confidence
print(v["status"], v["compliance_score"], v["confidence"])
print(v["disclaimer"]) # always relay this to the user
res = hs.screen(["AAPL", "TSLA", "2222.SR"]) # batch, up to 25
print(res["count"], "screened")
except HalalStockError as e:
print("error", e.status, e.message)
import { HalalStock, HalalStockError } from "./halalstock.js";
// key from your account (starts with thl_); keyless works too but is IP-metered
const hs = new HalalStock(process.env.HALALSTOCK_API_KEY);
try {
const v = await hs.check("AAPL"); // GET /v1/stock/AAPL/halal
// status is a screening result, not a fatwa — read it with confidence
console.log(v.status, v.compliance_score, v.confidence);
console.log(v.disclaimer); // always relay this to the user
const res = await hs.screen(["AAPL", "TSLA", "2222.SR"]); // batch, up to 25
console.log(res.count, "screened");
} catch (e) {
if (e instanceof HalalStockError) console.error(e.status, e.detail);
}
# public — no key needed (metered per IP)
curl "https://halalstock.net/v1/stock/AAPL/halal?profile=standard"
# with your key (starts with thl_) for a higher quota
curl "https://halalstock.net/v1/stock/2222.SR/halal" \
-H "Authorization: Bearer $HALALSTOCK_API_KEY"
# batch screen up to 25 tickers
curl "https://halalstock.net/v1/screen?symbols=AAPL,TSLA,2222.SR" \
-H "Authorization: Bearer $HALALSTOCK_API_KEY"
# add to your MCP client config (e.g. Claude Desktop)
{
"mcpServers": {
"halalstock": {
"command": "python",
"args": ["-m", "tahleel.mcp_server"],
"env": {
"HALALSTOCK_API_URL": "https://halalstock.net",
"HALALSTOCK_API_KEY": "thl_your_key"
}
}
}
}
# then just ask: "Is Aramco (2222.SR) halal?" — the agent calls check_halal()
Get the clients from the repo: /sdk/python/halalstock.py and /sdk/javascript/halalstock.js. Both wrap the same REST endpoints below.
For AI agents (MCP)
HalalStock ships a Model Context Protocol server. Point Claude Desktop, Cursor, or any MCP client at it and just ask whether a stock is halal.
MCP client config
# add to your MCP client config (e.g. Claude Desktop)
{
"mcpServers": {
"halalstock": {
"command": "python",
"args": ["-m", "tahleel.mcp_server"],
"env": {
"HALALSTOCK_API_URL": "https://halalstock.net",
"HALALSTOCK_API_KEY": "thl_your_key"
}
}
}
}
Tools & usage
# the server exposes two tools:
# check_halal(symbol, profile="standard")
# screen_portfolio(symbols, profile="standard")
# then just ask the agent:
"Is Aramco (2222.SR) halal?"
"Screen AAPL, TSLA and JPM for Sharia compliance."
# With HALALSTOCK_API_URL + HALALSTOCK_API_KEY set, calls
# go to the hosted, metered API. Without them, the server
# screens locally with no API key (best-effort, via Yahoo —
# US names degrade gracefully; still needs a network connection).
Endpoint reference
Most read endpoints need no key (metered per IP); some need a key, a few need a paid plan.
| Endpoint | Returns | Auth |
|---|---|---|
GET /v1/stock/{symbol}/halal | Full verdict for one symbol: status, score, ratios, confidence, reasons | Optional key |
GET /v1/screen?symbols= | Batch verdicts for up to 25 comma-separated tickers | Optional key |
GET /v1/search?q= | Search the universe of stocks + ETFs by name or ticker | Optional key |
GET /v1/screener | Find names from the pre-screened index by status, country, sector, score | Optional key |
GET /v1/top-halal | Top halal stocks by compliance score, optionally by country/sector | Optional key |
GET /v1/stock/{symbol}/zakat | Zakat due (2.5%) on a holding; intent=investment|trading | Optional key |
GET /v1/stock/{symbol}/purification | Dividend purification amount (impure-income share × dividends) | Optional key |
GET /v1/stock/{symbol}/alternatives | Halal stocks in the same sector as this one | Optional key |
GET /v1/stock/{symbol}/history | Compliance status over time (daily snapshots) | Optional key |
GET /v1/fundamentals/{symbol} | Cross-verified fundamentals (market cap, debt, cash, revenue) with per-field sources | Optional key |
GET /v1/ratios/{symbol} | The screening ratios (debt, cash, impure-income) with thresholds and pass/fail | Optional key |
GET /v1/profile/{symbol} | Company profile: name, sector, industry, business summary, currency, kind | Optional key |
GET /v1/dividends/{symbol} | Derived dividend-purification figures (impure ratio, % to purify) + bundled verdict | Optional key |
GET /v1/financials/{symbol} | Multi-period financial statements (income, balance sheet, cash flow) | Paid plan |
GET /v1/compliance-changes | Stocks that recently changed halal status | Optional key |
GET /v1/whale-watch | What the major Islamic funds hold — follow the halal smart money | Optional key |
GET /v1/sectors | Halal-vs-total breakdown by sector across the universe | Optional key |
GET /v1/methodology | The screening standard, thresholds, and stages applied | None |
GET /v1/markets | Markets covered, with their ticker suffixes | None |
POST /v1/signup | Create your account and receive an API key | None |
GET /v1/portfolio · POST · DELETE | Save and screen a holdings portfolio tied to your key | Key required |
GET /v1/stock/{symbol}/multi-standard | Compliance under AAOIFI vs DJIM-like vs total-assets basis | Paid plan |
GET /v1/stock/{symbol}/custom-screen | Re-screen with your own debt/cash/impure thresholds | Paid plan |
GET /v1/compare?symbols= | Side-by-side compliance comparison of up to 4 tickers | Paid plan |
GET /v1/screen.csv?symbols= | Bulk CSV export of verdicts (symbol,name,status,score,as_of) for up to 100 tickers | Business plan |
GET /v1/portfolio.csv | Bulk CSV export of the compliance status of every saved holding | Business plan |
GET/POST/DELETE /v1/webhook | Register ONE compliance-push URL; we POST {symbol,old_status,new_status,score,as_of} when a watched/owned stock flips status | Business plan |
Discovery endpoints (/v1/discovery/*) and zakat tools (/v1/zakat/*) are also available — see /v1/info for the full list and your plan's quota.
Market coverage: US-listed stocks are fully supported (SEC EDGAR + Yahoo + Finnhub). Gulf and other international markets are best-effort, covered where reliable data is available; when a figure can't be confirmed we return status 'unknown' or verified=false rather than guess.
Rate limits & errors
Calls are metered daily. Watch the X-Daily-Used and X-Daily-Limit response headers.
There is also a per-minute burst cap on top of the daily quota: Pro = 300 requests/min, Business = 600 requests/min. Spread large jobs out — a per-minute hit returns a 429 whose body says "max N requests/minute on your plan" (distinct from the daily-quota 429).
401
Missing or invalid API key on an endpoint that requires one.
402
Paid-only feature called with a free-tier key. Upgrade your plan.
429
Daily quota reached, or the per-minute burst cap was hit. The body tells you which. Back off, get a key, or upgrade your plan.