Bulk IP Lookup API - Instantly Geolocate Thousands of IP Addresses

Effortlessly manage your geolocation needs with our Bulk IP Lookup API. Tailored for both developers and businesses, our API streamlines the process of obtaining precise geolocation data for thousands of IP addresses in real-time. Whether you are analyzing large datasets, strengthening your cybersecurity measures, or refining your targeted marketing strategies, our API delivers accurate and reliable geolocation data in your preferred language, perfectly aligning with your specific requirements.

Our Bulk IP Lookup API simplifies the management and processing of bulk IP data, enhancing your operational efficiency and providing actionable insights with ease. Benefit from seamless integration and robust performance, all backed by our dedication to delivering consistent and reliable geolocation information whenever you need it.

10K Free Credits, No Credit Card Required

Features

Multilingual Support

Our Bulk IP Lookup API supports multiple languages, delivering geolocation data in your preferred language. Enhance user experience and cater to a global audience effortlessly.

50K IPs per Request

Our API supports bulk lookup of up to 50,000 IP addresses in a single request, streamlining large-scale geolocation tasks with ease. Effortlessly handle extensive data with speed and accuracy.

Response Filtration

Specify the desired fields in your query parameter to receive only the data you need. Our response filtration feature applies your filters to each individual IP response, optimizing processing time, reducing bandwidth usage, and enhancing overall API response speed. This ensures you get precise and efficient results tailored to your requirements.

IP Security Information

Our Bulk IP Lookup API provides comprehensive IP security data alongside geolocation information for each IP address. In addition to accurate location details, receive valuable security insights such as threat intelligence and risk assessments for every IP in your batch. Enhance your data analysis with detailed security context to improve decision-making and safeguard your network.

IP Hostname Lookup

Our API offers flexible IP hostname lookup options alongside geolocation data. You can obtain hostname information through three methods: live sources, our extensive database, or a combination of both. This flexibility ensures you get the most accurate and up-to-date hostname data for each IP address in your bulk IP lookup, enhancing your data analysis and operational efficiency.

Documentation

API Endpoint

POST

https://api.apifreaks.com/v1.0/geolocation/lookup

Test
LANGUAGE
Python
PHP
Java
Node
Ruby
$ pip install requests

API Request

ParameterRequiredTypeDefaultDescription
langNostringenresponse language. Possible values are: (1) en (English) (2) de (German) (3) ru (Russian) (4) ja (Japanese) (5) fr (French) (6) cn (Chinese Simplifed) (7) es (Spanish) (8) cs (Czech) (9) it (Italian)
fieldsNoarray-Comma separated list of fields to be included in the response. You may include an additional field labeled "geo" to represent geolocation fields, other than the individual response fields.
excludesNoarray-Comma separated list of fields except ip to be excluded in the response
includeNoarray-Comma-separated list of values to include additional IP lookup information in the response. Possible values are: (1) security - To add ip security information (2) hostname - hostname lookup from IP-Hostname database and returns the same IP address if there is no hostname found for the queried IP address (3) liveHostname - hostname lookup from live sources (4) hostnameFallbackLive - hostname lookup from IP-Hostname database and if there is no hostname found for the queried IP address, then lookup through the live sources

The request body should be in JSON format and include a comma-separated list of IP addresses or hostnames for geolocation.

{
    "ips": [
        "8.8.8.8",
        "1.1.1.1",
        "dns.google.com"
    ]
}

API Response

For a comprehensive view of the API response structure and detailed field descriptions, explore the interactive Response Table by clicking here.

HTTP Error Codes

If the entire request encounters an error, the following error codes will be returned. However, if an individual IP address belongs to the bogon IP list or experiences another specific error, only the object corresponding to that IP will include a message field detailing the error. The rest of the response will still contain the geolocation data for the other IPs, ensuring you receive as much useful information as possible.

HTTP StatusReasons
400
'ip' must not be empty or null.

How-To-Guides

Lookup by IPv4, IPv6 address or hostname

Provide IPv4, IPv6, or hostnames in the request body. Our API will return the geolocation information corresponding to each input, delivering accurate and comprehensive data tailored to your needs.

