net.info - Quick Start
Get started with the net.info IP Geolocation Service
net.info is a core service for cost effective and scalable geo-location serivces. This service provided an easy to use ip address to location API. To learn more about the API go to our API Reference.
Create an API Key
To use the API you will need to create an API key. To create an API key go to the Hyphen Dashboard and logon. Then go to Settings
-> API Keys
and click on Create API Key
. Once this key is created you will want to save it in a secure location as you will not be able to see it again.
Using the API
To use the API you will need to make a GET request to the following endpoint:
curl --request GET \
--url https://net.info/ip/ipAddress \
--header 'accept: application/json' \
--header 'authorization: Bearer YOUR_API_KEY'
Replace ipAddress
with the ip address you want to look up. This will return a JSON object with the location information for the ip address.
{
"ip": "string",
"type": "private",
"location": {
"country": "string",
"region": "string",
"city": "string",
"lat": 0,
"lng": 0,
"postalCode": "string",
"timezone": "string",
"geonameId": 0
}
}
You are charged per lookup so make sure to use the API responsibly. Here is the pricing for the API: https://hyphen.ai/pricing
Bulk Lookups
If you need to do bulk lookups you can use the bulk lookup API. This API allows you to look up multiple ip addresses at once. To use the bulk lookup API you will need to make a POST request to the following endpoint:
curl --request POST \
--url https://net.info/ip \
--header 'accept: application/json' \
--header 'authorization: Bearer YOUR_API_KEY' \
--header 'content-type: application/json' \
--data '
[
"1.1.1.1",
"2.2.2.2",
"3.3.3.3"
]
'
this will return a response similar to what you had before but with an data
array of ip addresses.
{
"data": [
{
"ip": "string",
"type": "private",
"location": {
"country": "string",
"region": "string",
"city": "string",
"lat": 0,
"lng": 0,
"postalCode": "string",
"timezone": "string",
"geonameId": 0
}
},
{
"ip": "string",
"type": "error",
"errorMessage": "string"
}
]
}
Updated 15 days ago