{
  "openapi": "3.1.0",
  "info": {
    "title": "Su Haritası — Türkiye Su Verisi ve Su Hukuku Açık Veri Tabanı — Açık Veri API",
    "version": "2.2.0",
    "summary": "Türkiye su verisi, havzaları ve su mevzuatı: makine-okunur JSON uçları",
    "description": "Kimlik doğrulama gerekmez. v2 uçları her yanıtta { meta, veri } döner; meta: kaynak, kaynaklar, lisans, veri_tarihi, uretim_zamani, surum (v2), belge. v1 uçları geriye uyumluluk için aynen korunur. Değişiklik günlüğü ve durum: https://suharitasi.com/api-dokumantasyonu/. Ajan erişimi: https://suharitasi.com/mcp. Kalıcı arşiv (Zenodo, kavram DOI, bütün sürümler): https://doi.org/10.5281/zenodo.23002677.",
    "license": {
      "name": "CC BY 4.0 yalnız Su Haritası derlemesi; kaynak verisi kendi koşuluna tabidir",
      "url": "https://suharitasi.com/acik-veri/#lisans"
    },
    "contact": {
      "name": "Su Haritası",
      "url": "https://suharitasi.com/api-dokumantasyonu/",
      "email": "hukuk@arslanhukuk.tr"
    }
  },
  "servers": [
    {
      "url": "https://suharitasi.com"
    }
  ],
  "tags": [
    {
      "name": "v2",
      "description": "Önerilen sürüm: tek yazım düzeni, ortak meta"
    },
    {
      "name": "v1",
      "description": "Korunan eski sürüm"
    },
    {
      "name": "veri",
      "description": "Statik veri dosyaları (v1 düzeni)"
    },
    {
      "name": "koy",
      "description": "Köy düzeyi statik dosyalar: suyu bulmak, kuraklığa hazırlanmak"
    },
    {
      "name": "mcp",
      "description": "Model Context Protocol"
    }
  ],
  "paths": {
    "/api/v1/havzalar": {
      "get": {
        "tags": [
          "v1"
        ],
        "operationId": "api_v1_havzalar",
        "summary": "v1 — 25 havza künyesi (Function, hız sınırlı; isteğe bağlı anahtar)",
        "responses": {
          "200": {
            "description": "Havza künyesi",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "405": {
            "description": "Yalnız GET/HEAD/OPTIONS",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Hata"
                }
              }
            }
          },
          "429": {
            "description": "Hız sınırı aşıldı (uç başına, IP+tarayıcı başına 60 istek/dk). Retry-After: 60 başlığı döner.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Hata"
                }
              }
            }
          },
          "503": {
            "description": "Kaynak veri geçici olarak okunamadı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Hata"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/kuraklik": {
      "get": {
        "tags": [
          "v1"
        ],
        "operationId": "api_v1_kuraklik",
        "summary": "v1 — istatistiksel projeksiyon (Function, hız sınırlı; ölçüm değildir)",
        "responses": {
          "200": {
            "description": "Projeksiyon",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "405": {
            "description": "Yalnız GET/HEAD/OPTIONS",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Hata"
                }
              }
            }
          },
          "429": {
            "description": "Hız sınırı aşıldı (uç başına, IP+tarayıcı başına 60 istek/dk). Retry-After: 60 başlığı döner.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Hata"
                }
              }
            }
          },
          "503": {
            "description": "Kaynak veri geçici olarak okunamadı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Hata"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/il/{il}.json": {
      "get": {
        "tags": [
          "v1"
        ],
        "operationId": "api_v1_il_il_json",
        "summary": "v1 — il künyesi (statik)",
        "parameters": [
          {
            "name": "il",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "konya"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "İl künyesi",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v1/havza/{havza}.json": {
      "get": {
        "tags": [
          "v1"
        ],
        "operationId": "api_v1_havza_havza_json",
        "summary": "v1 — havza künyesi (statik)",
        "parameters": [
          {
            "name": "havza",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "gediz"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Havza künyesi",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/veri/havzalar.json": {
      "get": {
        "tags": [
          "veri"
        ],
        "operationId": "veri_havzalar_json",
        "summary": "v1 — 25 havza künyesi (dizi)",
        "responses": {
          "200": {
            "description": "v1 — 25 havza künyesi (dizi)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/veri/iller.json": {
      "get": {
        "tags": [
          "veri"
        ],
        "operationId": "veri_iller_json",
        "summary": "v1 — 81 il → DSİ bölgesi, havza, su idaresi (dizi)",
        "responses": {
          "200": {
            "description": "v1 — 81 il → DSİ bölgesi, havza, su idaresi (dizi)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/veri/islemler.json": {
      "get": {
        "tags": [
          "veri"
        ],
        "operationId": "veri_islemler_json",
        "summary": "v1 — su işlemleri → yetkili kurum, dayanak, başvuru kanalı (dizi)",
        "responses": {
          "200": {
            "description": "v1 — su işlemleri → yetkili kurum, dayanak, başvuru kanalı (dizi)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/veri/mevzuat.json": {
      "get": {
        "tags": [
          "veri"
        ],
        "operationId": "veri_mevzuat_json",
        "summary": "v1 — mevzuat maddeleri: resmî metin, resmî başlık, metinde geçen kurum ve süreler, madde özeti (dizi)",
        "responses": {
          "200": {
            "description": "v1 — mevzuat maddeleri: resmî metin, resmî başlık, metinde geçen kurum ve süreler, madde özeti (dizi)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/veri/emsal.json": {
      "get": {
        "tags": [
          "veri"
        ],
        "operationId": "veri_emsal_json",
        "summary": "v1 — resmî sunucuda doğrulanan emsal kararlar (dizi)",
        "responses": {
          "200": {
            "description": "v1 — resmî sunucuda doğrulanan emsal kararlar (dizi)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/veri/sozluk.json": {
      "get": {
        "tags": [
          "veri"
        ],
        "operationId": "veri_sozluk_json",
        "summary": "v1 — sözlük terimleri; resmî tanımı olanlarda tanım alanı (dizi)",
        "responses": {
          "200": {
            "description": "v1 — sözlük terimleri; resmî tanımı olanlarda tanım alanı (dizi)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/veri/su-riski.json": {
      "get": {
        "tags": [
          "veri"
        ],
        "operationId": "veri_su_riski_json",
        "summary": "v1 — il/havza su riski endeksi (nesne)",
        "responses": {
          "200": {
            "description": "v1 — il/havza su riski endeksi (nesne)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/veri/kuraklik.json": {
      "get": {
        "tags": [
          "veri"
        ],
        "operationId": "veri_kuraklik_json",
        "summary": "v1 — istatistiksel projeksiyon (nesne; ölçüm değildir)",
        "responses": {
          "200": {
            "description": "v1 — istatistiksel projeksiyon (nesne; ölçüm değildir)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/veri/tek-kaynak.json": {
      "get": {
        "tags": [
          "veri"
        ],
        "operationId": "veri_tek_kaynak_json",
        "summary": "Sitede birden çok yerde geçen büyüklüklerin tek değeri ve tanımları (nesne)",
        "responses": {
          "200": {
            "description": "Sitede birden çok yerde geçen büyüklüklerin tek değeri ve tanımları (nesne)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/veri/veri-tazelik.json": {
      "get": {
        "tags": [
          "veri"
        ],
        "operationId": "veri_veri_tazelik_json",
        "summary": "Veri kümelerinin tazelik durumu (nesne) — API durum tablosunun kaynağı",
        "responses": {
          "200": {
            "description": "Veri kümelerinin tazelik durumu (nesne) — API durum tablosunun kaynağı",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/veri/mevzuat-surum.json": {
      "get": {
        "tags": [
          "veri"
        ],
        "operationId": "veri_mevzuat_surum_json",
        "summary": "İzlenen mevzuatın madde bazlı özet anlık görüntüsü (nesne)",
        "responses": {
          "200": {
            "description": "İzlenen mevzuatın madde bazlı özet anlık görüntüsü (nesne)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/kisit.json": {
      "get": {
        "tags": [
          "veri"
        ],
        "operationId": "kisit_json",
        "summary": "Resmî Gazete işletme sahası ve kapatma kayıtları (dizi)",
        "responses": {
          "200": {
            "description": "Resmî Gazete işletme sahası ve kapatma kayıtları (dizi)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/s/su-cikar/iller.json": {
      "get": {
        "tags": [
          "koy"
        ],
        "operationId": "s_su_cikar_iller_json",
        "summary": "Köy dosyalarının dizini: 81 il; her ilçenin adı, kodu ve yerleşim sayısı (dizi)",
        "description": "İlçe kodu, ilçe dosyalarının adresinde kullanılır. Lisans: Adlar ve sayılar OpenStreetMap yerleşim kayıtlarından türer: © OpenStreetMap katkıcıları, ODbL 1.0. Koşullar: https://suharitasi.com/acik-veri/#kaynak-lisans",
        "responses": {
          "200": {
            "description": "Köy dosyalarının dizini: 81 il; her ilçenin adı, kodu ve yerleşim sayısı (dizi)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KoyDizini"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/s/su-cikar/i/{ilce}.json": {
      "get": {
        "tags": [
          "koy"
        ],
        "operationId": "s_su_cikar_i_ilce_json",
        "summary": "\"Arazimde su çıkar mı?\" köy cevabı verisi: ilçe başına; her köy, mahalle ve mezra için ihtimal düzeyi ve işaretleri",
        "description": "Köy satırları (yerler) dizidir; alan sırası alanlar dizisindedir. Düzey kodu: y yüksek, o orta, d düşük, b bilinmiyor. Düzey bir ihtimaldir, kesin hüküm değildir: Kesin cevabı yalnız yerinde yapılacak ölçüm (jeofizik etüt) verir. Lisans: OpenStreetMap'ten türeyen kısım ODbL 1.0 (© OpenStreetMap katkıcıları), GeoNames CC BY 4.0, Wikidata CC0 1.0, arazi Copernicus DEM GLO-90 (kaynak bildirimi ve sorumluluk reddi cümlesi zorunlu); dosyanın lisans alanında da yazılı. Koşullar: https://suharitasi.com/acik-veri/#kaynak-lisans",
        "parameters": [
          {
            "name": "ilce",
            "in": "path",
            "required": true,
            "description": "İlçe kodu: il ve ilçe adının ASCII biçimi, arada iki tire. Bütün kodlar /s/su-cikar/iller.json dizinindedir.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+--[a-z0-9-]+$",
              "example": "konya--karapinar"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "\"Arazimde su çıkar mı?\" köy cevabı verisi: ilçe başına; her köy, mahalle ve mezra için ihtimal düzeyi ve işaretleri",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuCikarIlce"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/s/koy-ek/i/{ilce}.json": {
      "get": {
        "tags": [
          "koy"
        ],
        "operationId": "s_koy_ek_i_ilce_json",
        "summary": "Köy ek verisi: ilçe başına; yakındaki su kaynakları, suyun toplandığı yerler, kuraklık, yağış, buharlaşma, kurakta yeşil kalan yerler",
        "description": "Her bölümün kaynağı, yöntemi, tarihi ve atıf ya da lisans koşulu kunye.<bölüm> içindedir. Kuraklık ve yeşillik değerleri tahmindir; resmî kuraklık ilanı değildir. Lisans: Su kaynakları OpenStreetMap ODbL 1.0; kuraklık ve yağış CHIRPS v3.0 CC BY 4.0; suyun toplandığı yerler Copernicus DEM GLO-90 (kaynak bildirimi ve sorumluluk reddi cümlesi zorunlu); buharlaşma NASA POWER (atıf koşulu); kurakta yeşil kalan yerler Copernicus Sentinel verisi (serbest, tam ve açık erişim; atıf zorunlu), ESA WorldCover CC BY 4.0, GMIE-100 CC0 1.0. Koşullar: https://suharitasi.com/acik-veri/#kaynak-lisans",
        "parameters": [
          {
            "name": "ilce",
            "in": "path",
            "required": true,
            "description": "İlçe kodu: il ve ilçe adının ASCII biçimi, arada iki tire. Bütün kodlar /s/su-cikar/iller.json dizinindedir.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+--[a-z0-9-]+$",
              "example": "konya--karapinar"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Köy ek verisi: ilçe başına; yakındaki su kaynakları, suyun toplandığı yerler, kuraklık, yağış, buharlaşma, kurakta yeşil kalan yerler",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KoyEkIlce"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/veri/kuraklik-durumu-iller.json": {
      "get": {
        "tags": [
          "koy"
        ],
        "operationId": "veri_kuraklik_durumu_iller_json",
        "summary": "Kuraklık durumu il özeti: 81 ilde yerleşimlerin 3 ve 12 aylık standart yağış indeksi kademelerine dağılımı (nesne)",
        "description": "Son nihai ay için her ilde kaç yerleşimin hangi kademede olduğu; ön veri ayı onVeri alanlarında ayrı. İl için tek kademe seçilmez; enGenisPay yalnız en çok yerleşimin düştüğü kademeyi ve payını verir (yerleşim sayısıyla). Uydu ve istasyon verisinden hesaplanmış tahmindir; resmî kuraklık ilanı değildir. Lisans: Yağış CHIRPS v3.0 CC BY 4.0; yerleşim listesi OpenStreetMap ODbL 1.0; sayım Su Haritası derlemesi CC BY 4.0; dosyanın lisans alanında da yazılı. Koşullar: https://suharitasi.com/acik-veri/#kaynak-lisans",
        "responses": {
          "200": {
            "description": "Kuraklık durumu il özeti: 81 ilde yerleşimlerin 3 ve 12 aylık standart yağış indeksi kademelerine dağılımı (nesne)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KuraklikIlOzeti"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v2/havzalar.json": {
      "get": {
        "tags": [
          "v2"
        ],
        "operationId": "api_v2_havzalar_json",
        "summary": "v2 — 25 havza özeti (DSİ, baraj, uydu, planlar)",
        "responses": {
          "200": {
            "description": "25 havza özeti (DSİ, baraj, uydu, planlar)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Yanit"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v2/havza/{slug}.json": {
      "get": {
        "tags": [
          "v2"
        ],
        "operationId": "api_v2_havza_slug_json",
        "summary": "v2 — Tek havza: özet + günlük baraj ortalaması + aylık uydu serisi",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "gediz"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tek havza: özet + günlük baraj ortalaması + aylık uydu serisi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Yanit"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v2/iller.json": {
      "get": {
        "tags": [
          "v2"
        ],
        "operationId": "api_v2_iller_json",
        "summary": "v2 — 81 il: DSİ bölgesi, su idaresi, havzalar, Resmî Gazete kayıt sayısı",
        "responses": {
          "200": {
            "description": "81 il: DSİ bölgesi, su idaresi, havzalar, Resmî Gazete kayıt sayısı",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Yanit"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v2/baraj.json": {
      "get": {
        "tags": [
          "v2"
        ],
        "operationId": "api_v2_baraj_json",
        "summary": "v2 — Baraj doluluğu: ülke ve havza ortalamaları (tek tanım)",
        "responses": {
          "200": {
            "description": "Baraj doluluğu: ülke ve havza ortalamaları (tek tanım)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Yanit"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v2/uydu.json": {
      "get": {
        "tags": [
          "v2"
        ],
        "operationId": "api_v2_uydu_json",
        "summary": "v2 — Uydu su depolama: Türkiye aylık seri + havza eğilimleri",
        "responses": {
          "200": {
            "description": "Uydu su depolama: Türkiye aylık seri + havza eğilimleri",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Yanit"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v2/tahmin.json": {
      "get": {
        "tags": [
          "v2"
        ],
        "operationId": "api_v2_tahmin_json",
        "summary": "v2 — İstatistiksel projeksiyon (ölçüm değildir)",
        "responses": {
          "200": {
            "description": "İstatistiksel projeksiyon (ölçüm değildir)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Yanit"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v2/resmi-gazete.json": {
      "get": {
        "tags": [
          "v2"
        ],
        "operationId": "api_v2_resmi_gazete_json",
        "summary": "v2 — Resmî Gazete işletme sahası ve kapatma kayıtları",
        "responses": {
          "200": {
            "description": "Resmî Gazete işletme sahası ve kapatma kayıtları",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Yanit"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v2/emsal.json": {
      "get": {
        "tags": [
          "v2"
        ],
        "operationId": "api_v2_emsal_json",
        "summary": "v2 — Resmî sunucuda doğrulanan emsal kararlar",
        "responses": {
          "200": {
            "description": "Resmî sunucuda doğrulanan emsal kararlar",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Yanit"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/api/v2/sozluk.json": {
      "get": {
        "tags": [
          "v2"
        ],
        "operationId": "api_v2_sozluk_json",
        "summary": "v2 — Sözlük: resmî tanımlar (birebir alıntı)",
        "responses": {
          "200": {
            "description": "Sözlük: resmî tanımlar (birebir alıntı)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Yanit"
                }
              }
            }
          },
          "404": {
            "description": "Statik dosya yok: Cloudflare Pages HTML 404 sayfası döner (JSON değildir).",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },
    "/mcp": {
      "get": {
        "tags": [
          "mcp"
        ],
        "operationId": "mcp_kart",
        "summary": "MCP sunucu kartı: araç listesi ve parametre şemaları",
        "responses": {
          "200": {
            "description": "Sunucu kartı",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "mcp"
        ],
        "operationId": "mcp_jsonrpc",
        "summary": "MCP (JSON-RPC 2.0, oturumsuz Streamable HTTP): initialize, tools/list, tools/call",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "const": "2.0"
                  },
                  "id": {},
                  "method": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC yanıtı",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Hız sınırı aşıldı (IP+tarayıcı başına 60 istek/dk). Gövde JSON-RPC 2.0 hatasıdır (code -32000); Retry-After başlığı dönmez.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "jsonrpc",
                    "error"
                  ],
                  "properties": {
                    "jsonrpc": {
                      "const": "2.0"
                    },
                    "id": {},
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "const": -32000
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {},
    {
      "apiAnahtar": []
    }
  ],
  "components": {
    "securitySchemes": {
      "apiAnahtar": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "sh_…",
        "description": "İsteğe bağlı. Anahtarlı istek 600/dk + günlük kota; anonim 60/dk. Başvuru ve koşullar: /api/kosullar/"
      }
    },
    "schemas": {
      "Hata": {
        "type": "object",
        "required": [
          "hata"
        ],
        "properties": {
          "hata": {
            "type": "string",
            "description": "Türkçe hata açıklaması"
          }
        }
      },
      "Meta": {
        "type": "object",
        "required": [
          "kaynak",
          "lisans",
          "uretim_zamani",
          "surum"
        ],
        "properties": {
          "kaynak": {
            "type": "string"
          },
          "kaynaklar": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lisans": {
            "type": "object",
            "properties": {
              "kendi": {
                "type": "string"
              },
              "kapsam": {
                "type": "string"
              },
              "kosullar": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "veri_tarihi": {
            "type": [
              "string",
              "null"
            ],
            "description": "Verinin kendi tarihi (YYYY-MM-DD ya da YYYY-MM)"
          },
          "uretim_zamani": {
            "type": "string",
            "format": "date-time",
            "description": "Dosyanın üretildiği an (site derlemesiyle aynı)"
          },
          "surum": {
            "type": "string"
          },
          "belge": {
            "type": "string",
            "format": "uri"
          },
          "not": {
            "type": "string"
          }
        }
      },
      "V2Yanit": {
        "type": "object",
        "required": [
          "meta",
          "veri"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/Meta"
          },
          "veri": {}
        }
      },
      "KoyDizini": {
        "type": "array",
        "items": {
          "type": "array",
          "prefixItems": [
            {
              "type": "string"
            },
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "type": "integer"
                  }
                ]
              }
            }
          ]
        }
      },
      "SuCikarIlce": {
        "type": "object",
        "required": [
          "surum",
          "lisans",
          "il",
          "ilce",
          "kod",
          "alanlar",
          "yerler"
        ],
        "properties": {
          "surum": {
            "type": "string",
            "description": "Veri üretim zamanı"
          },
          "lisans": {
            "type": "string"
          },
          "il": {
            "type": "string"
          },
          "ilSlug": {
            "type": "string"
          },
          "ilSayfasi": {
            "type": "boolean"
          },
          "ilce": {
            "type": "string"
          },
          "kod": {
            "type": "string"
          },
          "dsi": {
            "type": [
              "object",
              "null"
            ]
          },
          "kutle": {
            "type": "object"
          },
          "kisit": {
            "type": "object"
          },
          "kisitIlcesiz": {
            "type": "integer"
          },
          "havzalar": {
            "type": "array"
          },
          "celiski": {
            "type": "object"
          },
          "alanlar": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "yerler": {
            "type": "array",
            "items": {
              "type": "array"
            }
          }
        }
      },
      "KoyEkIlce": {
        "type": "object",
        "required": [
          "kod",
          "kunye"
        ],
        "properties": {
          "kod": {
            "type": "string"
          },
          "kunye": {
            "type": "object",
            "description": "Bölüm başına kaynak, yöntem, tarih ve atıf ya da lisans"
          },
          "su-kaynaklari": {
            "type": "object"
          },
          "toplanma": {
            "type": "object"
          },
          "kuraklik": {
            "type": "object",
            "description": "hucreler: { m: [1, 3, 6, 12 aylık indeks × 24 ay], mm: aylık yağış }, koyler: köy kimliği → hücre"
          },
          "yagis": {
            "type": "object"
          },
          "et0": {
            "type": "object"
          },
          "yesil": {
            "type": "object"
          }
        }
      },
      "KuraklikIlOzeti": {
        "type": "object",
        "required": [
          "surum",
          "not",
          "lisans",
          "ay",
          "olcekler",
          "kademeler",
          "turkiye",
          "iller"
        ],
        "properties": {
          "surum": {
            "type": "integer"
          },
          "ad": {
            "type": "string"
          },
          "belge": {
            "type": "string",
            "format": "uri"
          },
          "not": {
            "type": "string"
          },
          "yontem": {
            "type": "string"
          },
          "spiYontemi": {
            "type": "string"
          },
          "kaynak": {
            "type": "string"
          },
          "atif": {
            "type": "string"
          },
          "lisans": {
            "type": "string"
          },
          "dayanak": {
            "type": "string"
          },
          "uretim": {
            "type": "string"
          },
          "ay": {
            "type": [
              "string",
              "null"
            ],
            "description": "Son nihai ay (YYYY-MM)"
          },
          "onVeriAy": {
            "type": [
              "string",
              "null"
            ]
          },
          "onVeriNotu": {
            "type": [
              "string",
              "null"
            ]
          },
          "olcekler": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "payYontemi": {
            "type": "string",
            "description": "enGenisPay alanının hesap kuralı (sade dille)"
          },
          "kademeler": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "ad",
                "aralik"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "ad": {
                  "type": "string"
                },
                "aralik": {
                  "type": "string"
                }
              }
            }
          },
          "turkiye": {
            "type": "object",
            "required": [
              "yerlesim",
              "nihai"
            ],
            "properties": {
              "yerlesim": {
                "type": "integer"
              },
              "nihai": {
                "type": "object",
                "required": [
                  "spi3",
                  "spi12"
                ],
                "properties": {
                  "spi3": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "spi12": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              },
              "onVeri": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "spi3",
                      "spi12"
                    ],
                    "properties": {
                      "spi3": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "spi12": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "enGenisPay": {
                "type": "object",
                "description": "Son nihai ayda en geniş pay (yerleşim sayısıyla; alanla değil)",
                "properties": {
                  "spi3": {
                    "type": "object",
                    "required": [
                      "kademeler",
                      "yerlesim",
                      "yuzde",
                      "cogunluk",
                      "metin",
                      "kisa"
                    ],
                    "properties": {
                      "kademeler": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "En çok yerleşimin düştüğü kademe (eşitlikte birden çok)"
                      },
                      "yerlesim": {
                        "type": "integer"
                      },
                      "yuzde": {
                        "type": "integer",
                        "description": "Yerleşim sayısı payı, en yakın tam sayı"
                      },
                      "cogunluk": {
                        "type": "boolean",
                        "description": "Pay yarıdan fazla mı"
                      },
                      "metin": {
                        "type": "string"
                      },
                      "kisa": {
                        "type": "string",
                        "description": "metin, \"yerleşimlerin\" sözcüğü olmadan (sayfadaki tablo hücresi)"
                      }
                    }
                  },
                  "spi12": {
                    "type": "object",
                    "required": [
                      "kademeler",
                      "yerlesim",
                      "yuzde",
                      "cogunluk",
                      "metin",
                      "kisa"
                    ],
                    "properties": {
                      "kademeler": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "En çok yerleşimin düştüğü kademe (eşitlikte birden çok)"
                      },
                      "yerlesim": {
                        "type": "integer"
                      },
                      "yuzde": {
                        "type": "integer",
                        "description": "Yerleşim sayısı payı, en yakın tam sayı"
                      },
                      "cogunluk": {
                        "type": "boolean",
                        "description": "Pay yarıdan fazla mı"
                      },
                      "metin": {
                        "type": "string"
                      },
                      "kisa": {
                        "type": "string",
                        "description": "metin, \"yerleşimlerin\" sözcüğü olmadan (sayfadaki tablo hücresi)"
                      }
                    }
                  }
                }
              }
            }
          },
          "iller": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "il",
                "slug",
                "yerlesim",
                "nihai"
              ],
              "properties": {
                "il": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "yerlesim": {
                  "type": "integer"
                },
                "nihai": {
                  "type": "object",
                  "required": [
                    "spi3",
                    "spi12"
                  ],
                  "properties": {
                    "spi3": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "spi12": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  }
                },
                "onVeri": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "spi3",
                        "spi12"
                      ],
                      "properties": {
                        "spi3": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "spi12": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "enGenisPay": {
                  "type": "object",
                  "description": "Son nihai ayda en geniş pay (yerleşim sayısıyla; alanla değil)",
                  "properties": {
                    "spi3": {
                      "type": "object",
                      "required": [
                        "kademeler",
                        "yerlesim",
                        "yuzde",
                        "cogunluk",
                        "metin",
                        "kisa"
                      ],
                      "properties": {
                        "kademeler": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "En çok yerleşimin düştüğü kademe (eşitlikte birden çok)"
                        },
                        "yerlesim": {
                          "type": "integer"
                        },
                        "yuzde": {
                          "type": "integer",
                          "description": "Yerleşim sayısı payı, en yakın tam sayı"
                        },
                        "cogunluk": {
                          "type": "boolean",
                          "description": "Pay yarıdan fazla mı"
                        },
                        "metin": {
                          "type": "string"
                        },
                        "kisa": {
                          "type": "string",
                          "description": "metin, \"yerleşimlerin\" sözcüğü olmadan (sayfadaki tablo hücresi)"
                        }
                      }
                    },
                    "spi12": {
                      "type": "object",
                      "required": [
                        "kademeler",
                        "yerlesim",
                        "yuzde",
                        "cogunluk",
                        "metin",
                        "kisa"
                      ],
                      "properties": {
                        "kademeler": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "En çok yerleşimin düştüğü kademe (eşitlikte birden çok)"
                        },
                        "yerlesim": {
                          "type": "integer"
                        },
                        "yuzde": {
                          "type": "integer",
                          "description": "Yerleşim sayısı payı, en yakın tam sayı"
                        },
                        "cogunluk": {
                          "type": "boolean",
                          "description": "Pay yarıdan fazla mı"
                        },
                        "metin": {
                          "type": "string"
                        },
                        "kisa": {
                          "type": "string",
                          "description": "metin, \"yerleşimlerin\" sözcüğü olmadan (sayfadaki tablo hücresi)"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}