I was wondering which ways are available for getting metadata from accession numbers. I have seen other tools such as Nextstrain make use of a so called "metadata" file to describe used sequences. The file looks something like this:
![Metadata for sequences][1]


  [1]: https://imgur.com/a/uL3m7T5
https://imgur.com/a/uL3m7T5

It shows various data from NCBI for the accession numbers such as virus strain, country, date, URL, etc.
For me the most import ones are strain, country and date. Are there ways to download such data automatically when you have a list of accession numbers? 

Any help is appreciated. 
Using [EntrezDirect][1] :

    $ esearch -db nuccore -query "KY317939" | esummary | xtract -pattern DocumentSummary -element SubName
    ZIKV/Homo_sapiens/Colombia/2016/ZC204Se|Homo sapiens|Colombia|serum|06-Jan-2016|Antibody Systems Inc

Fields you are getting above are (separated by `|`)

    isolate|host|country|isolation_source|collection_date|collected_by


  [1]: http://bit.ly/entrez-direct