{
  "openapi": "3.0.1",
  "info": {
    "title": "Turkish Official Gazette (Resmi Gazete) Scraper",
    "description": "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.",
    "version": "0.0",
    "x-build-id": "szYCrpTVua2BpVRbJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coolwind~turkish-official-gazette-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coolwind-turkish-official-gazette-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/coolwind~turkish-official-gazette-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coolwind-turkish-official-gazette-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/coolwind~turkish-official-gazette-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coolwind-turkish-official-gazette-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "daysBack": {
            "title": "Days back (used when Start date is empty)",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "How many days to collect, ending today (Turkey time). 1 = today's issue only.",
            "default": 1
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "First day to collect (YYYY-MM-DD). Leave empty to use 'Days back'."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Last day to collect (YYYY-MM-DD). Defaults to the start date, or today when using 'Days back'. Max 366 days per run."
          },
          "documentTypes": {
            "title": "Document types",
            "type": "array",
            "description": "Only return these types. Leave empty for everything.",
            "items": {
              "type": "string",
              "enum": [
                "law",
                "presidential_decree",
                "presidential_decision",
                "presidential_circular",
                "presidential_regulation",
                "regulation",
                "communique",
                "circular",
                "board_decision",
                "appointment",
                "international_agreement",
                "constitutional_court_decision",
                "court_of_cassation_decision",
                "council_of_state_decision",
                "jurisdictional_disputes_decision",
                "parliament_decision",
                "decision",
                "legislative",
                "executive",
                "judicial",
                "announcements",
                "other"
              ],
              "enumTitles": [
                "Laws",
                "Presidential decrees",
                "Presidential decisions",
                "Presidential circulars",
                "Presidential regulations",
                "Regulations",
                "Communiqués",
                "Circulars",
                "Board decisions",
                "Appointments",
                "International agreements",
                "Constitutional Court decisions",
                "Court of Cassation decisions",
                "Council of State decisions",
                "Court of Jurisdictional Disputes decisions",
                "Parliament decisions",
                "Other decisions",
                "Whole section: Legislative",
                "Whole section: Executive & administrative",
                "Whole section: Judicial",
                "Whole section: Announcements",
                "Other"
              ]
            }
          },
          "keywords": {
            "title": "Title keywords (Turkish)",
            "type": "array",
            "description": "Only return entries whose title contains any of these words, e.g. 'vergi', 'gümrük', 'enerji'. Case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "includeAnnouncements": {
            "title": "Include announcements (İlan Bölümü)",
            "type": "boolean",
            "description": "Judicial, tender and miscellaneous notices. Off by default.",
            "default": false
          },
          "includeMukerrer": {
            "title": "Include supplementary issues (Mükerrer)",
            "type": "boolean",
            "description": "Extra same-day issues, often used for budget laws and urgent decrees.",
            "default": true
          },
          "maxItems": {
            "title": "Max documents",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many documents (0 = no limit). Useful to cap cost.",
            "default": 0
          },
          "includeFullText": {
            "title": "Include full text",
            "type": "boolean",
            "description": "Download each document (HTML or PDF) and return its full Turkish text.",
            "default": true
          },
          "ocrScannedPdfs": {
            "title": "OCR scanned PDFs (court decisions etc.)",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "ocrMaxPages": {
            "title": "OCR page limit per document",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum pages to OCR per PDF.",
            "default": 30
          },
          "openAiApiKey": {
            "title": "OpenAI API key (optional, for English translation)",
            "type": "string",
            "description": "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": {
            "title": "OpenAI model",
            "type": "string",
            "description": "Model used for translation when an API key is provided.",
            "default": "gpt-4o-mini"
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Politeness delay towards resmigazete.gov.tr, in milliseconds.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Max parallel downloads",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many documents to download at the same time. Keep low to be polite to the server.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Usually not needed. Enable if the site starts blocking requests.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}