# Halal Terminal API > The Halal Terminal API is a REST service for Shariah compliance and market data. It exposes 58+ endpoints spanning stock screening across five methodologies (AAOIFI, DJIM, FTSE, MSCI, S&P), real-time and historical market data, ETF holdings analysis, news and SEC filings, dividend history with Zakat and purification calculations, and watchlist/report management for 200,000+ assets across 25+ exchanges. The API is served from https://api.halalterminal.com. Authentication uses a single `X-API-Key` header. A free tier (500 tokens/month, no credit card) is available; paid tiers unlock higher monthly token quotas, pay-as-you-go overage, and webhooks. Full OpenAPI/Swagger docs with try-it-now are at https://api.halalterminal.com/docs; a ReDoc rendering is at https://api.halalterminal.com/redoc. All endpoints live under the `/api/` prefix (for example `/api/screen/{symbol}`). A complete flattened inventory of every endpoint with one-line descriptions is published at https://api.halalterminal.com/llms-full.txt. ## Quickstart 1. Sign up at https://api.halalterminal.com and copy the `ht_…` key from your inbox or the dashboard at https://api.halalterminal.com/dashboard/. 2. Send `X-API-Key: ` on every request — there is no OAuth or session flow. 3. Validate the key cheaply with `GET /api/education/methodologies` (≈0 tokens, returns 200 on any valid key). ## Official SDKs - **Python**: `pip install halalterminal` — typed responses, typed disclaimers, granular error classes, generic `client.get` / `client.post` escape hatch. Single dep (`requests`). Source: https://github.com/goww7/halalterminal-sdk-python - **TypeScript / JavaScript**: `npm install @halalterminal/sdk` — zero-dep, fetch-based, works in Node 18+, browsers, Cloudflare Workers, Vercel/Netlify edge. Source: https://github.com/goww7/halalterminal-sdk-js - **Quickstart blog post**: https://halalterminal.com/blog/posts/halal-api-quickstart-python-javascript (5-min read covering both languages). ## Getting started - [API host](https://api.halalterminal.com): Root URL, free-key signup, and dashboard. - [Interactive documentation](https://api.halalterminal.com/docs): OpenAPI/Swagger UI with try-it-now for every endpoint. - [ReDoc reference](https://api.halalterminal.com/redoc): Static, three-pane reference rendering. - [API reference (HTML)](https://api.halalterminal.com/api-reference): Server-rendered, crawler-readable index of every endpoint grouped by category. - [OpenAPI spec](https://api.halalterminal.com/openapi.json): Machine-readable schema for all endpoints. - [Product page](https://www.halalterminal.com/product/api): Endpoint categories, use cases, and pricing on the marketing site. ## Endpoint categories - Screening (14 endpoints): Single-stock, bulk, and async index screening across all 5 Shariah methodologies (AAOIFI, DJIM, FTSE, MSCI, S&P) — all five audited end-to-end against their published specs, with DJIM using 24-month and S&P using 36-month trailing-average market cap. Each response carries a `verified: true` flag on every per-methodology entry. - Market Data (5 endpoints): Real-time quotes, OHLC historical data, and price snapshots. - ETF Analysis (8 endpoints): Holdings screening, purification ratios, and per-methodology compliance breakdowns. - Sukuk Screening (4 endpoints): Search the structural sukuk registry and resolve instruments by ISIN with AAOIFI pre/post-Standard 62 disposition. GET /api/sukuk/search, GET /api/sukuk/{isin}, GET /api/sukuk/issuer/{lei}, POST /api/sukuk/portfolio-impact. Guide: https://www.halalterminal.com/research/sukuk-screening - News & Filings (10 endpoints): News aggregation, SEC EDGAR integration, and XBRL financial facts. - Dividends & Zakat (4 endpoints): Payment history, Zakat calculation, and purification ratios. - Watchlists & Reports (10 endpoints): Watchlist CRUD, portfolio management, and structured compliance reports. - Disclaimers (2 endpoints, no API key): Canonical disclaimer registry. Every compliance/market/zakat/purification response carries an inline `disclaimers` array of versioned, severity-tagged objects deep-linked to the legal page; the registry endpoint exposes the full catalogue for client-side dedupe. ## Authentication & limits - Auth: `X-API-Key: ` header on every request. Keys are prefixed `ht_` and at least 20 characters. - Metering: usage is metered in **tokens**, not requests. Cheap reads cost 0–1 tokens; a single-stock screen costs ~5; ETF screening ~10; portfolio scans ~15; bulk index screening ~50. The full table is at `GET /api/keys/token-costs`. - Plans: Free (500 tokens/mo, $0), Starter (2,500 tokens/mo, $19), Pro (15,000 tokens/mo, $49, with webhooks and bulk priority), Enterprise (50,000 tokens/mo, $199+, $0.005/token overage, no hard cap). See [pricing](https://halalterminal.com/product/api#pricing). - Overage: Starter and Pro support pay-as-you-go overage ($0.01 and $0.008 per token respectively). - Error codes and rate-limit headers are documented in the OpenAPI spec at [/docs](https://api.halalterminal.com/docs). ## Example Screen any stock in one request: ``` curl -X GET "https://api.halalterminal.com/api/screen/AAPL" \ -H "X-API-Key: your_api_key" ``` Response includes a per-methodology verdict and confidence for AAOIFI, DJIM, FTSE, MSCI, and S&P. ## Optional - [Halal Terminal site](https://halalterminal.com) and its [llms.txt](https://halalterminal.com/llms.txt). - [Methodology](https://halalterminal.com/methodology): Detailed Shariah screening rules used by the API. - [Research: Shariah screening](https://halalterminal.com/research/shariah-screening): How the five methodologies differ. - [Terms of Service](https://halalterminal.com/terms): Service agreement governing use of the API and platform. - [Legal disclaimers](https://halalterminal.com/legal): Educational-research framing, investment disclaimer, Shariah compliance notice, data accuracy, liability limits. - [Privacy](https://halalterminal.com/privacy): Privacy Policy. - [Cookies](https://halalterminal.com/cookies): Cookie Policy.