text: user252: I would like to be able to batch download FASTA files from ENSEMBL. I normally would use the API to download them from the ENSEMBL gene IDs. However, the IDs aren't ones I know, only ones I would get from searching on the ENSEMBL website and collecting the IDs manually.
  Is there a way I can use the API to query search terms and collect all results that are returned?
  So for example, if I use the ENSEMBL website to search "HLA" I could collect the list of IDs (ENSG00000204252 etc. etc.) manually. HLA works okay using the API to query gene IDs because there's only a few terms (A, B, C plus non-classical for class I) but I was wondering if there was a way to directly access the search query one the homepage programmatically, as I may need to do it for some messier examples.
  
  user1092: 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.
  
original_text: 252: <p>I would like to be able to batch download FASTA files from ENSEMBL. I normally would use the API to download them from the ENSEMBL gene IDs. However, the IDs aren't ones I know, only ones I would get from searching on the ENSEMBL website and collecting the IDs manually.</p>
  
  <p>Is there a way I can use the API to query search terms and collect all results that are returned?</p>
  
  <p>So for example, if I use the ENSEMBL website to search "HLA" I could collect the list of IDs (ENSG00000204252 etc. etc.) manually. HLA works okay using the API to query gene IDs because there's only a few terms (A, B, C plus non-classical for class I) but I was wondering if there was a way to directly access the search query one the homepage programmatically, as I may need to do it for some messier examples.</p>
   1092: <p>I would download the complete geneset FASTA file from <a href="http://www.ensembl.org/info/data/ftp/index.html" rel="nofollow noreferrer">ensembl</a> and then parse out the genes you want with a script.</p>
  
  <p>Alternatively, you could do similarly with API. Get all the gene names, select the ones you want, and then pull down each sequence.</p>
  