Skip to content
--:--:--LOCAL ·--:--UTC
    US EQUITIESLAST CLOSE
    AAPL$344.63-1.23%
    MSFT$521.91-1.55%
    GOOGL$279.84-1.40%
    AMZN$240.35-1.41%
    NVDA$204.64-4.22%
    META$614.99-1.53%
    TSLA$399.81-0.87%
    NFLX$62.08+0.05%
    BRK.B$542.49+0.10%
    AVGO$326.08-5.48%
    DIS$110.94+0.03%
    SBUX$103.67-1.74%
    MCD$258.12+0.29%
    NKE$38.67+0.65%
    COST$1012.28+1.63%
    WMT$123.51+1.86%
    HD$329.20+0.07%
    KO$94.08+1.36%
    PG$161.57+0.61%
    ORCL$130.67-6.37%
    CRM$229.17-0.75%
    ADBE$250.23+0.85%
    AMD$504.80-10.88%
    INTC$65.76-28.58%
    QCOM$164.79-11.12%
    CSCO$104.51-3.76%
    IBM$257.81-0.18%
    UBER$65.25-0.75%
    ABNB$164.39-1.24%
    SHOP$157.49-5.63%
    PYPL$57.01+0.11%
    COIN$143.54-10.62%
    PLTR$184.11-6.27%
    HOOD$84.99-7.21%
    JPM$337.04-1.90%
    V$413.59+0.74%
    MA$638.01+0.36%
    BAC$50.01-2.21%
    GS$894.55-3.58%
    LLY$1417.54+3.19%
    UNH$406.97-0.96%
    JNJ$273.20-0.73%
    PFE$30.52+1.90%
    XOM$187.25+2.16%
    BA$171.55-0.64%
    BABA$98.04-1.51%
    TSM$406.13-5.95%
    US EQUITIESLAST CLOSE
    AAPL$344.63-1.23%
    MSFT$521.91-1.55%
    GOOGL$279.84-1.40%
    AMZN$240.35-1.41%
    NVDA$204.64-4.22%
    META$614.99-1.53%
    TSLA$399.81-0.87%
    NFLX$62.08+0.05%
    BRK.B$542.49+0.10%
    AVGO$326.08-5.48%
    DIS$110.94+0.03%
    SBUX$103.67-1.74%
    MCD$258.12+0.29%
    NKE$38.67+0.65%
    COST$1012.28+1.63%
    WMT$123.51+1.86%
    HD$329.20+0.07%
    KO$94.08+1.36%
    PG$161.57+0.61%
    ORCL$130.67-6.37%
    CRM$229.17-0.75%
    ADBE$250.23+0.85%
    AMD$504.80-10.88%
    INTC$65.76-28.58%
    QCOM$164.79-11.12%
    CSCO$104.51-3.76%
    IBM$257.81-0.18%
    UBER$65.25-0.75%
    ABNB$164.39-1.24%
    SHOP$157.49-5.63%
    PYPL$57.01+0.11%
    COIN$143.54-10.62%
    PLTR$184.11-6.27%
    HOOD$84.99-7.21%
    JPM$337.04-1.90%
    V$413.59+0.74%
    MA$638.01+0.36%
    BAC$50.01-2.21%
    GS$894.55-3.58%
    LLY$1417.54+3.19%
    UNH$406.97-0.96%
    JNJ$273.20-0.73%
    PFE$30.52+1.90%
    XOM$187.25+2.16%
    BA$171.55-0.64%
    BABA$98.04-1.51%
    TSM$406.13-5.95%
    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.