Search instruments
curl --request GET \
--url https://api.halal.sh/v1/search \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.halal.sh/v1/search"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.halal.sh/v1/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.halal.sh/v1/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.halal.sh/v1/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.halal.sh/v1/search")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.halal.sh/v1/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"type": "stock",
"symbol": "NVDA",
"instrument_id": "NVDA",
"name": "NVIDIA Corporation",
"country_code": "US",
"exchange": "Nasdaq",
"sector": "<string>",
"industry": "<string>",
"status": "compliant",
"last_analyzed_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"request_id": "req_abc123",
"as_of": "2023-11-07T05:31:56Z",
"methodology": "aaoifi-ss21@2026.1",
"total": 123,
"query": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "Maximum 50 symbols per request."
},
"meta": {
"request_id": "req_abc123"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or revoked API key."
},
"meta": {
"request_id": "req_abc123"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Daily request limit (100) exceeded. Resets at midnight UTC.",
"retry_after": 3600
},
"meta": {
"request_id": "req_abc123"
}
}Screening
Search Instruments
Search stocks and ETFs by ticker or company/fund name. Returns 200
with an empty array when nothing matches.
Every item carries a type discriminator (stock | etf). Stock items
include a compliance status; ETF items instead expose Shariah purity
(purity_percentage, badge_color) and match_coverage_percent, and
carry no status field. Use the types parameter to filter to one
kind — omit it to receive both.
GET
/
search
Search instruments
curl --request GET \
--url https://api.halal.sh/v1/search \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.halal.sh/v1/search"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.halal.sh/v1/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.halal.sh/v1/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.halal.sh/v1/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.halal.sh/v1/search")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.halal.sh/v1/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"type": "stock",
"symbol": "NVDA",
"instrument_id": "NVDA",
"name": "NVIDIA Corporation",
"country_code": "US",
"exchange": "Nasdaq",
"sector": "<string>",
"industry": "<string>",
"status": "compliant",
"last_analyzed_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"request_id": "req_abc123",
"as_of": "2023-11-07T05:31:56Z",
"methodology": "aaoifi-ss21@2026.1",
"total": 123,
"query": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "Maximum 50 symbols per request."
},
"meta": {
"request_id": "req_abc123"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or revoked API key."
},
"meta": {
"request_id": "req_abc123"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Daily request limit (100) exceeded. Resets at midnight UTC.",
"retry_after": 3600
},
"meta": {
"request_id": "req_abc123"
}
}Search returns both stocks and ETFs. Every item carries a
type
discriminator so you can branch on it:
type: "stock"— includes a compliancestatus(compliant|non-compliant|pending) andlast_analyzed_at.type: "etf"— includes Shariah purity (purity_percentageandbadge_color) plusmatch_coverage_percent, and carries nostatusfield. An ETF’s purity is deliberately not collapsed into a binary compliant/non-compliant verdict. Route ETF hits to Get an ETF for the full holdings-based breakdown.
match_coverage_percent is the percent of fund weight whose holdings are
matched to a screened instrument — it is match coverage, not screened
coverage. Do not present it as ”% screened”. purity_percentage /
badge_color are the screened verdict and are null until the ETF has been
screened.Filtering by type
The optionaltypes query parameter narrows results to one kind:
types=stock— stocks only (the pre-ETF response shape).types=etf— ETFs only.- Omitted — both (the default).
types is comma-separated and allow-list validated: any value other than
stock or etf returns 400 Bad Request.Authorizations
Query Parameters
Search query (ticker or company/fund name).
Minimum string length:
1Example:
"nvidia"
Required range:
1 <= x <= 100Comma-separated instrument-type filter. Allowed values: stock, etf. Omitted returns both. Any unrecognised value returns 400.
Example:
"stock"

