Programatically use search api
$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;
}