Get all the fields of a certain field type

Last updated on 01/08/2016

 $entityreference_fields = field_read_fields(array('type' => 'entityreference'));

The result

Then we can get detailed data about all the instances

 $field_co_authors_instances = field_read_instances(array('field_name' => 'field_co_authors'));