curl --location 'https://api.apifreaks.com/v1.0/geolocation/lookup?apiKey=API-KEY&fields=geo' \ --header 'Content-Type: application/json' --data '{ "ips": [ "1.1.1.1", "dns.google.com", "2001:4860:4860::1" ] }'
[ { "ip": "1.1.1.1", "country_code2": "US", "country_code3": "USA", "country_name": "United States", "country_name_official": "United States of America", "state_prov": "California", "state_code": "US-CA", "district": "", "city": "Los Angeles", "zipcode": "90012", "latitude": "34.05361", "longitude": "-118.24550" }, { "domain": "dns.google.com", "ip": "8.8.4.4", "country_code2": "US", "country_code3": "USA", "country_name": "United States", "country_name_official": "United States of America", "state_prov": "California", "state_code": "US-CA", "district": "", "city": "Mountain View", "zipcode": "94043-1351", "latitude": "37.42240", "longitude": "-122.08421" }, { "ip": "2001:4860:4860:0:0:0:0:1", "country_code2": "US", "country_code3": "USA", "country_name": "United States", "country_name_official": "United States of America", "state_prov": "California", "state_code": "US-CA", "district": "", "city": "Mountain View", "zipcode": "94043-1351", "latitude": "37.42240", "longitude": "-122.08421" } ]

JSON / XML Response Format

To customize the response format of your Bulk IP Lookup API, use the format parameter in your request. If you do not specify a format, the default response will be in JSON. To receive the response in XML format, simply include the format query parameter with the value xml. This flexibility ensures you receive the bulk IP geolocation data in the format that best suits your needs, providing seamless integration and convenience, whether you prefer JSON or XML.

curl --location 'https://api.apifreaks.com/v1.0/geolocation/lookup?fields=geo&format=xml&apiKey=API-KEY' --header 'Content-Type: application/json' --data '{ "ips": [ "1.1.1.1" ] }'
<ArrayList> <item> <ip>1.1.1.1</ip> <country_code2>US</country_code2> <country_code3>USA</country_code3> <country_name>United States</country_name> <country_name_official>United States of America</country_name_official> <state_prov>California</state_prov> <state_code>US-CA</state_code> <district></district> <city>Los Angeles</city> <zipcode>90012</zipcode> <latitude>34.05361</latitude> <longitude>-118.24550</longitude> </item> </ArrayList>

Response Filtration

The Bulk IP Lookup API is designed for precise and efficient geolocation data retrieval. By specifying desired fields in the query parameters, you can tailor the response to include only the information you need for each IP address. This customization enhances the efficiency of your IP lookup and geolocation tasks by delivering targeted and relevant data. You can customize the API response in two effective ways:

  1. Include Specific Fields: Use the fields query parameter with a comma-separated list of desired fields to ensure only those are included in the response for each IP address.
  2. Exclude Unwanted Fields: Use the excludes query parameter with a comma-separated list of fields to omit from the response, streamlining the data to focus on what's most important for your needs.
# Get city information only curl --location 'https://api.apifreaks.com/v1.0/geolocation/lookup?fields=city&apiKey=API-KEY' --header 'Content-Type: application/json' --data '{ "ips": [ "1.1.1.1", "8.8.8.8" ] }'
[ { "ip": "1.1.1.1", "city": "Los Angeles" }, { "ip": "8.8.8.8", "city": "Mountain View" } ] # Get the geolocation and exclude the continent information
curl --location 'https://api.apifreaks.com/v1.0/geolocation/lookup?fields=geo&excludes=continent_code&apiKey=API-KEY' --header 'Content-Type: application/json' --data '{ "ips": [ "1.1.1.1", "8.8.8.8" ] }'
[ { "ip": "1.1.1.1", "country_code2": "US", "country_code3": "USA", "country_name": "United States", "country_name_official": "United States of America", "state_prov": "California", "state_code": "US-CA", "district": "", "city": "Los Angeles", "zipcode": "90012", "latitude": "34.05361", "longitude": "-118.24550" }, { "ip": "8.8.8.8", "country_code2": "US", "country_code3": "USA", "country_name": "United States", "country_name_official": "United States of America", "state_prov": "California", "state_code": "US-CA", "district": "", "city": "Mountain View", "zipcode": "94043-1351", "latitude": "37.42240", "longitude": "-122.08421" } ]

