> For the complete documentation index, see [llms.txt](https://docs.alpha-lenz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.alpha-lenz.com/en/api-reference/public-api/financial.md).

# Financial

Access company information and financial statement data.

**Required Scope:** `read:financial` or `read:all`

## List Companies

Get a list of companies with optional filtering.

```
GET /api/public/v1/financial/companies
```

### Query Parameters

| Parameter | Type    | Description                           |
| --------- | ------- | ------------------------------------- |
| `search`  | string  | Search by name or symbol              |
| `sector`  | string  | Filter by sector                      |
| `country` | string  | Filter by country                     |
| `limit`   | integer | Results per page (1-100, default: 50) |
| `offset`  | integer | Pagination offset (default: 0)        |

### Example Request

```bash
curl -X GET "https://api.alpha-lenz.com/api/public/v1/financial/companies?search=samsung&limit=10" \
     -H "X-API-Key: ak_your_key"
```

### Response

```json
{
  "companies": [
    {
      "company_id": 1,
      "symbol": "005930",
      "name": "Samsung Electronics",
      "alias_name": "삼성전자",
      "exchange": "KRX",
      "sector": "Technology",
      "country": "KR"
    }
  ],
  "total": 1
}
```

***

## Get Company by Symbol

Get company information by stock symbol.

```
GET /api/public/v1/financial/companies/{symbol}
```

### Path Parameters

| Parameter | Type   | Description                   |
| --------- | ------ | ----------------------------- |
| `symbol`  | string | Stock symbol (e.g., "005930") |

### Example Request

```bash
curl -X GET "https://api.alpha-lenz.com/api/public/v1/financial/companies/005930" \
     -H "X-API-Key: ak_your_key"
```

### Response

```json
{
  "company_id": 1,
  "symbol": "005930",
  "name": "Samsung Electronics",
  "alias_name": "삼성전자",
  "exchange": "KRX",
  "sector": "Technology",
  "country": "KR"
}
```

***

## Get Company Financials

Get financial statements time series data for a company.

```
GET /api/public/v1/financial/companies/{symbol}/financials
```

### Path Parameters

| Parameter | Type   | Description  |
| --------- | ------ | ------------ |
| `symbol`  | string | Stock symbol |

### Query Parameters

| Parameter | Type    | Description                                    |
| --------- | ------- | ---------------------------------------------- |
| `period`  | string  | "Annual" or "Quarterly" (default: "Annual")    |
| `years`   | integer | Number of years to retrieve (1-20, default: 5) |

### Example Request

```bash
curl -X GET "https://api.alpha-lenz.com/api/public/v1/financial/companies/005930/financials?period=Annual&years=5" \
     -H "X-API-Key: ak_your_key"
```

### Response

```json
{
  "statements": [
    {
      "fiscal_date": "2023-12-31",
      "year": 2023,
      "quarter": null,
      "period": "Annual",
      "currency": "KRW",
      "sales": 258935000000000,
      "gross_profit": 85000000000000,
      "operating_income": 6570000000000,
      "net_income": 15490000000000,
      "total_assets": 455000000000000,
      "total_liabilities": 120000000000000,
      "total_shareholders_equity": 335000000000000,
      "operating_cash_flow": 50000000000000,
      "free_cash_flow": 30000000000000
    }
  ]
}
```

### Financial Statement Fields

**Income Statement:**

* `sales`, `cost_of_goods`, `gross_profit`
* `operating_income`, `net_income`
* `ebit`, `ebitda`
* `eps_basic`, `eps_diluted`

**Balance Sheet:**

* `total_assets`, `total_current_assets`, `total_non_current_assets`
* `total_liabilities`, `total_current_liabilities`, `total_non_current_liabilities`
* `total_shareholders_equity`
* `cash`, `inventory`, `accounts_receivable`

**Cash Flow:**

* `operating_cash_flow`, `investing_cash_flow`, `financing_cash_flow`
* `free_cash_flow`, `capital_expenditures`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.alpha-lenz.com/en/api-reference/public-api/financial.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
