Signup
First off, subscribe to the Fastah IP Geolocation API on AWS Marketplace. Once you pick a subscription plan and billing term, you will be redirected to the Fastah Developer Console to create an account and obtain your API key.
Once you have obtained your personal Fastah API key, proceed to the following step of making your first API call.
Make an API call
Use either of the following styles to lookup a specific IP, or let the Fastah backend autodetect the client's public IP address
curl \
-X GET "https://ep.api.getfastah.com/whereis/v1/json/103.10.66.11" \
-H "Fastah-Key: <<fastah-iplocation-demo-key>>"
curl \
-X GET "https://ep.api.getfastah.com/whereis/v1/json/auto" \
-H "Fastah-Key: <<fastah-iplocation-demo-key>>"
Get your key
Make sure to use your own API key from the developer console.
Understanding the response
{
"ip": "103.10.66.11",
"locationData": {
"cityName": "Singapore",
"continentCode": "AS",
"countryCode": "SG",
"countryName": "Singapore",
"lat": -6.26,
"lng": 106.84,
"tz": "Asia/Singapore"
}
}
Here are the key JSON properties you will need to parse. Note that due to the statistical models used for IP geo-location, all locations should be considered approximate.
Field Name | Description |
---|---|
ip | The IP address described in the response |
cityName | The major city closest to the geo-coordinates described below |
countryCode | The two-letter country code (ISO 3166-1) |
lat, lng | The approximate latitude and longitude based on statistical models |
tz | The timezone in tzdata format |
Need More Help?
Drop us a line at [email protected] with any questions, bug reports, training requests, or if you just want to chat!
For Postman users
If you use the Postman API development took, use the button below to open the collection in your workspace.
Updated 3 months ago