When sending looking up the DNS entry of api.guildwars2.com you get two entries (https://mxtoolbox.com/SuperTool.aspx?action=a:api.guildwars2.com&run=toolpage):
A 22.214.171.124 (https://126.96.36.199/)
A 188.8.131.52 (https://184.108.40.206/)
However when trying to access the API by either of these an unsafe SSL certificate is returned and when continuing the server returns 403 - Access denied.
Is there any way of accessing the API directly by IP?