NAV Navbar
shell

Getting started

The IPFINDER API is exposed via RESTful web services and makes use of the standard JSON encoding.

This geolocation API developer documentation will show you how to query.

Authentication

In order to fetch information about an IP address, you need to build a request URL of the following form :

# With token query parameter

$ curl -X GET https://api.ipfinder.io/v1/?token=$TOKEN 

# With POST application/json

$ curl -d '{"token":"$TOKEN"}' -H "Content-Type: application/json" -X POST https://api.ipfinder.io/v1/

# With POST application/x-www-form-urlencoded

$ curl -d "token=$TOKEN" -H "Content-Type: application/x-www-form-urlencoded" -X POST https://api.ipfinder.io/v1/

# With Basic Auth
$ curl -u $TOKEN: https://api.ipfinder.io/v1/

# With X-Authorization token
$ curl -H 'X-Authorization: $TOKEN' https://api.ipfinder.io/v1/

Make sure to replace $TOKEN with your API key.

Your API token is used to authenicate you with our API, and can be provided either as a POST , Basic Auth OR X-Authorizatio, or alternatively as a token URL parameter.

Get IP address details

In order to fetch information about an IP address, you need to build a request URL of the following form :

Examples

# # With GET Get details for 1.0.0.0
curl -X GET https://api.ipfinder.io/v1/1.0.0.0?token=$TOKEN

## With POST Get details for 1.0.0.0
curl -d '{"token":"$TOKEN"}' -X POST https://api.ipfinder.io/v1/1.0.0.0

## With X-Authorization token details for 1.0.0.0
curl  -H 'X-Authorization:$TOKEN' -X GET https://api.ipfinder.io/v1/1.0.0.0

## parameters Examples
## jsonp
curl -d '{"token":"$TOKEN", "format":"jsonp", "callback": "test"}' -X POST https://api.ipfinder.io/v1/1.0.0.0


## xml 
curl -d '{"token":"$TOKEN", "format" : "xml"}' -X POST https://api.ipfinder.io/v1/169.57.0.140


## php
curl -d '{"token":"$TOKEN", "format" : "php"}' -X POST https://api.ipfinder.io/v1/169.57.0.140

Here are a few examples for fetching IP address information from the command line :

HTTP Request

GET https://api.ipfinder.io/v1/{ipAddress}?token=$TOKEN

POST https://api.ipfinder.io/v1/{ipAddress}

The parameters are defined as follows :

Parameter Default Description
token Required Your API key or the string "free" for the free API
ipAddress Required The API supports passing in a single IPv4 or IPv6 IP address
format optional available format json jsonp php xml
callback optional add callback name if format equal jsonp
propertyName optional specify a single field name to request instead of the whole address details

Response Objects details

Depending on your subscription plan and the options you choose for your API request, the ipstack API will respond using a series of different modules and objects. Find below a list of all available API response objects explained.

Full Response

