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

# Funds: Top-Level Entities in the MKK API

> Funds are the top-level entities in the MKK API, each identified by a unique fund_code and containing documents, periods, and financial data.

Funds are the primary organizing unit of the MKK Structured Data API. Each fund represents a named investment fund registered in the MKK system, and every document, line item value, and portfolio entry you retrieve is scoped to a specific fund. You use funds as the starting point for most queries — either to browse all available funds or to drill into a single fund's historical disclosures.

## What a fund is

A fund in the MKK API corresponds to a real investment fund that files periodic disclosure reports with MKK. Each fund has a human-readable `fund_title` and a short `fund_code` that serves as its primary identifier throughout the API.

## The fund\_code identifier

The `fund_code` is a short alphanumeric string (e.g., `"OJB"`) that uniquely identifies a fund. You can use `fund_code` as a path parameter or query filter anywhere the API accepts a fund reference. In most cases, `fund_code` is more convenient than the numeric `id` because it is stable, memorable, and visible in MKK filings.

<Tip>
  Use `fund_code` (e.g., `?fund_code=OJB`) in query parameters rather than `fund_id` when filtering related resources like line item values or portfolio entries. Both work, but `fund_code` is easier to read and less likely to change across environments.
</Tip>

## Periods

Each fund has a `first_period` and `last_period` that indicate the earliest and most recent reporting periods available in the API. Periods follow a consistent string format (e.g., `"2023-Q3"`) and are used to filter documents and line item values across time. The `period_count` field tells you how many distinct periods are available for a fund.

## What a fund response includes

A fund detail response includes aggregate counts that tell you how much data is available before you fetch child resources:

| Field             | Description                             |
| ----------------- | --------------------------------------- |
| `id`              | Numeric database ID                     |
| `fund_code`       | Short identifier (e.g., `"OJB"`)        |
| `fund_title`      | Full fund name                          |
| `document_count`  | Number of parsed disclosure documents   |
| `period_count`    | Number of distinct reporting periods    |
| `line_item_count` | Number of distinct line items extracted |
| `first_period`    | Earliest available period               |
| `last_period`     | Most recent period                      |

## Example requests

<CodeGroup>
  ```bash List all funds theme={null}
  curl https://mkk-roan.vercel.app/api/funds
  ```

  ```bash Get a single fund theme={null}
  curl https://mkk-roan.vercel.app/api/funds/OJB
  ```
</CodeGroup>

### Example response: GET /funds/OJB

```json theme={null}
{
  "id": 12,
  "fund_code": "OJB",
  "fund_title": "OJB Değişken Fon",
  "document_count": 48,
  "period_count": 16,
  "line_item_count": 94,
  "first_period": "2019-Q1",
  "last_period": "2023-Q4"
}
```

## What you can access from a fund

Once you have a `fund_code`, you can retrieve:

* **Documents** — the individual parsed PDF reports filed by the fund (`/documents?fund_code=OJB`)
* **Sections** — the canonical report sections available for the fund (`/sections?fund_code=OJB`)
* **Line item values** — structured financial metrics extracted from each report (`/line-item-values?fund_code=OJB`)
* **Portfolio entries** — normalized holdings tables from the fund's disclosures (`/portfolio-entries?fund_code=OJB`)
