Get custom fields assigned to taxonomy
I done it like this: 

$contact_countries = \Drupal::service('entity_type.manager')-&gt;getStorage("taxonomy_term")-&gt;loadTree('contact_country');

$terms = array();

foreach($contact_countries as $contact_countrie) {
    $terms[] = array(
        'contact_country' =&gt; $contact_countrie-&gt;name,
        'contact_phone' =&gt; \Drupal::entityTypeManager()-&gt;getStorage('taxonomy_term')-&gt;load($contact_countrie-&gt;tid)-&gt;get('field_phone')-&gt;getValue()[0]['value'],
        'contact_flag' =&gt; \Drupal::entityTypeManager()-&gt;getStorage('taxonomy_term')-&gt;load($contact_countrie-&gt;tid)-&gt;get('field_category_flag')-&gt;entity-&gt;uri-&gt;value,
    );
}


Here I have fields field_phone (text field) and field_category_flag (file field).