Skip to main content

Documentation Index

Fetch the complete documentation index at: https://demircancelebi.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The documents endpoints give you access to every parsed fund disclosure in the MKK dataset. Each document corresponds to a single periodic fund report (a PDF filed with MKK), enriched with extracted line item values, normalized portfolio entries, and optional raw text. You can look up documents by their numeric ID, by MKK disclosure index string, or stream the original PDF binary directly.

Endpoints

MethodPathDescription
GET/documentsList and search documents with pagination
GET/documents/{docId}Retrieve full detail for a single document
GET/documents/{docId}/pdfStream the source PDF binary
HEAD/documents/{docId}/pdfCheck PDF availability without downloading
GET/disclosures/{disclosureIndex}Retrieve a document by MKK disclosure index
Base URL: https://mkk-roan.vercel.app/api

GET /documents

Returns a paginated list of fund disclosure documents matching your filters.

Query parameters

fund_code
string
Return only documents for the fund with this code (e.g., OJB).
period
string
Filter by reporting period in YYYY-MM format (e.g., 2023-06).
q
string
Free-text search across document metadata fields such as fund name, file name, and document type.
limit
integer
default:"50"
Maximum number of documents to return. Accepts values from 1 to 500.
offset
integer
default:"0"
Number of documents to skip before returning results. Use with limit to paginate through large result sets.

Response schema

total
integer
required
Total number of documents matching the applied filters, regardless of pagination.
limit
integer
required
The effective limit applied to this response.
offset
integer
required
The effective offset applied to this response.
documents
DocumentSummary[]
required
Array of document summary objects.

Example request

curl "https://mkk-roan.vercel.app/api/documents?fund_code=OJB&limit=10"

Example response

200
{
  "total": 487,
  "limit": 10,
  "offset": 0,
  "documents": [
    {
      "id": 1042,
      "disclosure_index": "2023-TR-00012345",
      "file_name": "OJB_202306.pdf",
      "pdf_url": "https://mkk.org.tr/...",
      "kap_file_url": "https://kap.org.tr/file/...",
      "kap_url": "https://kap.org.tr/disclosure/...",
      "page_count": 12,
      "parsed_pages": 12,
      "document_type": "monthly",
      "fund_code": "OJB",
      "fund_title": "Oyak Jinsi Bono Fonu",
      "period": "2023-06",
      "report_date": "2023-07-04",
      "management_company": "Oyak Portföy",
      "line_item_value_count": 94,
      "portfolio_entry_count": 312,
      "portfolio_row_count": 318
    }
  ]
}

GET /documents/

Returns the full detail for a single document, including extracted values, sections, portfolio data, and optionally raw text and table data.

Path parameters

docId
integer
required
The numeric document ID. This corresponds to the id field returned by GET /documents.

Query parameters

include_raw
string
When set to a truthy value (1, true, yes, or on), the response includes the raw_text string (full extracted text from the PDF) and the tables array (raw table structures parsed from each page). These fields can significantly increase response size.

Response schema

DocumentDetail extends DocumentSummary with:
imported_at
string
required
ISO 8601 timestamp of when this document was first imported.
updated_at
string
required
ISO 8601 timestamp of the most recent update to this document’s data.
fund
object
required
Fund identity object.
line_item_values
LineItemValue[]
required
All line item values extracted from this document. See the Line Items reference for the full schema.
sections
SectionSummary[]
required
Canonical sections represented in this document.
portfolio_rows
object[]
required
Raw portfolio table rows extracted directly from the PDF before normalization.
portfolio_entries
PortfolioEntry[]
required
Normalized portfolio entries. See the Portfolio reference for the full schema.
totals
object[]
required
Extracted portfolio total rows (e.g., grand totals from portfolio tables).
raw_text
string
Full plain-text content extracted from the PDF. Only present when include_raw is truthy. May be null if text extraction failed.
tables
object[]
Raw table structures parsed from the PDF pages. Only present when include_raw is truthy.
Setting include_raw=true can produce very large responses for documents with many pages. Use this option only when you specifically need the raw text or table structures.

Error responses

StatusDescription
404No document with the given docId exists.

Example requests

curl https://mkk-roan.vercel.app/api/documents/1042

GET /documents//pdf

Streams the original source PDF binary for a document.

Path parameters

docId
integer
required
The numeric document ID.

Response

Returns 200 application/pdf with the PDF binary stream, or 404 if the PDF is not available.
Use curl -O or curl -o filename.pdf to save the PDF to disk rather than printing binary content to your terminal.

Example request

curl -o report.pdf https://mkk-roan.vercel.app/api/documents/1042/pdf

HEAD /documents//pdf

Checks whether a PDF is available for a document without downloading it. Useful for verifying availability before streaming.

Path parameters

docId
integer
required
The numeric document ID.

Response

Returns 200 if the PDF exists or 404 if it does not. No body is returned.

Example request

curl -I https://mkk-roan.vercel.app/api/documents/1042/pdf

GET /disclosures/

Returns the full DocumentDetail for a document identified by its MKK disclosure index string. This is equivalent to GET /documents/{docId} but uses the MKK-assigned identifier instead of the internal numeric ID.

Path parameters

disclosureIndex
string
required
The MKK disclosure index string (e.g., 2023-TR-00012345). This value is available in the disclosure_index field of any document summary or detail.

Query parameters

include_raw
string
When set to a truthy value (1, true, yes, or on), the response includes raw_text and tables. See the GET /documents/{docId} section above for details.

Error responses

StatusDescription
404No document with the given disclosure index exists.

Example request

curl https://mkk-roan.vercel.app/api/disclosures/2023-TR-00012345