try this oneYou can use field_info_instance(), as in the following snippet.
$info = field_info_instance('node','enter_your_field_name','enter_content_type_name');
foreach ($info as $ps2 => $key) {
echo "Info [ $ps2 ] : " . $key . "<br />";
}
ByIn this way, you get, Term id the term ID.