I want to download the annotation file in gff3 format for the corresponding genome. As this fairly easy on the ncbi-webpage I don't find a possibility to do the same with efetch or the kind.

I hoped I could use something like this:

    esearch -db nuccore -query "$genome_id" | efetch -format gff3  > "$path_data/$genome_id.gff"
There are a couple of strategies you can try, depending on what you mean by $genome_id. In each case, it's a matter of finding the right FTP path, and then using wget to get the *genomic.gff.gz file in that path:

 1. If you have assembly accessions, you can get FTP paths for each from
    the assembly_summary.txt file, and loop through them with wget. See
    https://www.biostars.org/p/61081/ for a good post on the approach
 2. If you have nucleotide sequence accessions for chromosomes, you can
    use esearch to directly query the Assembly database, and get the FTP
    path from the document summary:

    esearch -db assembly -query NC_000913.3 | esummary | xtract -pattern DocumentSummary -element Taxid,Organism,AssemblyAccession,FtpPath_RefSeq 

 3. If you have nucleotide sequence accessions that don't directly work for queries in the Assembly database (e.g. contigs or scaffolds), you can query in nucleotide first and link to assembly:

    esearch -db nuccore -query NZ_GL379776.1 | elink -target assembly | esummary | xtract -pattern DocumentSummary -element Taxid,Organism,AssemblyAccession,FtpPath_RefSeq