## json
{
    "status": "ok",
    "status_message": "Query was successful",
    "ip": "169.57.0.140",
    "type": "IPV4",
    "continent_code": "NA",
    "continent_name": "North America",
    "country_code": "US",
    "country_name": "United States",
    "country_native_name": "United States",
    "region_name": "Minnesota",
    "city": "Rochester",
    "latitude": "44.0592",
    "longitude": "-92.5063",
    "location": {
        "capital": "Washington, D.C.",
        "country_flag": "http:\/\/flag.sample.com\/usa.svg",
        "flag_png": "http:\/\/flag.sample.com\/usa.png",
        "country_flag_emoji": "\ud83c\uddfa\ud83c\uddf8",
        "country_flag_emoji_unicode": "U+1F1FA U+1F1F8",
        "calling_code": "1",
        "toplevel_domain": ".us",
        "alpha3_code": "USA",
        "population": "321645000",
        "is_eu": false,
        "is_ar": false
    },
    "time_zone": {
        "id": "America\/New_York",
        "UTC": "UTC\u221212:00",
        "gmt_offset": -18000,
        "current_time": "2019-02-18 14:08:18"
    },
    "currency": {
        "name": "United States dollar",
        "symbol": "USD",
        "symbol_native": "$"
    },
    "languages": {
        "code": "en",
        "name": "English",
        "name_native": "English"
    },
    "connection": {
        "asn": "36351",
        "organization": "SoftLayer Technologies Inc.",
        "domain": "softlayer.com",
        "type": "Hosting"
    },
    "security": {
        "is_proxy": false,
        "proxy_type": false,
        "is_tor": false,
        "is_spam": false,
        "threat_level": "Low"
    },
    "header": {
        "total_user_agent": 8,
        "list_user_agent": [
            {
                "user_agent": "Mozilla\/5.0 (Windows NT 6.1) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/41.0.2228.0 Safari\/537.36",
                "browser_name": "Chrome",
                "os_name": "Windows",
                "device_type": "desktop"
            },
            {
                "user_agent": "Mozilla\/5.0 (Linux; U; Android 4.0.4; en-us; Glass 1 Build\/IMM76L; XE10) AppleWebKit\/534.30 (KHTML, like Gecko) Version\/4.0 Mobile Safari\/534.30",
                "browser_name": null,
                "os_name": null,
                "device_type": "headset"
            },
            {
                "user_agent": "Mozilla\/5.0 (compatible; IBrowse 3.0; AmigaOS4.0)\r\n",
                "browser_name": "IBrowse",
                "os_name": "AmigaOS",
                "device_type": "desktop"
            },
            {
                "user_agent": "Mozilla\/5.0 (Linux; U; Android 2.1-update1; en-au; HTC_Desire_A8183 V1.16.841.1 Build\/ERE27) AppleWebKit\/530.17 (KHTML, like Gecko) Version\/4.0 Mobile Safari\/530.17",
                "browser_name": "Android Browser",
                "os_name": "Android",
                "device_type": "mobile"
            },
            {
                "user_agent": "Feed Viewer 3.9.3843.18128",
                "browser_name": null,
                "os_name": null,
                "device_type": ""
            },
            {
                "user_agent": "itunes\/9.0.2 (Macintosh; Intel Mac OS X 10.4.11) AppleWebKit\/531.21.8",
                "browser_name": null,
                "os_name": "OS X",
                "device_type": "desktop"
            },
            {
                "user_agent": "Mozilla\/5.0 (compatible; Googlebot\/2.1; +http:\/\/www.google.com\/bot.html)",
                "browser_name": "Googlebot",
                "os_name": null,
                "device_type": "bot"
            },
            {
                "user_agent": "Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/535.2 (KHTML, like Gecko) Ubuntu\/11.04 Chromium\/15.0.871.0 Chrome\/15.0.871.0 Safari\/535.2",
                "browser_name": "Chromium",
                "os_name": "Ubuntu",
                "device_type": "desktop"
            }
        ]
    }
}
## xml
...
<type>IPV4</type><continent_code>OC</continent_code><continent_name>Oceania</continent_name><country_code>AU</country_code><country_name>Australia</country_name><country_native_name>Australia</country_native_name><region_name>Queensland</region_name><city>South Brisbane</city><latitude>-27.4748</latitude><longitude>153.017</longitude><location><capital>Canberra</capital><country_flag>http://flag.sample.com/aus.svg</country_flag><flag_png>http://flag.sample.com/aus.png</flag_png><country_flag_emoji>&#x1F1E6;&#x1F1FA;</country_flag_emoji><country_flag_emoji_unicode>U+1F1E6 U+1F1FA</country_flag_emoji_unicode><calling_code>61</calling_code><toplevel_domain>.au</toplevel_domain><alpha3_code>AUS</alpha3_code><population>23868800</population><is_eu></is_eu><is_ar></is_ar></location><time_zone><id>Australia/Lord_Howe</id><UTC>UTC+05:00</UTC><gmt_offset>39600</gmt_offset><current_time>2019-02-21 07:08:14</current_time></time_zone><currency><name>Australian dollar</name><symbol>AUD</symbol><symbol_native>$</symbol_native></currency><languages><code>en</code><name>English</name><name_native>English</name_native></languages><connection><asn>13335</asn>
...
## php serialize
a:20:{s:6:"status";s:2:"ok";s:14:"status_message";s:20:"Query was successful";s:2:"ip";s:7:"1.0.0.0";s:4:"type";s:4:"IPV4";s:14:"continent_code";s:2:"OC";s:14:"continent_name";s:7:"Oceania";s:12:"country_code";s:2:"AU";s:12:"country_name";s:9:"Australia";s:19:"country_native_name";s:9:"Australia";s:11:"region_name";s:10:"Queensland";s:4:"city";s:14:"South Brisbane";s:8:"latitude";s:8:"-27.4748";s:9:"longitude";s:7:"153.017";s:8:"location";a:11:{s:7:"capital";s:8:"Canberra";s:12:"country_flag";s:30:"http://flag.sample.com/aus.svg";s:8:"flag_png";s:30:"http://flag.sample.com/aus.png";s:18:"country_flag_emoji";s:8:"🇦🇺";s:26:"country_flag_emoji_unicode";s:15:"U+1F1E6 U+1F1FA";s:12:"calling_code";s:2:"61";s:15:"toplevel_domain";s:3:".au";s:11:"alpha3_code";s:3:"AUS";s:10:"population";s:8:"23868800";s:5:"is_eu";b:0;s:5:"is_ar";b:0;}s:9:"time_zone";a:4:{s:2:"id";s:19:"Australia/Lord_Howe";s:3:"UTC";s:9:"UTC+05:00";s:10:"gmt_offset";i:39600;s:12:"current_time";s:19:"2019-02-21 07:11:42";}s:8:"currency";a:3:{s:4:"name";s:17:"Australian dollar";s:6:"symbol";s:3:"AUD";s:13:"symbol_native";s:1:"$";}s:9:"languages";a:3:{s:4:"code";s:2:"en";s:4:"name";s:7:"English";s:11:"name_native";s:7:"English";}s:10:"connection";a:4:{s:3:"asn";s:5:"13335";s:12:"organization";s:5:"  NOC";s:6:"domain";s:14:"cloudflare.com";s:4:"type";s:8:"Business";}s:8:"security";a:5:{s:8:"is_proxy";b:0;s:10:"proxy_type";b:0;s:6:"is_tor";b:0;s:7:"is_spam";b:0;s:12:"threat_level";s:3:"Low";}s:6:"header";a:2:{s:16:"total_user_agent";i:0;s:15:"list_user_agent";N;}}

