Although we aren't quite sure where the data comes from, Turkey Tourism estimates that there are somewhere above 35,000 caves in the country. With numbers like these, we wouldn't blame you for treading carefully in fear of sinkholes as soon as you cross the border. And while there are apparently many out there, you won't happen upon any officially recognized caves within the Istanbul urban limits, meaning that if you are the spelunking type then you'll have to resign yourself to a three hour drive northwest to the only cave in the Eastern Thrace (European Turkey) open to the public, the Dupnisa Cave.
Don't let the distance deter you. This collection of three separate chambers is a fascinating experience, both for its geological features and its purported history. Once an alleged place of human sacrifice to the god of fertility and wine, Dionysus, Dupnisa is over 3,000 meters (nearly 10,000 feet) long in total and hosts an incredible collection of stalactites. Although one cave is closed off so as not to disturb an extensive bat populace, the wet cave (sulu) and the dry cave (kuru) are open to visitors; just be aware that the dry cave is closed during winter. As may be obvious from the names, the wet cave is known for its underground stream that feeds a local river, while the dry cave may be reached up a pretty strenuous set of stairs or by an outside entrance.
Getting to Dupnisa Cave from Istanbul may be best accomplished by rental car or any other autonomous mode of transportation (although there are daily bus services from Istanbul to Demirköy), as you'll be heading out into the rural Istranca Mountains and following a gravel road once you reach the village of Sarpdere. There are some decent hikes to be had in the low-lying mountains, including a day-long route that passes through their highest peak, Mahya Dağı. For more information, consult the included links.