He worked as a finance official and used his assignments to different towns to transcribe Arabic and Turkish inscriptions that he found. He sought out local histories and old documents, both historical and poetic. Through his endeavours he built a library of rare and unpublished manuscripts.