## jsonp default callback finder 
finder({"status":"ok","status_message":"Query was successful","ip":"1.0.0.0","type":"IPV4","continent_code":"OC","continent_name":"Oceania","country_code":"AU","country_name":"Australia","country_native_name":"Australia","region_name":"Queensland","city":"South Brisbane","latitude":"-27.4748","longitude":"153.017","location":{"capital":"Canberra","country_flag":"http:\/\/flag.sample.com\/aus.svg","flag_png":"http:\/\/flag.sample.com\/aus.png","country_flag_emoji":"\ud83c\udde6\ud83c\uddfa","country_flag_emoji_unicode":"U+1F1E6 U+1F1FA","calling_code":"61","toplevel_domain":".au","alpha3_code":"AUS","population":"23868800","is_eu":false,"is_ar":false},"time_zone":{"id":"Australia\/Lord_Howe","UTC":"UTC+05:00","gmt_offset":39600,"current_time":"2019-02-21 07:12:03"},"currency":{"name":"Australian dollar","symbol":"AUD","symbol_native":"$"},"languages":{"code":"en","name":"English","name_native":"English"},"connection":{"asn":"13335","organization":"  NOC","domain":"cloudflare.com","type":"Business"},"security":{"is_proxy":false,"proxy_type":false,"is_tor":false,"is_spam":false,"threat_level":"Low"},"header":{"total_user_agent":0,"list_user_agent":null}});


