Is there a way to retrieve ENSEMBL IDs from a search query?
I would download the complete geneset FASTA file from ensembl and then parse out the genes you want with a script.

Alternatively, you could do similarly with API. Get all the gene names, select the ones you want, and then pull down each sequence.