{"openapi":"3.1.0","info":{"title":"HalDeFiyat API","version":"1","description":"Türkiye toptancı hal fiyatları. Ücretsizdir ve anahtar gerektirmez.\n\nHer yanıt bir `attribution` alanı taşır ve her satır kendi kaynağını ve\nveri gününü taşır. Bu bir süs değil, yukarı akış açık veri lisanslarının\nyeniden yayım koşuludur.\n\nDakikalık istek sınırı: 60."},"servers":[{"url":"https://haldefiyat.botanikdemo.com"}],"paths":{"/api/v1/products":{"get":{"summary":"Yayımdaki her ürün ve en son göstergesi","parameters":[],"responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsResponse"}}}},"409":{"description":"Kaynak var ama yayımlanabilir durumda değil","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Dakikalık istek sınırı aşıldı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Kurulum uydurma veri sunuyor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/prices/latest":{"get":{"summary":"Ürün başına en güncel gösterge; her satır kendi gününü taşır","parameters":[],"responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestResponse"}}}},"409":{"description":"Kaynak var ama yayımlanabilir durumda değil","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Dakikalık istek sınırı aşıldı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Kurulum uydurma veri sunuyor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/search":{"get":{"summary":"Ürün ve hal araması, Türkçe katlamayla","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2},"description":"Aranan metin"}],"responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"409":{"description":"Kaynak var ama yayımlanabilir durumda değil","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Dakikalık istek sınırı aşıldı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Kurulum uydurma veri sunuyor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/index/{slug}":{"get":{"summary":"Yayımlanmış bir endeks serisi; yayımlanmamışsa 409","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"Endeks kısa adı"}],"responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexResponse"}}}},"409":{"description":"Kaynak var ama yayımlanabilir durumda değil","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Dakikalık istek sınırı aşıldı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Kurulum uydurma veri sunuyor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/health":{"get":{"summary":"Kurulum durumu; uydurma veri modunda 503","parameters":[],"responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"409":{"description":"Kaynak var ama yayımlanabilir durumda değil","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Dakikalık istek sınırı aşıldı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Kurulum uydurma veri sunuyor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ErrorResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Hata gövdesi"},"ProductsResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"product":{"type":"string"},"category":{"type":"string"},"unit":{"type":["string","null"]},"observed_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, Europe/Istanbul takvim günü"},{"type":"null"}],"description":"Bu satırın verisinin ait olduğu gün"},"median":{"type":["number","null"]},"market_count":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["slug","name","category","unit","observed_date"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["count"],"additionalProperties":false},"attribution":{"type":"string","minLength":1,"description":"Kaynak bildirimi. İBB ve İzmir açık veri lisansları yeniden yayımı buna bağlar."}},"required":["items","meta","attribution"],"additionalProperties":false},"LatestResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"unit":{"type":"string"},"observed_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, Europe/Istanbul takvim günü"},"min":{"type":["number","null"]},"max":{"type":["number","null"]},"median":{"type":["number","null"]},"market_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["slug","name","category","unit","observed_date","min","max","median","market_count"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"distinct_dates":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kaç ayrı veri günü temsil ediliyor"},"newest":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, Europe/Istanbul takvim günü"},{"type":"null"}]},"oldest":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, Europe/Istanbul takvim günü"},{"type":"null"}]},"note":{"type":"string"}},"required":["count","distinct_dates","newest","oldest","note"],"additionalProperties":false},"attribution":{"type":"string","minLength":1,"description":"Kaynak bildirimi. İBB ve İzmir açık veri lisansları yeniden yayımı buna bağlar."}},"required":["items","meta","attribution"],"additionalProperties":false},"SearchResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string"},"normalised":{"type":"string","description":"Türkçe katlanmış arama anahtarı; ingest ile aynı fonksiyon"},"products":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"unit":{"type":["string","null"]},"observed_date":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, Europe/Istanbul takvim günü"},{"type":"null"}]},"url":{"type":"string"}},"required":["slug","name","category","unit","observed_date","url"],"additionalProperties":false}},"markets":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"province":{"type":"string"},"url":{"type":"string"}},"required":["slug","name","province","url"],"additionalProperties":false}},"meta":{"type":"object","properties":{"products":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"markets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["products","markets","limit"],"additionalProperties":false},"attribution":{"type":"string","minLength":1,"description":"Kaynak bildirimi. İBB ve İzmir açık veri lisansları yeniden yayımı buna bağlar."}},"required":["query","normalised","products","markets","meta","attribution"],"additionalProperties":false},"IndexResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"},"method":{"type":"string","description":"Hesap yöntemi, sayfada yazdığı hâliyle"},"base_week_start":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, Europe/Istanbul takvim günü"},{"type":"null"}]},"base_value":{"type":"number"},"methodology_note":{"type":["string","null"]},"values":{"type":"array","items":{"type":"object","properties":{"week_start":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"YYYY-MM-DD, Europe/Istanbul takvim günü"},"value":{"type":"number"},"member_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["week_start","value","member_count"],"additionalProperties":false}},"meta":{"type":"object","properties":{"weeks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["weeks"],"additionalProperties":false},"attribution":{"type":"string","minLength":1,"description":"Kaynak bildirimi. İBB ve İzmir açık veri lisansları yeniden yayımı buna bağlar."}},"required":["slug","name","version","method","base_week_start","base_value","methodology_note","values","meta","attribution"],"additionalProperties":false},"HealthResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string"},"mode":{"type":"string","enum":["real","synthetic"]},"checks":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["status","mode"],"additionalProperties":false,"description":"ETL_MODE synthetic iken 503 döner: uydurma veri sunan bir kurulum sağlıklı değildir"}}}}