How to get all node ids from same content type
This is a basic query that returns last 10 changed nodes (published) of type 'article'. Modify for your needs.


$query = \Drupal::entityQuery('node')
  -&gt;condition('status', NODE_PUBLISHED)
  -&gt;condition('type', 'article')
  -&gt;range(0, 10)
  -&gt;sort('changed', 'DESC');
$nids = $query-&gt;execute();