Overview
The halal.sh API screens public equities against AAOIFI Shari’ah Standard No. 21 (2021 Revision), identified everywhere asaaoifi-ss21 and versioned as aaoifi-ss21@2026.1. Every determination rests on two kinds of screen:
Business activity
Is the company’s core business permissible? A qualitative
pass/fail.Financial ratios
Three numeric screens — debt, cash, and prohibited revenue — each compared against an AAOIFI threshold.
Business-activity screen
The first screen evaluates whether the company’s core business is permissible. Unlike the financial screens, it is qualitative — there is no ratio.
A passing company can still carry
concerns — activities worth awareness that don’t, on their own, fail the screen (e.g. a retailer with incidental alcohol sales). The screen also returns the reported business segments behind the result, so you can see what the company actually does and how prohibited-income exposure breaks down by line of business:
revenue_percentage, a qualitative prohibited_revenue_impact (negligible, minor, major), and its revenue significance. The list is empty when segment data isn’t available.
Financial-ratio screens
Three ratios are evaluated against AAOIFI thresholds. The screen keys are exactlydebt_to_market_cap, cash_to_market_cap, and prohibited_revenue.
Each financial screen is the same shape — a
result, the calculated value, the threshold, the comparison operator, and a buffer:
prohibited_revenue can be not_applicable. AAOIFI’s prohibited-income screen (Rule 3/4/4) measures incidental prohibited income for a company whose core business is permissible. When the core business is itself non-permissible (a bank, casino, conventional lender, dedicated entertainment producer, etc.), the business_activity screen already decides, so prohibited_revenue.result is not_applicable (deferred to business activity) with value and buffer set to null. Such a stock is still non-compliant, and its debt_to_market_cap / cash_to_market_cap ratios are reported normally — a non-permissible business with a clean balance sheet shows those passing while failing on business_activity.Market-cap basis
AAOIFI Standard 21 uses market capitalization as the denominator for the debt and cash ratios. The methodology’s calculation basis is reported asmarket_capitalization by the methodology endpoint.
Trailing twelve months (TTM)
Theprohibited_revenue numerator and denominator use trailing twelve months — the most recent annual filing plus any subsequent quarterly filings — so the income picture stays current. The exact filing set behind a determination is reported in filing (with a deterministic hash).
Walking through a /compliance response
determination
The verdict: status (compliant, non-compliant, or pending), a confidence score from 0 to 1, and a Markdown explanation.
screens
The four screens keyed by name — business_activity, debt_to_market_cap, cash_to_market_cap, and prohibited_revenue. Every screen reports its outcome as result: "pass" | "fail".
revenue
The full revenue breakdown: total, the permissible and prohibited splits (amount plus percentage), and a per-category breakdown of prohibited revenue (interest income, gambling, alcohol, weapons, tobacco, adult entertainment) in the reporting currency.
purification
When a compliant company earns minor prohibited income (typically interest on cash), shareholders purify that share of their dividends by giving it to charity. purification.required flags whether purification applies; purification.percentage is the share of dividends to purify (prohibited revenue ÷ total revenue); and purification.amount_per_1000 is the amount to purify per 1,000 units of dividends received — a ready-to-use figure for portfolio tooling.
stability
A quick read on how likely the status is to change: a rating of stable, watch, or borderline, plus drivers explaining why. See Stability metrics for the full signal in the Evidence Packet.
filing
The filing set behind the determination — a human-readable summary, a deterministic hash for reproducibility, and the individual filings with their accession numbers.
Confidence
determination.confidence is a 0–1 score reflecting data quality. The Evidence Packet’s confidence_detail shows exactly how it was built — the base confidence, the extraction strategies and any fallbacks used, and each penalty or boost applied.
When a stock hasn’t been analysed
If a stock has no analysis yet,determination.status is pending and screens, revenue, purification, stability, and filing are all null.
pending simply means the instrument has not been analysed yet — the endpoint does not queue analysis. Treat any unknown future status value as pending.Ethical screening
Separate from AAOIFI financial compliance, the instrument resource carries anethical_screening object flagging involvement in areas such as occupation or weapons, aggregated from independent research sources. It reports a status (flagged, cleared, or not_screened), a worst-case severity, and the flagged_areas with their per-area severities. This is an independent signal — a stock can be AAOIFI-compliant and still be flagged here, or vice versa.

