How to download different kinds of data from NCBI eutils?
Downloading all this using an E-utils search would be cumbersome as you would have to search against multiple databases. For your specific needs, a GTF/GFF3 file would be good. Basically, a GTF/GFF file has genome annotations (positions of features) and includes features like exons, CDS and in some cases even special codons (such as that for selenocysteine). This file would not have the sequences but you can retrieve the sequences from the corresponding genome sequence fasta file using the co-ordinates described in the GTF file. There are several software tools that can do this; for example gffread and bedtools-getfasta (you can even write your own script which would not be very difficult).

You can download the GTF and the corresponding genome fasta files from these sources:


ENSEMBL (many organisms)
NCBI-RefSeq (many organisms)
UCSC genome browser (many organisms)
GENCODE (for human and mouse) and modENCODE (for Caenorhabditis worms and Drosophila)


You should look at the details of the genome assembly. Different releases/sources may have different extents of curation.