> ## 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.

> ## Agent Instructions
> The Financial Datasets API is served at https://api.financialdatasets.ai. Authenticate with the `X-API-KEY` header; create keys at https://financialdatasets.ai. Agents can open and fund their own account without a dashboard: see https://docs.financialdatasets.ai/agents.md.
> Tool-using agents can call Financial Datasets without writing code through the hosted MCP server at https://mcp.financialdatasets.ai/.
> The OpenAPI spec at https://financialdatasets.ai/openapi.json is the source of truth for request and response schemas.
> The index of every docs page is at https://docs.financialdatasets.ai/llms.txt. Append .md to any docs URL to get that page as Markdown.

# Get UK Fundamentals

> Learn how to fetch income statements, balance sheets, cash flow statements, and financial metrics for companies listed on the London Stock Exchange using Python.

UK fundamentals use the same endpoints as US fundamentals. The only difference is how you name the company: a London ticker together with `exchange=LSE`, or the company's ISIN. This guide walks through both.

## Prerequisites

* Python 3.7+
* A Financial Datasets API key ([sign up here](https://financialdatasets.ai))
* The `requests` library (`pip install requests`)

## Step 1: Set Up Authentication

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import requests

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

## Step 2: Find a London Ticker

Every financials endpoint has a `/tickers/` list. Filter it by `exchange=LSE` to see the UK companies we cover, each with its name, ISIN, and whether it is still listed.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
url = "https://api.financialdatasets.ai/financials/income-statements/tickers/?exchange=LSE"

response = requests.get(url, headers=headers)
listings = response.json().get("listings")

for listing in listings[:5]:
    print(f"{listing['ticker']}: {listing['name']} ({listing['identifier']}, {listing['status']})")
```

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "resource": "income-statements",
  "listings": [
    {"ticker": "RR.", "name": "ROLLS-ROYCE HOLDINGS PLC", "exchange": "LSE", "identifier": "GB00B63H8491", "identifier_type": "ISIN", "status": "active"},
    {"ticker": "SHEL", "name": "SHELL PLC", "exchange": "LSE", "identifier": "GB00BP6MXD84", "identifier_type": "ISIN", "status": "active"}
  ],
  "tickers": ["AAL", "ABF", "ADM", "..."]
}
```

London tickers keep their exchange spelling, so a ticker like `RR.` includes the trailing dot.

## Step 3: Fetch Income Statements

Add `exchange=LSE` next to the ticker. UK companies report once a year, so use `period=annual`.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
ticker = "RR."
exchange = "LSE"
period = "annual"
limit = 5

url = (
    f"https://api.financialdatasets.ai/financials/income-statements"
    f"?ticker={ticker}"
    f"&exchange={exchange}"
    f"&period={period}"
    f"&limit={limit}"
)

response = requests.get(url, headers=headers)
income_statements = response.json().get("income_statements")

for stmt in income_statements:
    print(f"{stmt['report_period']}: Revenue={stmt['revenue']:,} {stmt['currency']}, Net Income={stmt['net_income']:,} {stmt['currency']}")
```

Amounts are in the currency the company reports in. Read it from the `currency` field on each statement: most UK companies report in GBP, some in USD or EUR.

## Step 4: Request by ISIN Instead

If you know the ISIN, pass it on its own. No ticker or exchange is needed.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
url = (
    f"https://api.financialdatasets.ai/financials/income-statements"
    f"?isin=GB00B63H8491"
    f"&period=annual"
    f"&limit=5"
)

response = requests.get(url, headers=headers)
income_statements = response.json().get("income_statements")
```

## Step 5: Fetch Balance Sheets and Cash Flow Statements

The [Balance Sheets API](/api/financials/balance-sheets) and [Cash Flow Statements API](/api/financials/cash-flow-statements) take the same parameters.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
for statement in ["balance-sheets", "cash-flow-statements"]:
    url = (
        f"https://api.financialdatasets.ai/financials/{statement}"
        f"?ticker={ticker}"
        f"&exchange={exchange}"
        f"&period={period}"
        f"&limit={limit}"
    )
    response = requests.get(url, headers=headers)
    print(statement, response.json())
```

To get all three statements in one request, call the [All Financial Statements API](/api/financials/all-financial-statements) with the same parameters.

## Step 6: Fetch Financial Metrics

The [Financial Metrics API](/api/financial-metrics/historical) returns margins, growth, and per-share values for each annual period, and the [Snapshot API](/api/financial-metrics/snapshot) the latest period.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
url = (
    f"https://api.financialdatasets.ai/financial-metrics"
    f"?ticker={ticker}"
    f"&exchange={exchange}"
    f"&period={period}"
    f"&limit={limit}"
)

response = requests.get(url, headers=headers)
financial_metrics = response.json().get("financial_metrics")

for metrics in financial_metrics:
    print(f"{metrics['report_period']}: Gross Margin={metrics['gross_margin']}, Net Margin={metrics['net_margin']}")
```

Price-based values such as market cap, enterprise value, valuation ratios, and dividend yield are not available for UK companies yet and come back as `null`.

## Step 7: Fetch As-Reported Statements

As-reported statements give you the lines exactly as the company printed them in its annual report, with the company's own labels and subtotals. Add `/as-reported` to any statement endpoint.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
url = (
    f"https://api.financialdatasets.ai/financials/income-statements/as-reported"
    f"?ticker={ticker}"
    f"&exchange={exchange}"
    f"&period={period}"
    f"&limit=1"
)

response = requests.get(url, headers=headers)
statement = response.json().get("income_statements")[0]

def print_lines(nodes, depth=0):
    for node in nodes:
        print(f"{'  ' * depth}{node['label']}: {node['value']}")
        print_lines(node["children"], depth + 1)

print_lines(statement["line_items"])
```

## Annual Data Only

UK companies file one tagged annual report a year, so `period=annual` is the only period. A request with `period=quarterly` or `period=ttm` returns a `400`:

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "error": "Invalid period",
  "message": "Listings on LSE carry annual data only. Use period=annual."
}
```

## Next Steps

* [Market Coverage](/market-coverage) — which markets are available and how to request each
* [Income Statements API Reference](/api/financials/income-statements) — full parameter documentation
* [Financial Metrics API](/api/financial-metrics/historical) — every metric we calculate
* [Get US Fundamentals Guide](/guides/analyze-financial-statements-python) — the same walk-through for US companies


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.