Strictly speaking those are not Ensembl ID's. You can download the CDS sequences file from Ensembl plant web site for the grape genome. That file should contain those sequences.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have many files with gene IDs. How to use perl API? Is there any command? Can you please elaborate. Thanks
Link @Jean-Karim included shows how to use API.