database
Search Database
Search the local database of assets with filtering and pagination.
Returns a paginated list of assets matching the query string and optional filters for asset type, sector, country, and exchange.
curl example:
curl -X GET "http://localhost:8000/api/database/search?q=Apple&asset_type=equities&limit=10"
Python requests example:
import requests
resp = requests.get(
"http://localhost:8000/api/database/search",
params={"q": "Apple", "asset_type": "equities", "limit": 10},
)
results = resp.json()
get/api/database/search
Request
- Base URL: https://api.halalterminal.com
- URL: https://api.halalterminal.com/api/database/search
- Auth: API key in header X-API-Key
Query parameters
qstring
Free-text search query.
asset_typestring
Asset category to search, e.g. equities, etfs, funds.
sectorstring nullable
Filter by sector name.
countrystring nullable
Filter by country of listing.
exchangestring nullable
Filter by exchange code.
limitinteger
Max results to return.
offsetinteger
Number of results to skip, for pagination.
Response
Paginated search results with total count
Example response
{
"limit": 100,
"offset": 0,
"results": [
{
"country": "United States",
"exchange": "NMS",
"industry": "Consumer Electronics",
"market_cap": "Large",
"name": "Apple Inc.",
"sector": "Technology",
"symbol": "AAPL",
"type": "equities"
}
],
"total": 1
}Changes
No recorded changes to this operation across all 1 revision of this API.