Geolocation API Documentation

  1. Getting Started
  2. Where do I get my API Key?
  3. Do I have to use the API to send SMSs?
  4. Responses
  5. What is the current API Version?
  6. What is the CompleteAPI.com GeoLocation Service?
  7. GeoLocation API Features
  8. Upcoming Features
  9. Do you support all IP types?
  10. How much does it cost?

1. Getting Started

To call the API, you simply open the following URL:

https://www.completeapi.com/v1/[API_KEY]/geolocate/[IP_ADDRESS]

For example, to look up the IP Address 172.217.5.227

https://www.completeapi.com/v1/123/geolocate/172.217.5.227

2. Where do I get my API Key?

Grab it here.

3. Do I have to use the API to send SMSs?

Certainly not! We have created an online user interface which you can access here. If the API is too technical for you, then we recommend this route. It is also useful for things the api does not provide for, such as sending to large lists of contacts or viewing SMS logs. The API should technically only be used if you want to integrate it with an application.

4. Responses

Example of a Successful Response

{
  api: "CompleteAPI.com Version 1.0",
  status: "success",
  creditsUsed: 1,
  creditsRemaining: 49992,
  ip: "172.217.5.227",
  geo_id: 4140963,
  latitude: 38.9072,
  longitude: -77.0369,
  continentCode: "NA",
  continentName: "North America",
  countryCode: "US",
  countryName: "United States",
  isEuMember: false,
  stateProvince: "District of Columbia",
  city: "Washington D.C.",
  zipCode: "20068",
  district: "Washington",
  currencyCode: "USD",
  currencyName: "Dollar",
  phonePrefix: "1",
  languages: [
    "en-US",
    "es-US",
    "haw",
    "fr"
  ],
  gmtOffset: -4,
  timeZone: "America/New_York",
  record_age: 0
}

Example of an Unsuccessful Response

{
  status: "error",
  errors: [
    "Invalid IP Address Entered."
  ]
}

5. What is the current API Version?

Current version is: Version 1.0.

Although we have implemented it for various of our own and client websites, the GeoLocation has not been publicly accessible until the launch of CompleteAPI.com.

6. What is the CompleteAPI.com GeoLocation Service?

Our GeoLocation service offers an easy way for you to lookup IP information programatically. This means you can easily incorporate these features into any of your applications. IP Lookup is often needed for a variety of website features, including:

  • Redirecting: For example, sending all Namibian users to mysite.com/namibia.
  • Security: Blocking traffic from specific countries
  • Marketing Research: Gain more insight into your traffic by identifying where your clients are coming form.

7. GeoLocation API Features

The API currently provides information on any IP provided. The returned fields can be seen in the sample response included in this documentation.

8. Upcoming Features

We intend to add more fields in the future, particularly relating to security. Here are some of the fields we intend to add in the next release:

  • isCrawler: True/ False
  • isProxy: True/ False
  • proxyType: VPN, Network etc
  • threatLevel: High/ Medium/ Low
  • threatDetails: anonymous-proxy, attack-source, attack-target:web, bot-name:gherran, bot-type:spam etc

9. Do you support all IP types?

Yes, we support both ipv4 and ipv6. (An example of a normal ipv4 ip address would be "172.217.5.227", whereas ipv6 addresses are hexidecimal, for example: "2001:cdba:0000:0000:0000:0000:3257:9652")

10. How much does it cost?

The API uses credits and credits can be bought for R 50.00 for 50 000 lookups (it works out to R 0.01 for every 10 queries sent)

Copyright © Namhost Internet Services (Pty) Ltd | Privacy Policy | Terms of Use