Skip to main content

1. Create an account

Sign up at financialdatasets.ai and generate your API key from the dashboard.
You can try the API without an account using our free tier tickers: AAPL, MSFT, NVDA, TSLA, and GOOGL.

2. Make your first request

Every request needs two things:
  • Your API key in the X-API-KEY header
  • A ticker query parameter
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}")

3. Explore more endpoints

Now that you have the basics, try a few more calls:
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']}")
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']}")
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']}")
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}")

4. What’s next?

Financial Statements

Income statements, balance sheets, and cash flow statements.

Stock Prices

Historical and real-time price data.

SEC Filings

10-K, 10-Q, 8-K filings with section-level extraction.

MCP Server

Connect your AI assistant directly to our data.