Query - Content type
The following should suffice:

$query = \Drupal::entityQuery('node')
  -&gt;condition('type', 'beacons');
$entity_ids = $query-&gt;execute();


Here is a drush one-liner to test this on my D8 instance, where I have one article node:

 drush ev "var_dump(\\Drupal::entityQuery('node')-&gt;condition('type','article')-&gt;execute());"


Gives me:

array(1) {
  [101]=&gt;
  string(3) "101"
}


where 101 is the nid of the article node.

Good luck!