Skip to content
--:--:--LOCAL ·--:--UTC
    US EQUITIESLAST CLOSE
    AAPL$358.54+0.83%
    MSFT$492.85+0.60%
    GOOGL$274.96+0.68%
    AMZN$254.12+3.96%
    NVDA$150.49+0.80%
    META$628.96+3.13%
    TSLA$400.00+5.22%
    NFLX$60.93+2.56%
    BRK.B$580.79+0.25%
    AVGO$312.34+3.82%
    DIS$127.24+1.31%
    SBUX$108.80+0.98%
    MCD$282.62-0.31%
    NKE$37.32+1.80%
    COST$1097.81+1.01%
    WMT$133.13+0.90%
    HD$362.15+0.25%
    KO$97.40-0.19%
    PG$172.86-0.21%
    ORCL$107.13+3.13%
    CRM$198.21+0.51%
    ADBE$234.79+0.84%
    AMD$424.54+4.56%
    INTC$57.40+5.38%
    QCOM$179.27+6.29%
    CSCO$97.04+3.01%
    IBM$248.08+1.89%
    UBER$66.63+0.42%
    ABNB$179.16+4.07%
    SHOP$141.78+6.28%
    PYPL$59.14+2.30%
    COIN$107.04+3.20%
    PLTR$172.17+5.24%
    HOOD$67.92+3.25%
    JPM$322.96+1.96%
    V$429.56+1.22%
    MA$666.96+1.06%
    BAC$49.07+1.09%
    GS$812.87+1.48%
    LLY$1392.38+0.01%
    UNH$351.41+1.51%
    JNJ$275.51+0.57%
    PFE$28.52+0.21%
    XOM$160.18+1.33%
    BA$167.24+1.65%
    BABA$89.68+3.96%
    TSM$353.34+3.21%
    US EQUITIESLAST CLOSE
    AAPL$358.54+0.83%
    MSFT$492.85+0.60%
    GOOGL$274.96+0.68%
    AMZN$254.12+3.96%
    NVDA$150.49+0.80%
    META$628.96+3.13%
    TSLA$400.00+5.22%
    NFLX$60.93+2.56%
    BRK.B$580.79+0.25%
    AVGO$312.34+3.82%
    DIS$127.24+1.31%
    SBUX$108.80+0.98%
    MCD$282.62-0.31%
    NKE$37.32+1.80%
    COST$1097.81+1.01%
    WMT$133.13+0.90%
    HD$362.15+0.25%
    KO$97.40-0.19%
    PG$172.86-0.21%
    ORCL$107.13+3.13%
    CRM$198.21+0.51%
    ADBE$234.79+0.84%
    AMD$424.54+4.56%
    INTC$57.40+5.38%
    QCOM$179.27+6.29%
    CSCO$97.04+3.01%
    IBM$248.08+1.89%
    UBER$66.63+0.42%
    ABNB$179.16+4.07%
    SHOP$141.78+6.28%
    PYPL$59.14+2.30%
    COIN$107.04+3.20%
    PLTR$172.17+5.24%
    HOOD$67.92+3.25%
    JPM$322.96+1.96%
    V$429.56+1.22%
    MA$666.96+1.06%
    BAC$49.07+1.09%
    GS$812.87+1.48%
    LLY$1392.38+0.01%
    UNH$351.41+1.51%
    JNJ$275.51+0.57%
    PFE$28.52+0.21%
    XOM$160.18+1.33%
    BA$167.24+1.65%
    BABA$89.68+3.96%
    TSM$353.34+3.21%
    Plug stock market data into your AI agent — one command: Get your free API key →
    LoginGet API Key

    Stock market data infrastructure

    Download annual reports as markdown

    Discover ASX report conversions and retrieve markdown securely while retaining report identity, original PDFs, and missing-format states.

    Documentation revised

    Discover and fetch only advertised links

    Install httpx and set STOCKMARKET_API_KEY. This example requests ASX filings for an illustrative company, skips missing conversions, validates the download host before sending a credential, and checks each HTTP status.

    import os
    from urllib.parse import urlparse
    import httpx
    
    headers = {"X-API-Key": os.environ["STOCKMARKET_API_KEY"]}
    with httpx.Client(timeout=30) as client:
        response = client.get(
            "https://stockmarketapi.ai/api/v1/companies/BHP/filings",
            params={"source": "asx", "limit": 3, "exchange": "ASX"},
            headers=headers,
        )
        response.raise_for_status()
        for filing in response.json()["filings"]:
            url = filing.get("markdown_url")
            if not url:
                continue
            # Only send the API key to the API's own download host.
            parsed = urlparse(url)
            if parsed.scheme != "https" or parsed.netloc != "stockmarketapi.ai":
                continue
            document = client.get(url, headers=headers)
            document.raise_for_status()
            print(filing.get("report_date"), document.text[:500])

    Keep the document identity

    Save source, accession_number, form_type, report_date, filing_date, and document_url alongside extracted text. report_date is a period-end label; filing_date is the release date and may be null. Keep stable links instead of storing optional short-lived storage redirects.

    Verify content before indexing

    A conversion can change table structure, omit scanned text, or distort footnotes. Compare representative text and tables with the PDF before using the markdown in a retrieval system. An empty filings list and a list of PDFs without markdown are different ingestion states and should be reported separately.