filings

Get Facts

Retrieve XBRL company facts for a ticker symbol.

Returns structured financial data extracted from the company's SEC filings via the EDGAR XBRL API. Facts are organized by taxonomy (e.g. us-gaap) and concept (e.g. Revenue, Assets). This data is used internally for financial-ratio-based Shariah compliance screening.

curl example:

curl -X GET "http://localhost:8000/api/filings/MSFT/facts"

Python requests example:

import requests

resp = requests.get("http://localhost:8000/api/filings/MSFT/facts")
facts = resp.json()["facts"]
# Access US-GAAP revenue data
revenue = facts.get("us-gaap", {}).get("Revenue", {})
print(revenue)
get/api/filings/{symbol}/facts

Request

  • Base URL: https://api.halalterminal.com
  • URL: https://api.halalterminal.com/api/filings/{symbol}/facts
  • Auth: API key in header X-API-Key

Path parameters

symbolstring required

Ticker symbol, e.g. AAPL.

Response

XBRL company facts from SEC EDGAR

symbolstring required

Ticker symbol of the company

cikstring required

SEC Central Index Key (CIK) number for the company

company_namestring nullable

Official company name as registered with the SEC

factsobject required

XBRL facts organized by taxonomy (e.g. 'us-gaap', 'dei') and concept

Example response

{
  "cik": "0000320193",
  "company_name": "Apple Inc.",
  "facts": {
    "us-gaap": {
      "Revenue": {
        "label": "Revenue",
        "units": {
          "USD": [
            {
              "fy": 2023,
              "val": 383285000000
            }
          ]
        }
      }
    }
  },
  "symbol": "AAPL"
}

Changes

No recorded changes to this operation across all 1 revision of this API.