# Resmi Gazete Scraper (`dodoflix/resmi-gazete-scraper`) Actor

Scrape Resmi Gazete, the official gazette of Turkey: laws, decrees, regulations and notices by date, section or keyword, with optional full text. Fast HTTP scraper, no browser.

- **URL**: https://apify.com/dodoflix/resmi-gazete-scraper.md
- **Developed by:** [Doğukan Metan](https://apify.com/dodoflix) (community)
- **Categories:** News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.35 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Resmi Gazete Scraper

Get every law, presidential decision, regulation, communique, court decision and notice from the [Resmi Gazete](https://www.resmigazete.gov.tr) (the official gazette of Turkey) as clean JSON, CSV or Excel. One row per item with the issue date, issue number, section, category, title and a link to the document, plus the document text if you want it. Runs on plain HTTP, so it is fast and cheap. No proxy setup and no code needed, and the price already includes platform usage.

### What you can do with it

- **Monitor new rules every day.** Schedule a run with `lastDays: 1` and get what was published today, sorted by section and category (laws, regulations, communiques, presidential decisions, board decisions).
- **Track a topic.** Give keywords such as `vergi`, `kripto` or `imar` and get the items whose title matches, or turn on `searchInText` to search inside the documents too.
- **Build a legal or compliance archive.** Pull a date range back to 2019 with the full text of every web-page item.
- **Follow one branch.** Take only laws and treaties (Yasama), only court decisions (Yargı), or only tender and court notices (İlan).
- **Handle repeat issues.** Extra issues of the same day (mükerrer) are read too, and every row says whether it comes from one.

### Quick start

Open the Input tab and press Start: it reads the last 3 days. Or pick one of these:

**Today's gazette**

```json
{
    "lastDays": 1
}
```

**Regulations and laws of a date range, with text**

```json
{
    "dateFrom": "2026-10-01",
    "dateTo": "2026-10-31",
    "sections": ["yasama", "yurutme"],
    "fullText": true
}
```

**Keyword monitor, titles and full text**

```json
{
    "lastDays": 30,
    "keywords": ["vergi", "gümrük"],
    "searchInText": true
}
```

### Input

| Field | What it does |
|---|---|
| `lastDays` | Days to read, counting back from the end date (today). `1` is today only |
| `dateFrom`, `dateTo` | A date range (`YYYY-MM-DD`, 2019-01-01 or later). `dateFrom` overrides `lastDays`. `dateTo` defaults to today in Istanbul |
| `sections` | `yasama`, `yurutme`, `yargi`, `ilan`. Empty means all |
| `keywords` | Only items whose title or category contains a keyword. Case-insensitive, Turkish letters handled |
| `searchInText` | With keywords, also return items whose text contains a keyword, using the site's own text search |
| `includeRepeatIssues` | Read the extra (mükerrer) issues of a day. On by default |
| `fullText` | Add the document text as `fullText` (one extra request per item) |
| `maxItems` | Stop the run after this many results |
| `maxRequestsPerMinute` | Request speed, 120 by default |
| `proxyConfiguration` | No proxy by default, which works on Apify. Leave as is |

### Output

Download the dataset as JSON, CSV, Excel, XML or HTML, or read it through the API.

```json
{
    "date": "2026-11-14",
    "issueNumber": 33430,
    "repeatNumber": null,
    "section": "Yürütme ve İdare",
    "category": "Yönetmelikler",
    "title": "Millî Eğitim Bakanlığı Ölçme ve Değerlendirme Yönetmeliğinde Değişiklik Yapılmasına Dair Yönetmelik",
    "url": "https://www.resmigazete.gov.tr/eskiler/2026/11/20261114-16.htm",
    "fileType": "htm",
    "issueUrl": "https://www.resmigazete.gov.tr/14.11.2026",
    "issuePdfUrl": "https://www.resmigazete.gov.tr/eskiler/2026/11/20261114.pdf",
    "fullText": "14 Kasım 2026 CUMARTESİ\nResmî Gazete\nSayı : 33430\nYÖNETMELİK\nMillî Eğitim Bakanlığından:\n..."
}
```

- `section` is one of Yasama, Yürütme ve İdare, Yargı, İlan. `category` is the sub-heading the gazette prints, such as Yönetmelikler, Tebliğler, Kurul Kararları or Cumhurbaşkanı Kararları (null in the İlan section).
- `url` points to the document itself: a web page (`htm`) or a PDF (`pdf`, mostly presidential decisions and some regulations). `issuePdfUrl` is the PDF of the whole issue.
- `repeatNumber` is `null` for the regular issue and `1`, `2`, ... for repeat issues, which share the issue number of the day.
- `fullText` only appears when `fullText` is on. It is `null` for PDF items and for notices.
- Dates are `YYYY-MM-DD`. Issue numbers are numbers.

### Pricing

You pay per result: **$1.50 per 1,000 results**. Platform usage and proxy are included, so there are no extra charges. For example, a full month of gazette index (about 300 items) costs about $0.45. You only pay for results you get, and a run that finds nothing costs almost nothing.

You can cap spending on every run in the run options. The Actor stops cleanly when the cap is reached.

### Why this Actor

- **Complete issues.** Regular and repeat issues, all four sections, laws to notices.
- **Direct document links and text.** Each item links to its own page or PDF, and the text comes as plain paragraphs, with the Word markup removed.
- **Keyword and section filters** applied before you pay for results.
- **Predictable cost.** One price per result with usage included.

### FAQ

**Which dates are covered?** 1 January 2019 and later. Older issues use a different page layout and are not read. Days without a gazette (a few holidays) simply give no rows.

**Why does a day have a "Yargı İlânları" row but no court decisions?** Those rows are the daily notice bundles of the İlan section, one page each. Court decisions are in the Yargı section, which appears only on days when the gazette carries court decisions (for example from the Court of Jurisdictional Disputes).

**Why is there no text for notices?** The notice pages contain private persons' names, so this Actor only links them (`url`) and never reads them.

**How does the keyword filter work?** Without `searchInText` it checks the item title and category. With it, the site's full-text search also runs and items whose document contains a keyword are added. That search can take a while.

**How fast is it?** About one issue per second by default (one request per day, about 10 to 20 results). The site occasionally stalls a request, so the Actor retries it.

**Can I use it from code?**

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('dodoflix/resmi-gazete-scraper').call({
    lastDays: 1,
    sections: ['yasama', 'yurutme'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

It also connects to Make, Zapier, Google Sheets, Slack and webhooks from the Integrations tab.

**Something broke or a field is missing.** Open an issue on the Issues tab with the input you used.

### Legal

This Actor collects public pages of the official gazette. You are responsible for how you use the data, including KVKK/GDPR and the site's terms and robots.txt.

### Türkçe özet

Resmî Gazete'de yayımlanan kanun, karar, yönetmelik, tebliğ ve ilanları tarih, bölüm veya anahtar kelimeye göre JSON, CSV veya Excel olarak indirin. İsteğe bağlı olarak belge metni de gelir. Proxy ayarı gerekmez.

# Actor input Schema

## `lastDays` (type: `integer`):

Read this many days counting back from the end date (today when empty). 1 means today only. Ignored when a start date is set.

## `dateFrom` (type: `string`):

First day of a date range (YYYY-MM-DD, 2019-01-01 or later). Overrides Last days.

## `dateTo` (type: `string`):

Last day of the range (YYYY-MM-DD). Defaults to today in Istanbul.

## `sections` (type: `array`):

Only items from these sections of the gazette. Leave empty for all four.

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

Only items whose title or category contains one of these words (case-insensitive, Turkish letters handled). Leave empty for everything.

## `searchInText` (type: `boolean`):

With keywords, also return items whose full text contains a keyword, using the site's own text search. Slower, and the site can be slow to answer.

## `includeRepeatIssues` (type: `boolean`):

Also read the extra issues the gazette publishes on the same day. They carry the same issue number and a repeat number.

## `fullText` (type: `boolean`):

Add the text of each web-page (htm) item as fullText. Costs one extra request per item. PDF items and notices (Ilan section) have no text and get null.

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

Stop the run after this many results. Leave empty for no limit.

## `maxRequestsPerMinute` (type: `integer`):

Request speed. The site answered 240 per minute without errors in tests, so the default of 120 leaves room. Lower it if you see timeouts.

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

No proxy is needed: the site answers Apify servers directly. Pick a proxy only if you see blocks.

## Actor input object example

```json
{
  "lastDays": 3,
  "searchInText": false,
  "includeRepeatIssues": true,
  "fullText": false,
  "maxRequestsPerMinute": 120,
  "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 = {
    "lastDays": 3,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dodoflix/resmi-gazete-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 = {
    "lastDays": 3,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("dodoflix/resmi-gazete-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 '{
  "lastDays": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call dodoflix/resmi-gazete-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dodoflix/resmi-gazete-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/lMady8eMabmjNEXjJ/builds/QiuBQ0yTMWctaBP70/openapi.json
