> ## Documentation Index
> Fetch the complete documentation index at: https://docs.financialdatasets.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Get started with the Financial Datasets API in under 2 minutes. Install, authenticate, and make your first stock data API call.

## 1. Create an account

Sign up at [financialdatasets.ai](https://financialdatasets.ai) and generate your **API key** from the dashboard.

## 2. Make your first request

Every request needs two things:

* Your API key in the `X-API-KEY` header
* A `ticker` query parameter

<CodeGroup>
  ```python Python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
  import requests

  headers = {"X-API-KEY": "your_api_key_here"}

  url = "https://api.financialdatasets.ai/financials/income-statements?ticker=AAPL&period=annual&limit=4"

  response = requests.get(url, headers=headers)
  data = response.json()

  for stmt in data["income_statements"]:
      print(f"{stmt['report_period']}: Revenue = ${stmt['revenue']:,.0f}")
  ```

  ```javascript JavaScript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
  const response = await fetch(
    "https://api.financialdatasets.ai/financials/income-statements?ticker=AAPL&period=annual&limit=4",
    { headers: { "X-API-KEY": "your_api_key_here" } }
  );

  const data = await response.json();

  data.income_statements.forEach((stmt) => {
    console.log(`${stmt.report_period}: Revenue = $${stmt.revenue.toLocaleString()}`);
  });
  ```

  ```bash cURL theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
  curl "https://api.financialdatasets.ai/financials/income-statements?ticker=AAPL&period=annual&limit=4" \
    -H "X-API-KEY: your_api_key_here"
  ```
</CodeGroup>

## 3. Explore more endpoints

Now that you have the basics, try a few more calls:

<AccordionGroup>
  <Accordion title="Get the latest stock price">
    ```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    import requests

    # authenticate
    headers = {"X-API-KEY": "your_api_key_here"}

    # get the real-time price snapshot for NVDA
    url = "https://api.financialdatasets.ai/prices/snapshot?ticker=NVDA"
    response = requests.get(url, headers=headers)

    # parse the snapshot from the response
    snapshot = response.json()["snapshot"]
    print(f"NVDA: ${snapshot['close']}")
    ```
  </Accordion>

  <Accordion title="Look up company info">
    ```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    import requests

    # authenticate
    headers = {"X-API-KEY": "your_api_key_here"}

    # get company facts for Tesla
    url = "https://api.financialdatasets.ai/company/facts?ticker=TSLA"
    response = requests.get(url, headers=headers)

    # parse company facts from the response
    facts = response.json()["company_facts"]
    print(f"{facts['name']} — {facts['sector']}, {facts['industry']}")
    ```
  </Accordion>

  <Accordion title="Check insider trades">
    ```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    import requests

    # authenticate
    headers = {"X-API-KEY": "your_api_key_here"}

    # get the 5 most recent insider trades for Apple
    url = "https://api.financialdatasets.ai/insider-trades?ticker=AAPL&limit=5"
    response = requests.get(url, headers=headers)

    # parse insider trades from the response
    trades = response.json()["insider_trades"]
    for t in trades:
        print(f"{t['name']}: {t['transaction_shares']} shares on {t['transaction_date']}")
    ```
  </Accordion>

  <Accordion title="Search for high-revenue companies">
    ```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    import requests

    # authenticate
    headers = {"X-API-KEY": "your_api_key_here"}

    # use the screener to find companies with revenue > $50B
    url = "https://api.financialdatasets.ai/financials/search/screener"
    body = {
        "filters": [
            {"field": "revenue", "operator": "gt", "value": 50000000000}
        ],
        "limit": 10
    }
    response = requests.post(url, json=body, headers=headers)

    # parse the results from the response
    results = response.json()["results"]
    for r in results:
        print(f"{r['ticker']}: Revenue = ${r['revenue']:,.0f}")
    ```
  </Accordion>
</AccordionGroup>

## 4. What's next?

<CardGroup cols={2}>
  <Card title="Financial Statements" icon="file-invoice-dollar" href="/api/financials/income-statements">
    Income statements, balance sheets, and cash flow statements.
  </Card>

  <Card title="Stock Prices" icon="chart-line" href="/api/prices/historical">
    Historical and real-time price data.
  </Card>

  <Card title="SEC Filings" icon="file" href="/api/filings/ticker">
    10-K, 10-Q, 8-K filings with section-level extraction.
  </Card>

  <Card title="MCP Server" icon="robot" href="/mcp-server">
    Connect your AI assistant directly to our data.
  </Card>
</CardGroup>
