# Turkish Official Gazette (Resmi Gazete) Scraper (`coolwind/turkish-official-gazette-scraper`) Actor

Daily Turkish laws, presidential decrees, regulations, communiqués and court decisions from Türkiye's Official Gazette as clean JSON: English labels, full text (HTML, PDF and OCR for scanned PDFs), filters, and optional English summaries. Built for AI agents and compliance teams.

- **URL**: https://apify.com/coolwind/turkish-official-gazette-scraper.md
- **Developed by:** [Tolga Kilitci](https://apify.com/coolwind) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 documents

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Turkish Official Gazette (Resmî Gazete) Scraper

Get every new Turkish **law, presidential decree, regulation, communiqué and Constitutional Court decision** published in the *Resmî Gazete* — Türkiye's Official Gazette — as clean, structured JSON. English document-type labels, full Turkish text (HTML **and** PDF entries), supplementary (*mükerrer*) issues, and optional English titles and summaries.

Built for **AI agents, compliance teams, law firms, investors and researchers** who need to know what changed in Turkish law today, without reading a Turkish website.

### What you get

| Field | Example |
|---|---|
| `date` | `2026-10-06` |
| `issueNumber` | `33392` |
| `isMukerrer` | `false` (true for supplementary same-day issues) |
| `section` | `Executive and Administrative Section` |
| `type` / `typeCode` | `Regulation` / `regulation` |
| `typeTr` | `YÖNETMELİK` |
| `title` | `Çevre Yönetimi Hizmetleri Hakkında Yönetmelikte Değişiklik Yapılmasına Dair Yönetmelik` |
| `titleEn` | `Regulation Amending the Regulation on Environmental Management Services` *(optional)* |
| `summaryEn` | 2–3 sentence plain-English summary *(optional)* |
| `issuingAuthority` | `Çevre, Şehircilik ve İklim Değişikliği Bakanlığından` |
| `lawNumber` | `7567` (for laws) |
| `format` | `html` or `pdf` |
| `fullText` | Full Turkish text of the document |
| `url` | Link to the official source page |
| `issuePdfUrl` | Link to the full issue PDF |

Document types: laws, presidential decrees, presidential decisions, presidential circulars and regulations, regulations, communiqués, circulars, board decisions, appointments, international agreements, Constitutional Court / Court of Cassation / Council of State decisions, parliament decisions, and (optionally) judicial, tender and miscellaneous notices.

### How to use it

- **Today's Gazette** — run with default input. Schedule it daily (e.g. 07:00 Turkey time) to get a morning feed.
- **A date range** — set *Start date* and *End date* (up to 366 days per run).
- **Only what matters to you** — filter by *Document types* (e.g. only laws and presidential decrees) or by *Title keywords* such as `vergi` (tax), `gümrük` (customs), `enerji` (energy), `ithalat` (imports), `bankacılık` (banking).
- **English** — add your own OpenAI API key to get an English title and summary for every entry. The key is stored as a secret input and is only sent to OpenAI.

#### Example input

```json
{
  "startDate": "2026-10-01",
  "endDate": "2026-10-06",
  "documentTypes": ["law", "presidential_decree", "presidential_decision", "regulation"],
  "keywords": ["vergi", "gümrük"],
  "includeFullText": true
}
```

### Use with AI agents (MCP)

This Actor works as a tool for AI agents through the [Apify MCP server](https://mcp.apify.com). Ask your agent things like *"What new Turkish regulations about customs were published this week?"* and let it call this Actor.

### Pricing

Pay per result: you are charged per document returned, plus a small fee per page when OCR is used on scanned PDFs. Use *Max documents* to cap the cost of a run. Days with nothing matching your filters cost nothing.

### Data source and legal note

All data comes from the official website of the Presidency of the Republic of Türkiye, [resmigazete.gov.tr](https://www.resmigazete.gov.tr). Under Article 31 of Turkish Law No. 5846 on Intellectual and Artistic Works, laws, regulations, official gazettes and court decisions that are officially published may be freely reproduced and distributed. Each result links back to the official source. English titles and summaries are machine-generated and are **not** official translations; always rely on the Turkish original for legal purposes. This Actor is not affiliated with the Turkish government.

### FAQ

**How often is the Gazette published?** Every day, including weekends, usually shortly after midnight Turkey time. Extra *mükerrer* issues can appear on the same day.

**Some entries are PDFs — do I still get the text?** Yes. Text-based PDFs are extracted directly. Some entries, such as Constitutional Court decisions, are scanned images with no text layer; turn on *OCR scanned PDFs* and they are read with Turkish OCR (about 10 seconds per page). Each result has `textQuality` (`ok`, `low` or `ocr`) so you know what you got.

**Something broke or a field is missing?** Open an issue on the Actor page — fixes are usually published within a day.

# Actor input Schema

## `daysBack` (type: `integer`):

How many days to collect, ending today (Turkey time). 1 = today's issue only.

## `startDate` (type: `string`):

First day to collect (YYYY-MM-DD). Leave empty to use 'Days back'.

## `endDate` (type: `string`):

Last day to collect (YYYY-MM-DD). Defaults to the start date, or today when using 'Days back'. Max 366 days per run.

## `documentTypes` (type: `array`):

Only return these types. Leave empty for everything.

## `keywords` (type: `array`):

Only return entries whose title contains any of these words, e.g. 'vergi', 'gümrük', 'enerji'. Case-insensitive.

## `includeAnnouncements` (type: `boolean`):

Judicial, tender and miscellaneous notices. Off by default.

## `includeMukerrer` (type: `boolean`):

Extra same-day issues, often used for budget laws and urgent decrees.

## `maxItems` (type: `integer`):

Stop after this many documents (0 = no limit). Useful to cap cost.

## `includeFullText` (type: `boolean`):

Download each document (HTML or PDF) and return its full Turkish text.

## `ocrScannedPdfs` (type: `boolean`):

Some Gazette PDFs (e.g. Constitutional Court decisions) are scanned images with no text layer. Enable to read them with Turkish OCR. Slower; charged per OCR'd page.

## `ocrMaxPages` (type: `integer`):

Maximum pages to OCR per PDF.

## `openAiApiKey` (type: `string`):

If set, each entry gets an English title and a 2-3 sentence English summary, generated with your own OpenAI account. Leave empty to skip.

## `openAiModel` (type: `string`):

Model used for translation when an API key is provided.

## `requestDelayMs` (type: `integer`):

Politeness delay towards resmigazete.gov.tr, in milliseconds.

## `maxConcurrency` (type: `integer`):

How many documents to download at the same time. Keep low to be polite to the server.

## `proxyConfiguration` (type: `object`):

Usually not needed. Enable if the site starts blocking requests.

## Actor input object example

```json
{
  "daysBack": 1,
  "includeAnnouncements": false,
  "includeMukerrer": true,
  "maxItems": 0,
  "includeFullText": true,
  "ocrScannedPdfs": false,
  "ocrMaxPages": 30,
  "openAiModel": "gpt-4o-mini",
  "requestDelayMs": 1000,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "daysBack": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("coolwind/turkish-official-gazette-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "daysBack": 1 }

# Run the Actor and wait for it to finish
run = client.actor("coolwind/turkish-official-gazette-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "daysBack": 1
}' |
apify call coolwind/turkish-official-gazette-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,coolwind/turkish-official-gazette-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/4Yi9GxKmccPBKQD5z/builds/szYCrpTVua2BpVRbJ/openapi.json
