Geo IP: where is an IP address

Dev Tools

The country, region, city, time zone, position and internet provider of an IPv4 or IPv6 address. Free: 1,000 requests a day, counted from midnight to midnight in Malawi. Without a limit: subscribe for MWK 2,000 a month in the dashboard, under Dev Tools. A month runs from the day you pay to the same day of the next month.

GEThttps://telcomw.com/api/ip/8.8.8.8

Put the IP address in the URL. Your API key goes in the X-API-Key header (or ?api_key= in the address).

Parameters

Parameter Sent in Required Description
X-API-Key header YES Your API key, sent as a header. You can also send it as Authorization: Bearer YOUR_API_KEY, or, because this is a GET, as the api_key parameter in the address.
api_key query NO Your API key in the address, instead of the header. A key in an address can be kept in logs, so prefer the header.
ip_address path YES The IPv4 or IPv6 address to look up, for example 8.8.8.8.

Example request

curl --location --request GET 'https://telcomw.com/api/ip/8.8.8.8' \
  --header 'X-API-Key: YOUR_API_KEY'
curl --location --request GET "https://telcomw.com/api/ip/8.8.8.8" ^
  --header "X-API-Key: YOUR_API_KEY"
<?php

$headers = [
    'X-API-Key: YOUR_API_KEY',
];

$ch = curl_init('https://telcomw.com/api/ip/8.8.8.8');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

print_r(json_decode($response, true));
const axios = require('axios');

axios.request({
  method: 'get',
  url: 'https://telcomw.com/api/ip/8.8.8.8',
  headers: {
    'X-API-Key': 'YOUR_API_KEY'
  }
}).then((res) => console.log(res.data))
  .catch((err) => console.error(err.response ? err.response.data : err.message));
import requests

headers = {
    'X-API-Key': 'YOUR_API_KEY'
}

response = requests.request('GET', 'https://telcomw.com/api/ip/8.8.8.8', headers=headers)
print(response.json())

Response

The response is JSON.

Response (200)

{
  "success": true,
  "request_id": "req_5f2c9a1d0e7b4a63",
  "data": {
    "ip": "8.8.8.8",
    "country_code": "US",
    "country": "United States",
    "is_eu": false,
    "region": "",
    "city": "",
    "timezone": "America/Chicago",
    "latitude": 37.751,
    "longitude": -97.822,
    "accuracy_radius_km": 1000,
    "network_provider": {
      "name": "GOOGLE - Google LLC",
      "asn": 15169
    }
  }
}

Not a valid address (400)

{
  "success": false,
  "request_id": "req_5f2c9a1d0e7b4a63",
  "error": {
    "code": "INVALID_IP",
    "message": "That is not an IPv4 or IPv6 address. Use /api/ip/8.8.8.8"
  }
}

No location for it (404)

{
  "success": false,
  "request_id": "req_5f2c9a1d0e7b4a63",
  "error": {
    "code": "IP_NOT_FOUND",
    "message": "There is no location for that address (it is private, reserved or unknown)."
  }
}

Daily limit reached (429)

{
  "success": false,
  "request_id": "req_5f2c9a1d0e7b4a63",
  "error": {
    "code": "DAILY_LIMIT_REACHED",
    "message": "The free plan allows 1,000 requests a day and today's are used. It starts again at midnight (Malawi time)."
  }
}

Fields explained

FieldDescription
data.ipThe address that was looked up.
data.country_codeThe 2 letter country code, for example MW.
data.countryThe name of the country.
data.is_eutrue when the country is in the European Union.
data.regionThe region or state, when it is known (it can be empty).
data.cityThe city, when it is known (it can be empty).
data.timezoneThe time zone, for example Africa/Blantyre.
data.latitudeThe latitude of the place.
data.longitudeThe longitude of the place.
data.network_providerThe internet provider (network) that owns the address: its name and its AS number, for example AIRTEL-MW Airtel Malawi. It is null when the provider is not known.
data.accuracy_radius_kmAbout how far, in kilometres, the real place can be from the position given.
X-RateLimit-LimitResponse header: the requests you can make a day (1,000), or unlimited when you have a subscription.
X-RateLimit-RemainingResponse header: the requests left today.
X-PlanResponse header: free or subscribed.