Forum Discussion

PiotrMirowski's avatar
PiotrMirowski
Copper Contributor
Sep 07, 2026

Webservice function

Hello. 

I want to use the WEBSERVICE function to geolocate an IP address. The address is in cell A1, and the function is in A2. The function looks like this: =WEBSERVICE("https://ip-api.com/csv/" & A1). Unfortunately, the result is #ARG!. I have no idea what is wrong. Can you help me?

Best regards,

Piotr

1 Reply

  • m_tarler's avatar
    m_tarler
    Silver Contributor

    It appears the problem is that you are using the httpS:// version of that query which requires a key.  If this is non-commercial use you can use the http:// version:

    =WEBSERVICE("http://ip-api.com/csv/" & A1)

    If this is commercial use and you have a key you maybe having issues getting that key to work with a query coming from an excel service call. 

    That said, when I try using the httpS version the error I get is #VALUE! (not #ARG! and don't know what that is) 

    It is also possible the value in A1 is not properly formed for an http request and may need to use ENCODEURL.  Maybe something like this:

    =WEBSERVICE("http://ip-api.com/csv/" & ENCODEURL(A1) )