Programatically use search api I want to do something like this

    $index = search_api_index_load("node_index");
    $myQuery=new SearchApiQuery($index);
    $myQuery-&gt;condition('type', 'blog', '=');
    $data=$myQuery-&gt;execute();
    $results=$data['results'];
    print_r($results);


but for Drupal 8, using the search api. Is that possible?
$query = Index::load('my_index')-&gt;query();
$query-&gt;addCondition('search_api_language', $language);
$query-&gt;keys($search_string);
$query-&gt;range(0, 25);
$data = $query-&gt;execute();


Also I have a custom parsing function for the results:

function parse_results(array $results) {
$list = [];
  foreach ($results AS $item) {
    // The pattern is "entity:[entity_type]:[entity_id]:[language_code]".
    // For example "entity:node/1:en".
    $data = explode(':', $item-&gt;getId());
    $data = explode('/', $data[1]);
    $list[] = $data[1];
  }
  return $list;
}