Loader

Overview

The Ip Lookup API service provides simple and intuitive API allowing you to lookup the location of any IP address.

Make a request

Making a request is very simple all you have to do is to provide an ip to lookup and we do the rest

https://api.apibundle.io/ip-lookup?apikey={yourapikey}&ip=12.51.23.2

Url

https://api.apibundle.io/ip-lookup

Method

GET

Request parameters

Parameter Type Description
apikey required

string

Your api key. You can subscribe for free here if you don't have one yet

ip

ipv4 or ipv6

IP address you want to lookup.
Note: If the param is not provided, we will use the ip of the request

language

string

The language in which you want the country details to appear. Possible options are 'de', 'es', 'fr', 'ja', 'pt-BR', 'ru', 'zh-CN' or 'en'

The default is value en

Response fields

Bellow are all fields returned by the api when everything went fine (code 200).

Note: All these fields are nullable. This is very useful for reserved Ip for example.

Field Type Description
continent

object

JSON object with details of the continent of the IP Address continent

continent->name

string

The continent's name

continent->code

string

The continent's alpha 2 code

continent->geoname_id

number

Id of continent in the GeoNames database

is_eu

boolean

Whether the IP Address is in the European Union

country

object

JSON object with details of the country of the IP Address country

country->name

string

The country's name

country->iso_2_code

string

The country's alpha 2 code

country->iso_3_code

string

The country's alpha 3 code

country->flag_emoji

string

The country's flag emoji

country->flag_unicode

string

The country's flag unicode

country->flag_image

string

The country's flag image in SVG format. Example: https://apibundle.io/data/flags/irl.svg

country->calling_codes

string

The country's calling codes

country->geoname_id

number

Id of country in the GeoNames database

city

object

JSON object with details of the city of the IP Address country

city->name

string

The city's name

city->geoname_id

number

Id of city in the GeoNames database

latitude

Float

The latitude of the IP Address

longitude

Float

The longitude of the IP Address

postal_code

string

The postal code or zip for where the IP Address is located

timezone

object

JSON object with timezone details of where the IP Address is located

timezone->name

string

The timezone for where the IP Address is located. Example: Europe/Berlin

timezone->offset

number

Difference between the IP's local time and the UTC time in minutes. Note that it may be negative

timezone->offset_name

string

The long human name for the zone's current offset, for example Gulf Standard Time or Eastern Daylight Time

timezone->is_daylight_saving

boolean

Whether the IP Address is in daylight saving time

timezone->current_time

string

The current time in the timezone of the IP Address. Example: 2022-06-27T08:05:42.153-05:00

currency

object

JSON object with details of the currency of the IP Address country

currency->name

string

The currency's name

currency->code

string

The currency's code

currency->symbol

string

The currency's symbol

connection

object

JSON object with details of the currency of the IP Address country

connection->asn

string

The Autonomous System's Number

connection->aso

string

The Autonomous System's Organisation name

ip

string

The given ip address

type

string

The type of the given ip address. Possibles values are ipv4 and ipv6

Errors handling

In case of error, in addition to what was said in the common errors section for all apis, the only particular error you could get is as follows:

HTTP code type name subtype name field name Description
400 VALIDATION_ERROR INVALID_IP ip

When the given ip is not a syntactic valid one

Examples

Below are some examples of response. You can subscribe to a free api key here in order to get more examples once into the dashboard

  • Success request with 200 HTTP code

    {
      "ip": "12.51.23.2",
      "type": "ipv4",
      "continent": {
        "name": "North America",
        "code": "NA",
        "geoname_id": 6255149
      },
      "is_eu": false,
      "country": {
        "name": "United States",
        "iso_2_code": "US",
        "iso_3_code": "USA",
        "flag_emoji": "🇺🇸",
        "flag_unicode": "U+1F1FA U+1F1F8",
        "flag_image": "https://apibundle.io/data/flags/usa.svg",
        "calling_codes": [
          "1"
        ],
        "geoname_id": 6252001
      },
      "city": {
        "name": "Brookeland",
        "geoname_id": 4676539
      },
      "latitude": 31.0953,
      "longitude": -93.9664,
      "postal_code": "75931",
      "currency": {
        "code": "USD",
        "name": "United States dollar",
        "symbol": "$"
      },
      "timezone": {
        "name": "America/Chicago",
        "current_time": "2022-06-27T08:11:46.541-05:00",
        "offset": -300,
        "offset_name": "Central Daylight Time",
        "is_daylight_saving": true
      },
      "connection": {
        "asn": 7018,
        "aso": "ATT-INTERNET4"
      }
    }
    
    
  • Failed request with 400 HTTP code

    {
      "type": "VALIDATION_ERROR",
      "message": "Please provide a valid IP",
      "subtype": "INVALID_IP",
      "field": "ip"
    }
    
    
  • Failed request with 401 HTTP code

    {
      "type": "INVALID_API_KEY",
      "message": "Please provide a valid api key"
    }