A kadı was an official in the Ottoman empire. Based on the Islamic concept of a judge (Arabic: قاضي qāḍī), the Ottoman official also had extra duties; they performed local administrative tasks, and they were involved in taxation and conscription. They might even appeal matters of taxation to central authority; around 1718 the kadı of Janjevo complained to Istanbul that the local lord had set the ispence (a tax) at 80 akçes, rather than official rate of 32.
A kadı's territory was called a kadiluk; there could be several kadiluks in a sanjak. Each kaza, governed by a Kaymakam, had a kadı (though not every kadı was assigned to one kaza, and the boundaries would shift over time).