# Sayistay — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access Turkish Court of Accounts audit reports, judicial decisions from the General Assembly and Appeals Board, relevant legislation, and official announcements all in one place. Search and browse reports by category, retrieve detailed decision information, and stay updated with the latest homepage announcements from Turkey's supreme audit institution.

**Category:** Government & Public Data | **Website:** [sayistay.gov.tr/](https://sayistay.gov.tr/) | **Docs:** [parse.bot/marketplace/308be1f2-8635-46bd-a929-c271bb89a902/sayistay-gov-tr-api](https://parse.bot/marketplace/308be1f2-8635-46bd-a929-c271bb89a902/sayistay-gov-tr-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-sayistay-gov-tr-api-308be1f2/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_general_assembly_decision_detail

Returns the full text content and metadata of a General Assembly (Genel Kurul) decision by its ID. Decision IDs can be found from decision references in other decisions or by browsing the site (e.g. 42134, 42156).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Decision ID (e.g. '42134'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sayistay-gov-tr-api-308be1f2/get_general_assembly_decision_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```

### get_homepage_announcements

Returns featured page links and institutional content links from the Sayıştay homepage, including links to informational pages about the court's structure, history, and functions.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sayistay-gov-tr-api-308be1f2/get_homepage_announcements \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_report_categories

Returns all top-level audit report categories available on the Sayıştay reports page. Each category includes an id, slug, name, and URL. Use category id and slug as inputs to get_report_subcategories or list_reports.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sayistay-gov-tr-api-308be1f2/get_report_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_report_detail

Returns full metadata and document download links for a specific audit report. Use the slug from list_reports or search_reports results. Returns title, page URL, metadata key-value pairs, and file download links.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Report slug from list_reports or search_reports results (e.g. '3838-fethiye-belediye-hizmetleri-turizm-ve-ti'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sayistay-gov-tr-api-308be1f2/get_report_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_report_subcategories

Returns subcategories for a given parent report category. Only categories that have child subcategories will return results (e.g. category_id '5' with slug 'kamu-idareleri-denetim-raporlari'). Categories without subcategories return an empty array.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Parent category ID from get_report_categories results (e.g. '5'). |
| `slug` | string | Yes | Parent category slug from get_report_categories results (e.g. 'kamu-idareleri-denetim-raporlari'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sayistay-gov-tr-api-308be1f2/get_report_subcategories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","slug":"<string>"}'
```

### list_appeals_board_decisions

Lists Appeals Board (Temyiz Kurulu) decisions with optional keyword filter. Returns paginated results from a DataTables API. Each decision includes an Id, date, department number, and decision summary.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `length` | integer | No | Number of results per page. |
| `query` | string | No | Search keyword within decision content. |
| `start` | integer | No | Starting index for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sayistay-gov-tr-api-308be1f2/list_appeals_board_decisions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"length":"<integer>","query":"<string>","start":"<integer>"}'
```

### list_general_assembly_decisions

Lists General Assembly decisions with optional keyword filter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `length` | integer | No | Number of results per page |
| `query` | string | No | Search keyword within content |
| `start` | integer | No | Starting index for pagination |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sayistay-gov-tr-api-308be1f2/list_general_assembly_decisions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"length":"<integer>","query":"<string>","start":"<integer>"}'
```

### list_reports

Lists audit reports within a category or subcategory. Returns paginated results with title, year, url, and slug for each report. Use category_id and slug from get_report_categories or get_report_subcategories.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Category or subcategory ID (e.g. '6'). |
| `page` | integer | No | Page number for pagination. |
| `slug` | string | Yes | Category or subcategory slug (e.g. 'genel-butce-kapsamindaki-kamu-idareleri'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sayistay-gov-tr-api-308be1f2/list_reports \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","page":"<integer>","slug":"<string>"}'
```

### search_reports

Searches for reports across all categories by keyword. Returns matching results with title, URL, and description snippet. Results are fetched from the site's built-in search at /Arama.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword (e.g. 'belediye'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-sayistay-gov-tr-api-308be1f2/search_reports \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
