Get all nodes of given type I would like to get all nodes that are of my_custom_type type in Drupal 8.

I know I can get all the nodes (of any type) with \Drupal\node\Entity\Node::loadMultiple() and the list of all types by \Drupal\node\Entity\NodeType::loadMultiple(). 

But how to get only the nodes of given node type?

I really don't want to use specialized module for it (if it's possible), just keep it as simple as possible. I will use the solution in my custom module.

And loading all the nodes with \Drupal\node\Entity\Node::loadMultiple() and then check their type in foreach would hit the performance too much.
You can use Drupal::entityQuery() &amp; Node::loadMultiple() to load all the nodes of your given type:

$nids = \Drupal::entityQuery('node')-&gt;condition('type','my_custom_type')-&gt;execute();
$nodes =  \Drupal\node\Entity\Node::loadMultiple($nids);