Description Usage Arguments Value See Also Examples
ip_api
consumes a vector of IP addresses
and geolocates them via ip-api.com.
1 |
ip_addresses |
a character vector of IP addresses |
as_data_frame |
whether to return the results as a data.frame or not. Set to TRUE by default. |
delay |
whether or not to delay each request by 400ms. ip-api.com has a
maximum threshold of 150 requests a minute; if you're parallelising calls, you
might run into this. |
either a data.frame or a list of vectors. If an IP cannot be geolocated, it will provide an error message: see the examples for field names and examples of each possible output.
ip_info
and db_ip
for other
online geolocation APIs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
#Valid, data.frame output
result <- ip_api("2607:FB90:426:DC1D:CFC4:4875:8BC2:4D93")
#Invalid, data.frame output
result <- ip_api("argh")
#Valid list output
result <- ip_api("2607:FB90:426:DC1D:CFC4:4875:8BC2:4D93", as_data_frame = FALSE)
#Invalid list output
result <- ip_api("argh", as_data_frame = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.