The problem here is that the first result is 'La Villa y Corte':
<geonames style="FULL">
<totalResultsCount>341</totalResultsCount>
<geoname>
<name>La Villa y Corte</name>
....
That's one of the alternate names of Madrid, but sure is not the most used nor the most common name. There were also some other alternate such us 'Los Madriles', which is despective.
My question is? Why an unofficial name is given as the name using the webservice? It should appear just 'Madrid' isn't it?
Is there any way to mark an alternate or translation as 'official'?
There is a flag called 'isPreferredName'. It can be set on the wiki graphical user interface. For Madrid is was not set and then the server just displays a name.
We would also like to have vernacular or disrespectful names in the database. So that people who read a name somewhere and don't know what it means will find it in the database.