Response Object Description
ip Requested IP address
type IP address
continent_code 2-letter continent code
continent_name Continent name
country_code ISO 3166-1 alpha-2 country code
country_name Country name
country_native_name Country native name
region_name State or province name
city City name
latitude Decimal latitude
longitude Decimal longitude
location [Object] List of location raised by IP address
location->capital Returns the capital city of the country associated with the IP.
location->country_flag Returns an HTTP URL leading to an SVG-flag icon for the country associated with the IP.
location->flag_png Returns an HTTP URL leading to an PNG-flag icon for the country associated with the IP.
location->country_flag_emoji Returns the emoji icon for the flag of the country associated with the IP.
location->country_flag_emoji_unicode Returns the unicode value of the emoji icon for the flag of the country associated with the IP. (e.g. U+1F1F5 U+1F1F9 for the Portuguese flag)
location->calling_code Returns the calling/dial code of the country associated with the IP. (e.g. 351) for Portugal.
location->toplevel_domain Returns country domain name (e.g .dz .co )
location->alpha3_code ISO 3166-1 alpha-3 country code
location->population Country population
location->is_eu Returns true or false depending on whether or not the county associated with the IP is in the European Union.
location->is_ar Returns true or false depending on whether or not the county associated with the IP is in the ARABIC Union.
time_zone [Object] Returns an object containing timezone-related data.
time_zone->id Returns the ID of the time zone associated with the IP. (e.g. Australia/Lord_Howe for PST)
time_zone->UTC UTC
time_zone->gmt_offset Returns the GMT offset of the given time zone in seconds. (e.g. -25200 for PST's -7h GMT offset)
time_zone->current_time Returns the current date and time in the location associated with the IP. (e.g. 2019-02-19 06:58:25)
currency [Object] Returns an object containing currency-related data.
currency->name Returns the name of the given currency.
currency->symbol Returns the 3-letter code of the main currency associated with the IP.Example: USD
currency->symbol_native Returns the native symbol letter of the given currency .Example: $.
languages [Object] Returns an object containing one or multiple sub-objects per language spoken in the country associated with the IP.
languages->code Returns the 2-letter language code for the given language.
languages->name Returns the name (in the API request's main language) of the given language. (e.g. Arabic)
languages->name_native Returns the native name of the given language. (e.g. العربية)
connection [Object] Returns an object containing connection-related data.
connection->asn Returns the Autonomous System Number associated with the IP.
connection->organization Returns the name of the organization associated with the IP.
connection->domain Returns the name of the domain associated with the IP.
connection->type Returns the name of the type associated with the IP List of all available (isp, hosting, Business, Other).
security [Object] Returns an object containing security-related data.
security->is_proxy Returns true or false depending on whether or not the given IP is associated with a proxy.
security->proxy_type Returns the type of proxy the IP is associated with. List of all available(cgi, web, vpn)
security->is_tor Returns true or false depending on whether or not the given IP is associated with the anonymous Tor system.
security->is_spam Returns true or false depending on whether or not the given IP is associated with the spammer db .
security->threat_level Returns the type of threat level the IP is associated with. List of all available(low, medium, high)
header [Object] Returns an object containing header-related data.
header->total_user_agent Returns an number of User Agent associated with the IP.
header->list_user_agent [Object] Returns an object containing User Agent-related data(user_agent,browser_name,os_name,device_type).

Get AS details

Examples

Here are sample command lines for fetching API service information :

# # With GET Get details for 1.0.0.0
curl -X GET https://api.ipfinder.io/v1/(asNumber)?token=$TOKEN

## With POST Get details for 1.0.0.0
curl -d '{"token":"$TOKEN"}' -X POST https://api.ipfinder.io/v1/(asNumber)

## parameters Examples
## jsonp
curl -d '{"token":"$TOKEN", "format":"jsonp", "callback": "test"}' -X POST https://api.ipfinder.io/v1/(asNumber)


## xml 
curl -d '{"token":"$TOKEN", "format" : "xml"}' -X POST https://api.ipfinder.io/v1/(asNumber)


## php
curl -d '{"token":"$TOKEN", "format" : "php"}' -X POST https://api.ipfinder.io/v1/(asNumber)

Make sure to replace Add (as|AS) to asNumber example as1 or AS1.

HTTP Request

GET https://api.ipfinder.io/v1/(as|AS){asNumber}?token=$TOKE

POST https://api.ipfinder.io/v1/as

The parameters are defined as follows :

Parameter Default Description
token Required Your API key or the string "free" for the free API
asNumber Required The AS number you want details for
format optional available format json jsonp php xml
callback optional add callback name if format equal jsonp
propertyName optional specify a single field name to request instead of the whole address details

Response object

Full Response

{
    "status": "ok",
    "status_message": "Query was successful",
    "asn": "AS36947",
    "org_name": "Telecom Algeria",
    "continent_code": "AF",
    "continent_name": "Africa",
    "country_code": "DZ",
    "country_name": "Algeria",
    "allocated": "2007-04-27",
    "registry": "afrinic",
    "domain": "algerietelecom.dz",
    "num_ips_ipv4": "4,353,792",
    "num_ips_ipv6": "79,228,162,514,264,337,593,543,950,336",
    "as_name": "ALGTEL-AS",
    "org_id": "ORG-TA23-AFRINIC",
    "comany_type": "isp",
    "speed": {
        "ping": "270.1 ms",
        "download": "10.97 ms",
        "upload": "0.79 ms"
    },
    "peers": {
        "total_peers": 4,
        "list_peers": [
            "AS12956",
            "AS174",
            "AS5511",
            "AS6762"
        ]
    },
    "upstreams": {
        "total_upstreams": 4,
        "list_upstreams": [
            "AS12956",
            "AS174",
            "AS5511",
            "AS6762"
        ]
    },
    "downstreams": {
        "total_downstreams": 3,
        "list_downstreams": [
            "AS327712",
            "AS327931",
            "AS33779"
        ]
    },
    "prefixes": {
        "total_prefixes": 261,
        "list_prefixes": [
            "41.96.0.0\/16",
            "41.96.0.0\/13",

        ]
    }
}
Response Object Description
asn AS number
org_name Organization name
continent_code 2-letter continent code
continent_name Continent name
country_code ISO 3166-1 alpha-2 country code
country_name Country name
registry Regional internet registry afrinic, lacnic, apnic, arin, ripe and more..
domain Website of Organization
num_ips_ipv4 Total number of IPv4 addresses announced by this AS
num_ips_ipv6 Total number of IPv6 addresses announced by this AS
as_name AS name
org_id Organization ID
comany_type Returns isp, business , hosting, other .
speed [Object] Returns an object containing Network Speed-related data.
speed->ping Returns the Network Speed ping of AS number.
speed->download Returns the Network Speed download of AS number.
speed->upload Returns the Network Speed upload of AS number.
peers [Object] Returns an object containing peers-related data.
peers->total_upstreams Returns the Total number of peers announced by this AS number
peers->list_upstreams Returns the list of AS announced by this AS number (e.g. AS1)
upstreams [Object] Returns an object containing upstreams-related data.
upstreams->total_upstreams Returns the Total number of upstreams announced by this AS number
upstreams->list_upstreams Returns the list of AS announced by this AS number (e.g. AS1)
downstreams [Object] Returns an object containing downstreams-related data.
downstreams->total_downstreams Returns the Total number of downstreams announced by this AS number
downstreams->list_downstreams Returns the list of AS announced by this AS number (e.g. AS1)
prefixes [Object] Returns an object containing prefixes-related data.
prefixes->total_prefixes Returns the Total number of prefixes announced by this AS
prefixes->list_prefixes Returns the list of prefixes CIDR announced by this AS (e.g. 41.96.0.0\/16)

Firewall

Do you want to block visitors by country or AS number ?

This API is currently only available as part of our enterprise

Examples

Here are sample command lines for fetching API service information :

HTTP Request

GET https://api.ipfinder.io/v1/firewall/{by}?token=$TOKEN

POST https://api.ipfinder.io/v1/firewall/{by}

# X-Authorization
 curl -H 'X-Authorization:  $TOKEN' -d "format=microtik" -X POST http://api.ipfinder.io/v1/firewall/as2

# POST
 curl -d '{"token":"$TOKEN", "format": "microtik"}' -X POST http://api.ipfinder.io/v1/firewall/as2

# GET 
 curl -X GET 'http://api.ipfinder.io/v1/firewall/as2?token=$TOKEN&format=apache_allow'

replace $Format with available Format name.

Parameter Default Description
token Required Your API key only for Enterprise key
by Required AS number as (e.g. AS1) or country ISO 3166-1 alpha-2 country code (e.g. US)
Format Required formats supported are apache_allow, apache_deny,nginx_allow,nginx_deny, CIDR, linux_iptables, netmask, inverse_netmask, web_config_allow, web_config_deny, cisco_acl, peer_guardian_2, network_object, cisco_bit_bucket, juniper_junos, microtik

Response details

The output formats supported are Nginx, Apache .htaccess, Linux iptables, CIDR, Netmask, Inverse Netmask, IIS web.config, Cisco ACL, PeerGuardian2, network-object, Cisco bit bucket, Juniper Junos and MicroTik. Please find the details below:

Response:

# -------------------------------------------------------
# Source: https://ipfinder.io/
# -------------------------------------------------------
# _____ ______   __  _             _
#|_   _|| ___ \ / _|(_)           | |
#  | |  | |_/ /| |_  _  _ __    __| |  ___  _ __
#  | |  |  __/ |  _|| || '_ \  / _` | / _ \| '__|
# _| |_ | |    | |  | || | | || (_| ||  __/| |
# \___/ \_|    |_|  |_||_| |_| \__,_| \___||_|
#
#______  _                             _  _
#|  ___|(_)                           | || |
#| |_    _  _ __  ___ __      __ __ _ | || |
#|  _|  | || '__|/ _ \ \ /\ / // _` || || |
#| |    | || |  |  __/ \ V  V /| (_| || || |
#\_|    |_||_|   \___|  \_/\_/  \__,_||_||_|
# -------------------------------------------------------
# [Important] Please update this list every month
# February 24, 2019, 8:24 pm
# Total ips: 74,240
# Download by ASN: AS2
# -------------------------------------------------------
add address=103.219.213.0/24 comment="AS2" list=IPfinder
add address=103.78.244.0/24 comment="AS2" list=IPfinder
add address=103.78.245.0/24 comment="AS2" list=IPfinder
add address=103.78.246.0/24 comment="AS2" list=IPfinder
add address=103.78.247.0/24 comment="AS2" list=IPfinder
add address=103.91.160.0/22 comment="AS2" list=IPfinder
add address=128.4.0.0/16 comment="AS2" list=IPfinder
add address=168.194.156.0/23 comment="AS2" list=IPfinder
add address=168.194.158.0/23 comment="AS2" list=IPfinder
add address=168.195.232.0/24 comment="AS2" list=IPfinder
add address=168.195.233.0/24 comment="AS2" list=IPfinder
add address=45.6.180.0/24 comment="AS2" list=IPfinder
add address=45.6.182.0/24 comment="AS2" list=IPfinder

....
....
....
....
....
....
Format Sample Output
Apache .htaccess allow allow from 8.8.8.0/24
Apache .htaccess deny deny from 8.8.8.0/24
Nginx allow allow 8.8.8.0/24;
Nginx deny deny 8.8.8.0/24;
CIDR 8.8.8.0/24
Linux iptables iptables -A INPUT -s 8.8.8.8/24 -j DROP
Netmask 8.8.8.0/255.255.255.0
Inverse Netmask 8.8.8.0 0.0.0.255
Web.config allow <ipSecurity allowUnlisted="false"><add ipAddress="8.8.8.0" subnetMask="255.255.255.0"/>
Web.config deny <ipSecurity allowUnlisted="true"><add ipAddress="8.8.8.0" subnetMask="255.255.255.0"/>
Cisco ACL deny ip 8.8.8.0 0.0.0.255 any
PeerGuardian2 HOST:8.8.8.0-8.255.255.255
network-object network-object 8.8.8.0 255.255.255.0
Cisco bit bucket ip route 8.8.8.0 255.255.255.0 Null0
Juniper Junos set 8.8.8.0/24
MicroTik add address=8.8.8.0/24 comment="Danger" list=MyList

Get service status

Examples

Here are sample command lines for fetching API service information :

HTTP Request

GET https://api.ipfinder.io/v1/info

POST https://api.ipfinder.io/v1/info

The parameters are defined as follows :

# With token query parameter

$ curl -X GET https://api.ipfinder.io/v1/info?token=$TOKEN 

# With Basic Auth
$ curl -u $TOKEN:  https://api.ipfinder.io/v1/info

# With X-Authorization token
$ curl -H 'X-Authorization: $TOKEN' https://api.ipfinder.io/v1/info
Parameter Default Description
token Required Your API key or the string "free" for the free API

Response Objects details

Full Response

{
    "apiKey": "$TOKEN",
    "queriesPerDay": 50000,
    "queriesLeft": 49993,
    "asqueriesPerDay": 1000,
    "asqueriesLeft": 976,
    "key_type": "E50",
    "key_info": "Enterprise API 50.000 queries per day",
    "status": "active"
}

Response Object Description
apiKey Your API key
queriesPerDay Quota of daily IP address queries
queriesLeft Number of IP address queries left for the day
asqueriesPerDay Quota of daily AS number queries only for Pro and Enterprise KEY
asqueriesLeft Number of AS number queries left for the day only for Pro and Enterprise KEY
key_type API key info
key_info API key description
status The status of your API service active canceled

IP Address Ranges

Our IP address ranges API will return a list of all of the IP addresses ranges assigned to or operated by a company, identified by the provided domain name. So, you provide a domain name, and we return all of the IP address ranges in CIDR format that belong to that company.

This API is currently only available as part of our enterprise

Examples

Here are sample command lines for fetching API service information :

HTTP Request

GET https://api.ipfinder.io/v1/ranges/$Domain?token=$token

POST https://api.ipfinder.io/v1/ranges

The parameters are defined as follows :

Parameter Default Description
token Required Your API key
Domain Required the provided domain name

Response Objects details

Response Object Description
domain Returns provided domain name
num_ranges Returns total number of CIDR
num_ipv4 Returns Total number of IPV4
num_ipv6 Returns total number of IPV6
num_asn Returns total number of AS number
ranges [Object] Returns an object containing CIDR-related data.

Libraries

Language Libraries

Official libraries for common programming languages, like PHP, Python etc.

Language Status Link Package Manager Published Link
Javascript In progress
Java In progress
Python In progress
C# In progress
PHP In progress
Ruby In progress
Go In progress
R In progress
Perl In progress

Framework Libraries

Official libraries for common frameworks. These libraries should use the official lanaguge library as a dependency, so for example the Django library should use the Python library.

In the framework libraries we can assume more about the developer's use case, and we probably have access to more information, such as a HTTP request object. We can therefore implement additional functionality that doesn't make sense in the core language library. This includes bot filtering (not sending requests to our API if the user agent belongs to a "bot").

The framework libraries should make it as simple as possible to use our API. For example, ideally only a few lines of code would be required to get ipfinder data for everyone accessing your Ruby site.

Framework Status Link Published Links
Express (NodeJS - Javascript) In progress
Spring (Java) In progress
Laravel (PHP) In progress
Django (Python) In progress
Rails (Ruby) In progress

Third party libraries

There are a large number of unofficial ipfinder libraries written by third parties. While these aren't maintained by us and haven't been tested by us these libraries can be a great way to get started quickly with ipfinder if you're using a language or framework that we don't have an official library for. Search GitHub for ipfinder libraries.

Changelog

All notable changes to this API will be documented in this file.

March, 2019

February, 2019

Errors

Whenever a requested resource is not available or an API call fails for another reason, a JSON error is returned. Errors always come with an error code and a description.

Server

Server error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The requested is hidden for administrators only.
404 Not Found -- The specified could not be found.
405 Method Not Allowed -- invalid method.
406 Not Acceptable -- You requested a format Not Acceptable .
429 Too Many Requests -- You're requesting too many ! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

API

API error codes:

Error Code Error id Meaning
104 usage_limit_reached You have reached your usage limit. Upgrade your plan if necessary.
404 invalid_access_key No API Key was specified or an invalid API Key was specified.
404 missing_token_key No API Key was specified.
402 expired_paymant expired paymant please Upgrade your plan
402 non_paymant non paymant Please Login to your dashbord and make order
105 function_access_restricted asn api note include in basic or Free acoount please Upgrade your plan
405 method_not_allowed Method Not Allowed
404 404_not_found The requested resource does not exist.