IP Security Information

The Bulk IP Lookup API also offers valuable IP-Security information, which is not included by default. To receive detailed IP-Security insights along with your geolocation data, simply add the include=security query parameter to your request. This addition ensures that you get comprehensive security details for each IP address, significantly enhancing the value and utility of your geolocation results and providing a more complete view of your IP data.

curl --location 'https://api.apifreaks.com/v1.0/geolocation/lookup?fields=geo&include=security&apiKey=API-KEY' --header 'Content-Type: application/json' --data '{ "ips": [ "1.1.1.1", "8.8.8.8" ] }'
[ { "ip": "1.1.1.1", "country_code2": "US", "country_code3": "USA", "country_name": "United States", "country_name_official": "United States of America", "state_prov": "California", "state_code": "US-CA", "district": "", "city": "Los Angeles", "zipcode": "90012", "latitude": "34.05361", "longitude": "-118.24550", "security": { "threat_score": 75, "is_tor": false, "is_proxy": true, "proxy_type": "VPN", "is_anonymous": true, "is_known_attacker": true, "is_spam": false, "is_bot": false, "is_cloud_provider": false } }, { "ip": "8.8.8.8", "country_code2": "US", "country_code3": "USA", "country_name": "United States", "country_name_official": "United States of America", "state_prov": "California", "state_code": "US-CA", "district": "", "city": "Mountain View", "zipcode": "94043-1351", "latitude": "37.42240", "longitude": "-122.08421", "security": { "threat_score": 80, "is_tor": false, "is_proxy": true, "proxy_type": "VPN", "is_anonymous": true, "is_known_attacker": true, "is_spam": false, "is_bot": false, "is_cloud_provider": true } } ]

IP Hostname lookup

The Bulk IP Lookup API includes hostname lookup capabilities, though this feature is not enabled by default. To enhance your geolocation data with detailed hostname information, use the include query parameter with one of the following options:

  • hostname: Retrieves hostname information from the IP-Hostname database. If no hostname is found, the response for that IP will return the queried IP address.
  • liveHostname: Fetches the most current hostname information by performing a lookup from live sources.
  • hostnameFallbackLive: First attempts a hostname lookup from the IP-Hostname database. If no hostname is found, it then queries live sources to provide the most recent information.

By incorporating these parameters, you can enrich your bulk IP lookups with precise hostname data, enhancing the depth and accuracy of your IP geolocation results.

curl --location 'https://api.apifreaks.com/v1.0/geolocation/lookup?fields=geo&include=hostname&apiKey=API-KEY' --header 'Content-Type: application/json' --data '{ "ips": [ "1.1.1.1", "8.8.8.8" ] }'
[ { "ip": "1.1.1.1", "hostname": "1.1.1.1", "country_code2": "US", "country_code3": "USA", "country_name": "United States", "country_name_official": "United States of America", "state_prov": "California", "state_code": "US-CA", "district": "", "city": "Los Angeles", "zipcode": "90012", "latitude": "34.05361", "longitude": "-118.24550" }, { "ip": "8.8.8.8", "hostname": "8.8.8.8", "country_code2": "US", "country_code3": "USA", "country_name": "United States", "country_name_official": "United States of America", "state_prov": "California", "state_code": "US-CA", "district": "", "city": "Mountain View", "zipcode": "94043-1351", "latitude": "37.42240", "longitude": "-122.08421" } ]

Pricing

To use the Bulk IP Lookup API, API credits are required. Charges apply only for successful queries, defined by a 2xx status code. If a request results in a 4xx or 5xx status code, no credits will be deducted, and any charges incurred will be refunded. Credits are charged based on each IP address specified in your request. If an error occurs with a specific IP address, credits will be refunded for that IP, and you will be charged only for successfully geolocated IP addresses.

ServiceCredits
Basic Geolocation Data per IP1 Credit per successfully geolocated IP address
Additional Data (e.g., IP Security, IP Hostname) per IP1 Additional Credit per IP address

Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.

Price Estimation Calculator